Yoast\WP\SEO

Main::get_container()protectedYoast 1.0

{@inheritDoc}

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

Хуков нет.

Возвращает

null. Ничего (null).

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_container();

Код Main::get_container() Yoast 22.4

protected function get_container() {
	if ( $this->is_development() && \class_exists( '\Yoast\WP\SEO\Dependency_Injection\Container_Compiler' ) ) {
		// Exception here is unhandled as it will only occur in development.
		Container_Compiler::compile(
			$this->is_development(),
			__DIR__ . '/generated/container.php',
			__DIR__ . '/../config/dependency-injection/services.php',
			__DIR__ . '/../vendor/composer/autoload_classmap.php',
			'Yoast\WP\SEO\Generated'
		);
	}

	if ( \file_exists( __DIR__ . '/generated/container.php' ) ) {
		require_once __DIR__ . '/generated/container.php';

		return new Cached_Container();
	}

	return null;
}