Class RoutePluginManager

Summary

Fully Qualified Name: Zend\Router\RoutePluginManager
Extends: AbstractPluginManager

Description

Plugin manager implementation for routes

Enforces that routes retrieved are instances of RouteInterface. It overrides configure() to map invokables to the component-specific RouteInvokableFactory.

The manager is marked to not share by default, in order to allow multiple route instances of the same type.

Methods

Name Description Defined By
__construct() Constructor RoutePluginManager
addAbstractFactory() Add an abstract factory for resolving services. ServiceManager
addDelegator() Add a delegator for a given service. ServiceManager
addInitializer() Add an initializer. ServiceManager
build() {@inheritDoc} ServiceManager
configure() Pre-process configuration. (v3) RoutePluginManager
get() {@inheritDoc} AbstractPluginManager
getAllowOverride() Retrieve the flag indicating immutability status. ServiceManager
getServiceLocator() Implemented for backwards compatibility with previous plugin managers only. ServiceManager
has() {@inheritDoc} ServiceManager
mapLazyService() Create a lazy service mapping to a class. ServiceManager
setAlias() Add an alias. ServiceManager
setAllowOverride() Indicate whether or not the instance is immutable. ServiceManager
setFactory() Specify a factory for a given service name. ServiceManager
setInvokableClass() Add an invokable class mapping. ServiceManager
setService() Map a service. ServiceManager
setServiceLocator() Implemented for backwards compatibility only. AbstractPluginManager
setShared() Add a service sharing rule. ServiceManager
validate() Validate a route plugin. (v2) RoutePluginManager
validatePlugin() Validate a route plugin. (v2) RoutePluginManager

Method Details

__construct()

Constructor

Ensure that the instance is seeded with the RouteInvokableFactory as an abstract factory.

Parameter Name Type Description
$configOrContainerInstance \ContainerInterface|\Zend\ServiceManager\ConfigInterface
$v3config array

Returns:

addAbstractFactory()

Add an abstract factory for resolving services.

Parameter Name Type Description
$factory string|\Factory\AbstractFactoryInterface Service

Returns:

addDelegator()

Add a delegator for a given service.

Parameter Name Type Description
$name string Service
$factory string|callable|\Factory\DelegatorFactoryInterface Delegator factory

Returns:

addInitializer()

Add an initializer.

Parameter Name Type Description
$initializer string|callable|\Initializer\InitializerInterface

Returns:

build()

{@inheritDoc}

Parameter Name Type Description
$name
$options

Returns:

configure()

Pre-process configuration. (v3)

Checks for invokables, and, if found, maps them to the component-specific RouteInvokableFactory; removes the invokables entry before passing to the parent.

Parameter Name Type Description
$config array

Returns: void

get()

{@inheritDoc}

Parameter Name Type Description
$name string Service
$options null|array Options

Returns: mixed

getAllowOverride()

Retrieve the flag indicating immutability status.

Returns: bool

getServiceLocator()

Implemented for backwards compatibility with previous plugin managers only.

Returns the creation context.

Returns: \ContainerInterface

has()

{@inheritDoc}

Parameter Name Type Description
$name

Returns:

mapLazyService()

Create a lazy service mapping to a class.

Parameter Name Type Description
$name string Service
$class null|string Class

Returns:

setAlias()

Add an alias.

Parameter Name Type Description
$alias string
$target string

Returns:

setAllowOverride()

Indicate whether or not the instance is immutable.

Parameter Name Type Description
$flag bool

Returns:

setFactory()

Specify a factory for a given service name.

Parameter Name Type Description
$name string Service
$factory string|callable|\Factory\FactoryInterface Factory

Returns:

setInvokableClass()

Add an invokable class mapping.

Parameter Name Type Description
$name string Service
$class null|string Class

Returns:

setService()

Map a service.

Parameter Name Type Description
$name string Service
$service array|object

Returns:

setServiceLocator()

Implemented for backwards compatibility only.

Returns the creation context.

Parameter Name Type Description
$container \ContainerInterface

Returns: void

setShared()

Add a service sharing rule.

Parameter Name Type Description
$name string Service
$flag bool Whether

Returns:

validate()

Validate a route plugin. (v2)

Parameter Name Type Description
$plugin object

Returns:

validatePlugin()

Validate a route plugin. (v2)

Parameter Name Type Description
$plugin object

Returns:

Top