PHP Class Zend\Mvc\Controller\ControllerManager

Does not define any controllers by default, but does add a validator.
Inheritance: extends Zend\ServiceManager\AbstractPluginManager
Mostra file Open project: zendframework/zend-mvc Class Usage Examples

Protected Properties

Property Type Description
$autoAddInvokableClass boolean We do not want arbitrary classes instantiated as controllers.
$instanceOf string Controllers must be of this type.

Public Methods

Method Description
__construct ( $configOrContainerInstance, array $v3config = [] ) Constructor
injectEventManager ( Interop\Container\ContainerInterface | Zend\Stdlib\DispatchableInterface $first, Zend\Stdlib\DispatchableInterface | Interop\Container\ContainerInterface $second ) Initializer: inject EventManager instance
injectPluginManager ( Interop\Container\ContainerInterface | Zend\Stdlib\DispatchableInterface $first, Zend\Stdlib\DispatchableInterface | Interop\Container\ContainerInterface $second ) Initializer: inject plugin manager
validate ( $plugin ) Validate a plugin (v3)
validatePlugin ( $plugin ) Validate a plugin (v2)

Method Details

__construct() public method

Injects an initializer for injecting controllers with an event manager and plugin manager.
public __construct ( $configOrContainerInstance, array $v3config = [] )
$v3config array

injectEventManager() public method

If we have an event manager composed already, make sure it gets injected with the shared event manager. The AbstractController lazy-instantiates an EM instance, which is why the shared EM injection needs to happen; the conditional will always pass.
public injectEventManager ( Interop\Container\ContainerInterface | Zend\Stdlib\DispatchableInterface $first, Zend\Stdlib\DispatchableInterface | Interop\Container\ContainerInterface $second )
$first Interop\Container\ContainerInterface | Zend\Stdlib\DispatchableInterface Container when using zend-servicemanager v3; controller under v2.
$second Zend\Stdlib\DispatchableInterface | Interop\Container\ContainerInterface Controller when using zend-servicemanager v3; container under v2.

injectPluginManager() public method

Initializer: inject plugin manager
public injectPluginManager ( Interop\Container\ContainerInterface | Zend\Stdlib\DispatchableInterface $first, Zend\Stdlib\DispatchableInterface | Interop\Container\ContainerInterface $second )
$first Interop\Container\ContainerInterface | Zend\Stdlib\DispatchableInterface Container when using zend-servicemanager v3; controller under v2.
$second Zend\Stdlib\DispatchableInterface | Interop\Container\ContainerInterface Controller when using zend-servicemanager v3; container under v2.

validate() public method

{@inheritDoc}
public validate ( $plugin )

validatePlugin() public method

{@inheritDoc}
public validatePlugin ( $plugin )

Property Details

$autoAddInvokableClass protected_oe property

We do not want arbitrary classes instantiated as controllers.
protected bool $autoAddInvokableClass
return boolean

$instanceOf protected_oe property

Controllers must be of this type.
protected string $instanceOf
return string