PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 27.6
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v27.6
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 / indexable-count.php

indexable-count.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 27.6, at src/schema-aggregator/domain/indexable-count.php

53 lines 980 B
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 the count of indexables for a specific post type.
7 */
8 class Indexable_Count {
9
10 /**
11 * The count of indexables.
12 *
13 * @var int
14 */
15 private $count;
16
17 /**
18 * The post type.
19 *
20 * @var string
21 */
22 private $post_type;
23
24 /**
25 * Constructor for Indexable_Count.
26 *
27 * @param string $post_type The post type.
28 * @param int $count The count of indexables.
29 */
30 public function __construct( string $post_type, int $count ) {
31 $this->post_type = $post_type;
32 $this->count = $count;
33 }
34
35 /**
36 * Gets the count of indexables.
37 *
38 * @return int The count of indexables.
39 */
40 public function get_count(): int {
41 return $this->count;
42 }
43
44 /**
45 * Gets the post type.
46 *
47 * @return string The post type.
48 */
49 public function get_post_type(): string {
50 return $this->post_type;
51 }
52 }
53