Zend Framework  3.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
NavigationAbstractServiceFactory Class Reference

Navigation abstract service factory. More...

Public Member Functions

 canCreate (ContainerInterface $container, $requestedName)
 Can we create a navigation by the requested name? (v3)
 
 canCreateServiceWithName (ServiceLocatorInterface $container, $name, $requestedName)
 Can we create a navigation by the requested name? (v2)
 
 __invoke (ContainerInterface $container, $requestedName, array $options=null)
 Create an object.
Parameters
ContainerInterface$container
string$requestedName
null | array$options
Returns
object
Exceptions
ServiceNotFoundExceptionif unable to resolve the service.
ServiceNotCreatedExceptionif an exception is raised when creating a service.
ContainerExceptionif any other error occurs

 
 createServiceWithName (ServiceLocatorInterface $container, $name, $requestedName)
 Can we create a navigation by the requested name? (v2)
 

Public Attributes

const CONFIG_KEY = 'navigation'
 
const SERVICE_PREFIX = 'Zend\\Navigation\\'
 

Protected Member Functions

 getConfig (ContainerInterface $container)
 Get navigation configuration, if any.
 

Protected Attributes

 $config
 

Detailed Description

Navigation abstract service factory.

Allows configuring several navigation instances. If you have a navigation config key named "special" then you can use $container->get('Zend') to retrieve a navigation instance with this configuration.

Member Function Documentation

__invoke ( ContainerInterface  $container,
  $requestedName,
array  $options = null 
)

Create an object.

Parameters
ContainerInterface$container
string$requestedName
null | array$options
Returns
object
Exceptions
ServiceNotFoundExceptionif unable to resolve the service.
ServiceNotCreatedExceptionif an exception is raised when creating a service.
ContainerExceptionif any other error occurs

Returns
Navigation

Implements FactoryInterface.

canCreate ( ContainerInterface  $container,
  $requestedName 
)

Can we create a navigation by the requested name? (v3)

Parameters
ContainerInterface$container
string$requestedNameName by which service was requested, must start with Zend\
Returns
bool

Implements AbstractFactoryInterface.

canCreateServiceWithName ( ServiceLocatorInterface  $container,
  $name,
  $requestedName 
)

Can we create a navigation by the requested name? (v2)

Parameters
ServiceLocatorInterface$container
string$nameNormalized name by which service was requested; ignored.
string$requestedNameName by which service was requested, must start with Zend\
Returns
bool

Implements AbstractFactoryInterface.

createServiceWithName ( ServiceLocatorInterface  $container,
  $name,
  $requestedName 
)

Can we create a navigation by the requested name? (v2)

Parameters
ServiceLocatorInterface$container
string$nameNormalized name by which service was requested; ignored.
string$requestedNameName by which service was requested, must start with Zend\
Returns
Navigation

Implements AbstractFactoryInterface.

getConfig ( ContainerInterface  $container)
protected

Get navigation configuration, if any.

Parameters
ContainerInterface$container
Returns
array

Member Data Documentation

$config
protected
const CONFIG_KEY = 'navigation'
const SERVICE_PREFIX = 'Zend\\Navigation\\'