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.

 Methods

Can we create a navigation by the requested name?

canCreateServiceWithName(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator, string $name, string $requestedName) : bool

Parameters

$name

string

Service name (as resolved by ServiceManager)

$requestedName

string

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

Returns

bool

Create a navigation container

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

Parameters

$name

string

Service name (as resolved by ServiceManager)

$requestedName

string

Name by which service was requested

Returns

Get navigation configuration, if any

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

Parameters

Returns

array

Extract config name from service name

getConfigName(string $name) : string

Parameters

$name

string

Returns

string

 Properties

 

Navigation configuration

$config : array

 Constants

 

Top-level configuration key indicating navigation configuration

CONFIG_KEY : string

 

Normalized name prefix

NAME_PREFIX 

 

Service manager factory prefix

SERVICE_PREFIX : string