Zend Framework  3.0
Public Member Functions | List of all members
ServiceLocatorInterface Interface Reference

Interface for service locator. More...

Public Member Functions

 build ($name, array $options=null)
 Build a service by its name, using optional options (such services are NEVER cached).
 

Detailed Description

Interface for service locator.

Member Function Documentation

build (   $name,
array  $options = null 
)

Build a service by its name, using optional options (such services are NEVER cached).

Parameters
string$name
null | array$options
Returns
mixed
Exceptions
Exception\ServiceNotFoundExceptionIf no factory/abstract factory could be found to create the instance.
Exception\ServiceNotCreatedExceptionIf factory/delegator fails to create the instance.
ContainerExceptionif any other error occurs

Implemented in ServiceManager, and PatternPluginManager.