Yoast\WP\SEO\Schema_Aggregator\Domain
Indexable_Count_Collection{}
Class to contain a collection of Indexable_Count objects.
Хуков нет.
Использование
$Indexable_Count_Collection = new Indexable_Count_Collection(); // use class methods
Методы
- public __construct()
- public add_indexable_count( Indexable_Count $indexable_count )
- public get_indexable_counts()
Код Indexable_Count_Collection{} Indexable Count Collection{} Yoast 28.3
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;
}
}