Zend Framework  2.4
Public Member Functions | Protected Attributes | List of all members
SymmetricPluginManager Class Reference

Plugin manager implementation for the symmetric adapter instances. More...

Public Member Functions

 validatePlugin ($plugin)
 Validate the plugin.
 
- Public Member Functions inherited from AbstractPluginManager
 __construct (ConfigInterface $configuration=null)
 Constructor.
 
 validatePlugin ($plugin)
 Validate the plugin.
 
 get ($name, $options=array(), $usePeeringServiceManagers=true)
 Retrieve a service from the manager by name.
 
 setService ($name, $service, $shared=true)
 Register a service with the locator.
 
 setServiceLocator (ServiceLocatorInterface $serviceLocator)
 Set the main service locator so factories can have access to it to pull deps.
 
 getServiceLocator ()
 Get the main plugin manager.
 
- Public Member Functions inherited from ServiceManager
 __construct (ConfigInterface $config=null)
 Constructor.
 
 setAllowOverride ($allowOverride)
 Set allow override.
 
 getAllowOverride ()
 Get allow override.
 
 setShareByDefault ($shareByDefault)
 Set flag indicating whether services are shared by default.
 
 shareByDefault ()
 Are services shared by default?
 
 setThrowExceptionInCreate ($throwExceptionInCreate)
 Set throw exceptions in create.
 
 getThrowExceptionInCreate ()
 Get throw exceptions in create.
 
 setRetrieveFromPeeringManagerFirst ($retrieveFromPeeringManagerFirst=true)
 Set flag indicating whether to pull from peering manager before attempting creation.
 
 retrieveFromPeeringManagerFirst ()
 Should we retrieve from the peering manager prior to attempting to create a service?
 
 setInvokableClass ($name, $invokableClass, $shared=null)
 Set invokable class.
 
 setFactory ($name, $factory, $shared=null)
 Set factory.
 
 addAbstractFactory ($factory, $topOfStack=true)
 Add abstract factory.
 
 addDelegator ($serviceName, $delegatorFactoryName)
 Sets the given service name as to be handled by a delegator factory.
 
 addInitializer ($initializer, $topOfStack=true)
 Add initializer.
 
 setService ($name, $service)
 Register a service with the locator.
 
 setShared ($name, $isShared)
 
 isShared ($name)
 
 get ($name, $usePeeringServiceManagers=true)
 Retrieve a registered instance.
 
 create ($name)
 Create an instance of the requested service.
 
 doCreate ($rName, $cName)
 Actually creates the service.
 
 canCreate ($name, $checkAbstractFactories=true)
 Determine if we can create an instance.
 
 has ($name, $checkAbstractFactories=true, $usePeeringServiceManagers=true)
 Determine if an instance exists.
 
 canCreateFromAbstractFactory ($cName, $rName)
 Determine if we can create an instance from an abstract factory.
 
 setAlias ($alias, $nameOrAlias)
 
 hasAlias ($alias)
 Determine if we have an alias.
 
 createScopedServiceManager ($peering=self::SCOPE_PARENT)
 Create scoped service manager.
 
 addPeeringServiceManager (ServiceManager $manager, $peering=self::SCOPE_PARENT)
 Add a peering relationship.
 
 getRegisteredServices ()
 Retrieve a keyed list of all registered services.
 
 getCanonicalNames ()
 Retrieve a keyed list of all canonical names.
 
 setCanonicalNames ($canonicalNames)
 Allows to override the canonical names lookup map with predefined values.
 
- Public Member Functions inherited from ServiceLocatorInterface
 get ($name)
 Retrieve a registered instance.
 
 has ($name)
 Check for a registered instance.
 

Protected Attributes

 $invokableClasses
 
 $shareByDefault = false
 
- Protected Attributes inherited from AbstractPluginManager
 $allowOverride = true
 
 $autoAddInvokableClass = true
 
 $creationOptions = null
 
 $serviceLocator
 
- Protected Attributes inherited from ServiceManager
 $canonicalNames = array()
 
 $allowOverride = false
 
 $invokableClasses = array()
 
 $factories = array()
 
 $abstractFactories = array()
 
 $delegators = array()
 
 $pendingAbstractFactoryRequests = array()
 
 $nestedContextCounter = -1
 
 $nestedContext = array()
 
 $shared = array()
 
 $instances = array()
 
 $aliases = array()
 
 $initializers = array()
 
 $peeringServiceManagers = array()
 
 $shareByDefault = true
 
 $retrieveFromPeeringManagerFirst = false
 
 $throwExceptionInCreate = true
 
 $canonicalNamesReplacements = array('-' => '', '_' => '', ' ' => '', '\\' => '', '/' => '')
 
 $serviceManagerCaller
 

Additional Inherited Members

- Public Attributes inherited from ServiceManager
const SCOPE_PARENT = 'parent'
 #+ Constants
 
const SCOPE_CHILD = 'child'
 
- Protected Member Functions inherited from AbstractPluginManager
 createFromInvokable ($canonicalName, $requestedName)
 Attempt to create an instance via an invokable class.
 
 createFromFactory ($canonicalName, $requestedName)
 Attempt to create an instance via a factory class.
 
 createServiceViaCallback ($callable, $cName, $rName)
 Create service via callback.
 
- Static Protected Member Functions inherited from ServiceManager
static isSubclassOf ($className, $type)
 Checks if the object has this class as one of its parents.
 

Detailed Description

Plugin manager implementation for the symmetric adapter instances.

Enforces that symmetric adapters retrieved are instances of Symmetric. Additionally, it registers a number of default symmetric adapters available.

Member Function Documentation

validatePlugin (   $plugin)

Validate the plugin.

Checks that the adapter loaded is an instance of Symmetric.

Parameters
mixed$plugin
Returns
void
Exceptions
Exception\InvalidArgumentExceptionif invalid

Member Data Documentation

$invokableClasses
protected
Initial value:
= array(
'mcrypt' => 'Zend\Crypt\Symmetric\Mcrypt',
)
$shareByDefault = false
protected