File "top-query-route.php"

Full Path: /home/elegucvf/public_html/video/wp-content/plugins/wordpress-seo/src/dashboard/user-interface/search-rankings/top-query-route.php
File size: 873 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Dashboard\User_Interface\Search_Rankings;

use Yoast\WP\SEO\Dashboard\Application\Search_Rankings\Top_Query_Repository;
use Yoast\WP\SEO\Dashboard\Infrastructure\Search_Console\Search_Console_Parameters;

/**
 * Registers a route to get the top search queries.
 */
class Top_Query_Route extends Abstract_Ranking_Route {

	/**
	 * The prefix of the route.
	 *
	 * @var string
	 */
	public const ROUTE_PREFIX = '/top_queries';

	/**
	 * The constructor.
	 *
	 * @param Top_Query_Repository $top_query_repository The data provider.
	 */
	public function __construct( Top_Query_Repository $top_query_repository ) {
		$this->set_request_parameters( new Search_Console_Parameters( [ 'query' ] ) );

		parent::__construct( $top_query_repository );
	}
}