PHP Trait Webiny\Component\ServiceManager\ServiceManagerTrait

Show file Open project: Webiny/Framework

Protected Methods

Method Description
service ( string $serviceName ) : object Get service
servicesByTag ( string $tag, null $forceType = null ) : array Get multiple services by tag

Method Details

service() protected static method

Get service
protected static service ( string $serviceName ) : object
$serviceName string Service name
return object

servicesByTag() protected static method

Get multiple services by tag
protected static servicesByTag ( string $tag, null $forceType = null ) : array
$tag string Tag to use for services filter
$forceType null (Optional) Return only services which are instances of $forceType
return array