Navigation abstract service factory

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

package Default

 Methods

Can we create a navigation by the requested name?

canCreateServiceWithName(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator, string $name, string $requestedName) : boolean
inherited_from \Zend\ServiceManager\AbstractFactoryInterface::canCreateServiceWithName()

Parameters

$serviceLocator

\Zend\ServiceManager\ServiceLocatorInterface

$name

string

Service name (as resolved by ServiceManager)

$requestedName

string

Name by which service was requested, must start with Zend\Navigation\

Returns

boolean

Create a navigation container

createServiceWithName(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator, string $name, string $requestedName) : \Zend\Navigation\Navigation
inherited_from \Zend\ServiceManager\AbstractFactoryInterface::createServiceWithName()

Parameters

$serviceLocator

\Zend\ServiceManager\ServiceLocatorInterface

$name

string

Service name (as resolved by ServiceManager)

$requestedName

string

Name by which service was requested

Returns

\Zend\Navigation\Navigation

Get navigation configuration, if any

getConfig(\Zend\ServiceManager\ServiceLocatorInterface $services) : array

Parameters

$services

\Zend\ServiceManager\ServiceLocatorInterface

Returns

array

Extract config name from service name

getConfigName(string $name) : string

Parameters

$name

string

Returns

string

 Properties

 

Navigation configuration

$config : array

Default

 Constants

 

Top-level configuration key indicating navigation configuration

CONFIG_KEY = 'navigation' : string
 

Normalized name prefix

NAME_PREFIX = 'zendnavigation' 
 

Service manager factory prefix

SERVICE_PREFIX = 'Zend\Navigation\\' : string