PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.4
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.4
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / schema-aggregator / domain / page-controls.php

page-controls.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.4, at src/schema-aggregator/domain/page-controls.php

71 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
3 namespace Yoast\WP\SEO\Schema_Aggregator\Domain;
4
5 /**
6 * Class to contain page controls.
7 */
8 class Page_Controls {
9
10 /**
11 * The page.
12 *
13 * @var int
14 */
15 private $page;
16
17 /**
18 * The page size.
19 *
20 * @var int
21 */
22 private $page_size;
23
24 /**
25 * The post type.
26 *
27 * @var string
28 */
29 private $post_type;
30
31 /**
32 * The constructor.
33 *
34 * @param int $page The current page.
35 * @param int $page_size The page size.
36 * @param string $post_type The post type.
37 */
38 public function __construct( int $page, int $page_size, string $post_type ) {
39 $this->page = $page;
40 $this->page_size = $page_size;
41 $this->post_type = $post_type;
42 }
43
44 /**
45 * Gets the current page.
46 *
47 * @return int
48 */
49 public function get_page(): int {
50 return $this->page;
51 }
52
53 /**
54 * Gets the page size.
55 *
56 * @return int
57 */
58 public function get_page_size(): int {
59 return $this->page_size;
60 }
61
62 /**
63 * Gets the post type.
64 *
65 * @return string
66 */
67 public function get_post_type(): string {
68 return $this->post_type;
69 }
70 }
71