Yoast\WP\Lib\Dependency_Injection
Container_Registry::find()
Attempts to find a given service ID in all registered containers.
Метод класса: Container_Registry{}
Хуков нет.
Возвращает
Строку|null
. The name of the container if the service was found.
Использование
$result = Container_Registry::find( $id );
- $id(строка) (обязательный)
- The service ID.
Код Container_Registry::find() Container Registry::find Yoast 24.0
public static function find( $id ) { foreach ( self::$containers as $name => $container ) { if ( $container->has( $id ) ) { return $name; } } }