# wordpress-seo/28.2/src/schema-aggregator/domain/indexable-count-collection.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version 28.2. 43 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/28.2/code/src/schema-aggregator/domain/indexable-count-collection.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/28.2/raw/src/schema-aggregator/domain/indexable-count-collection.php
- Modified: 2026-02-17T12:17:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wordpress-seo/28.2/code/src/schema-aggregator/domain/indexable-count-collection.php#L10-L20`.

```php
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Schema_Aggregator\Domain;

/**
 * Class to contain a collection of Indexable_Count objects.
 */
class Indexable_Count_Collection {

	/**
	 * The array of Indexable_Count objects.
	 *
	 * @var array<int, Indexable_Count>
	 */
	private array $indexable_counts;

	/**
	 * Constructor.
	 */
	public function __construct() {
		$this->indexable_counts = [];
	}

	/**
	 * Adds an Indexable_Count object to the collection.
	 *
	 * @param Indexable_Count $indexable_count The Indexable_Count object to add.
	 * @return void
	 */
	public function add_indexable_count( Indexable_Count $indexable_count ): void {
		$this->indexable_counts[] = $indexable_count;
	}

	/**
	 * Gets all indexable counts.
	 *
	 * @return array<int, Indexable_Count> The array of Indexable_Count objects.
	 */
	public function get_indexable_counts(): array {
		return $this->indexable_counts;
	}
}

```
