PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
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-collection.php

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

43 lines 991 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 a collection of Indexable_Count objects.
7 */
8 class Indexable_Count_Collection {
9
10 /**
11 * The array of Indexable_Count objects.
12 *
13 * @var array<int, Indexable_Count>
14 */
15 private array $indexable_counts;
16
17 /**
18 * Constructor.
19 */
20 public function __construct() {
21 $this->indexable_counts = [];
22 }
23
24 /**
25 * Adds an Indexable_Count object to the collection.
26 *
27 * @param Indexable_Count $indexable_count The Indexable_Count object to add.
28 * @return void
29 */
30 public function add_indexable_count( Indexable_Count $indexable_count ): void {
31 $this->indexable_counts[] = $indexable_count;
32 }
33
34 /**
35 * Gets all indexable counts.
36 *
37 * @return array<int, Indexable_Count> The array of Indexable_Count objects.
38 */
39 public function get_indexable_counts(): array {
40 return $this->indexable_counts;
41 }
42 }
43