PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.5
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.5
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 / analytics / domain / missing-indexable-count.php

missing-indexable-count.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.5, at src/analytics/domain/missing-indexable-count.php

65 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Analytics\Domain;
4
5 /**
6 * Domain object that holds indexable count information.
7 */
8 class Missing_Indexable_Count {
9
10 /**
11 * The indexable type that is represented by this.
12 *
13 * @var string
14 */
15 private $indexable_type;
16
17 /**
18 * The amount of missing indexables.
19 *
20 * @var int
21 */
22 private $count;
23
24 /**
25 * The constructor.
26 *
27 * @param string $indexable_type The indexable type that is represented by this.
28 * @param int $count The amount of missing indexables.
29 */
30 public function __construct( $indexable_type, $count ) {
31 $this->indexable_type = $indexable_type;
32 $this->count = $count;
33 }
34
35 /**
36 * Returns an array representation of the data.
37 *
38 * @return array Returns both values in an array format.
39 */
40 public function to_array() {
41 return [
42 'indexable_type' => $this->get_indexable_type(),
43 'count' => $this->get_count(),
44 ];
45 }
46
47 /**
48 * Gets the indexable type.
49 *
50 * @return string Returns the indexable type.
51 */
52 public function get_indexable_type() {
53 return $this->indexable_type;
54 }
55
56 /**
57 * Gets the count.
58 *
59 * @return int Returns the amount of missing indexables.
60 */
61 public function get_count() {
62 return $this->count;
63 }
64 }
65