Yoast\WP\SEO\Schema_Aggregator\Domain

Page_Controls{}Yoast 1.0

Class to contain page controls.

Хуков нет.

Использование

$Page_Controls = new Page_Controls();
// use class methods

Методы

  1. public __construct( int $page, int $page_size, string $post_type )
  2. public get_page()
  3. public get_page_size()
  4. public get_post_type()

Код Page_Controls{} Yoast 28.3

class Page_Controls {

	/**
	 * The page.
	 *
	 * @var int
	 */
	private $page;

	/**
	 * The page size.
	 *
	 * @var int
	 */
	private $page_size;

	/**
	 * The post type.
	 *
	 * @var string
	 */
	private $post_type;

	/**
	 * The constructor.
	 *
	 * @param int    $page      The current page.
	 * @param int    $page_size The page size.
	 * @param string $post_type The post type.
	 */
	public function __construct( int $page, int $page_size, string $post_type ) {
		$this->page      = $page;
		$this->page_size = $page_size;
		$this->post_type = $post_type;
	}

	/**
	 * Gets the current page.
	 *
	 * @return int
	 */
	public function get_page(): int {
		return $this->page;
	}

	/**
	 * Gets the page size.
	 *
	 * @return int
	 */
	public function get_page_size(): int {
		return $this->page_size;
	}

	/**
	 * Gets the post type.
	 *
	 * @return string
	 */
	public function get_post_type(): string {
		return $this->post_type;
	}
}