Yoast\WP\SEO\Schema_Aggregator\Infrastructure\Indexable_Repository

Indexable_Repository_Factory::get_repositorypublicYoast 1.0

Gets the appropriate indexable repository based on availability.

Метод класса: Indexable_Repository_Factory{}

Хуков нет.

Возвращает

Indexable_Repository_Interface. The selected indexable repository.

Использование

$Indexable_Repository_Factory = new Indexable_Repository_Factory();
$Indexable_Repository_Factory->get_repository( $indexables_available ): Indexable_Repository_Interface;
$indexables_available(true|false) (обязательный)
Whether native indexables are available.

Код Indexable_Repository_Factory::get_repository() Yoast 28.3

public function get_repository( bool $indexables_available ): Indexable_Repository_Interface {
	if ( $indexables_available ) {
		return $this->native_repository;
	}

	return $this->wordpress_repository;
}