Yoast\WP\SEO\Schema_Aggregator\Infrastructure\Schema_Map

Schema_Map_Repository_Factory::get_repositorypublicYoast 1.0

Gets the appropriate indexable repository based on availability.

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

Хуков нет.

Возвращает

Schema_Map_Repository_Interface. The selected indexable repository.

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

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

Код Schema_Map_Repository_Factory::get_repository() Yoast 28.3

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

	return $this->wordpress_repository;
}