PHP Класс PhpBench\Registry\Registry

Lazily instantiates tagged services which are associated with a name and stores configurations which are relevant to these services. $reg->getService($config['renderer']); $reg->render($something, $config);
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$serviceType

Открытые методы

Метод Описание
__construct ( $serviceType, PhpBench\DependencyInjection\Container $container, $defaultService = null )
getService ( string $name = null ) : object Return the named service, lazily creating it from the container if it has not yet been accessed.
registerService ( string $name, string $serviceId ) Register a service ID with against the given name.
setService ( string $name, object $object ) Directly set a named service.

Приватные методы

Метод Описание
assertServiceExists ( $name )

Описание методов

__construct() публичный Метод

public __construct ( $serviceType, PhpBench\DependencyInjection\Container $container, $defaultService = null )
$container PhpBench\DependencyInjection\Container

getService() публичный Метод

Return the named service, lazily creating it from the container if it has not yet been accessed.
public getService ( string $name = null ) : object
$name string
Результат object

registerService() публичный Метод

Register a service ID with against the given name.
public registerService ( string $name, string $serviceId )
$name string
$serviceId string

setService() публичный Метод

Directly set a named service.
public setService ( string $name, object $object )
$name string
$object object

Описание свойств

$serviceType защищенное свойство

protected $serviceType