Zend\Crypt\SymmetricPluginManager
Plugin manager implementation for the symmetric adapter instances.
Enforces that symmetric adapters retrieved are instances of
Symmetric\SymmetricInterface. Additionally, it registers a number of default
symmetric adapters available.
Synopsis
class SymmetricPluginManager
extends AbstractPluginManager
{
- // Inherited constants from ServiceManager
- const SCOPE_PARENT = 'parent';
- const SCOPE_CHILD = 'child';
- // members
- protected array $invokableClasses;
- protected bool $shareByDefault;
- // Inherited members from AbstractPluginManager
- protected bool $allowOverride;
- protected bool $autoAddInvokableClass;
- protected mixed $creationOptions;
- protected ServiceLocatorInterface $serviceLocator;
- // Inherited members from ServiceManager
- protected array $canonicalNames;
- protected bool $allowOverride;
- protected array $invokableClasses;
- protected array $factories;
- protected array $abstractFactories;
- protected array $delegators;
- protected array $pendingAbstractFactoryRequests;
- protected integer $nestedContextCounter;
- protected array $nestedContext;
- protected array $shared;
- protected array $instances;
- protected array $aliases;
- protected array $initializers;
- protected array $peeringServiceManagers;
- protected bool $shareByDefault;
- protected bool $retrieveFromPeeringManagerFirst;
- protected bool $throwExceptionInCreate;
- protected array $canonicalNamesReplacements;
- // methods
- public void validatePlugin()
- // Inherited methods from AbstractPluginManager
- public void __construct()
- public abstract void validatePlugin()
- public get()
- public AbstractPluginManager setService()
- public AbstractPluginManager setServiceLocator()
- public ServiceLocatorInterface getServiceLocator()
- protected stdClass createFromInvokable()
- protected mixed createFromFactory()
- protected createServiceViaCallback()
- // Inherited methods from ServiceManager
- public void __construct()
- public ServiceManager setAllowOverride()
- public bool getAllowOverride()
- public ServiceManager setShareByDefault()
- public bool shareByDefault()
- public ServiceManager setThrowExceptionInCreate()
- public bool getThrowExceptionInCreate()
- public ServiceManager setRetrieveFromPeeringManagerFirst()
- public bool retrieveFromPeeringManagerFirst()
- public ServiceManager setInvokableClass()
- public ServiceManager setFactory()
- public ServiceManager addAbstractFactory()
- public ServiceManager addDelegator()
- public ServiceManager addInitializer()
- public ServiceManager setService()
- public ServiceManager setShared()
- protected string resolveAlias()
- public object|array get()
- public bool|object create()
- public bool|mixed|null|object doCreate()
- public bool canCreate()
- public bool has()
- public bool canCreateFromAbstractFactory()
- protected self checkForCircularAliasReference()
- public ServiceManager setAlias()
- public bool hasAlias()
- public ServiceManager createScopedServiceManager()
- public ServiceManager addPeeringServiceManager()
- protected string canonicalizeName()
- protected createServiceViaCallback()
- public array getRegisteredServices()
- public array getCanonicalNames()
- public ServiceManager setCanonicalNames()
- protected mixed retrieveFromPeeringManager()
- protected stdClass createFromInvokable()
- protected mixed createFromFactory()
- protected object|null createFromAbstractFactory()
- protected self checkNestedContextStart()
- protected self checkNestedContextStop()
- protected mixed createDelegatorFromFactory()
- protected static bool isSubclassOf()
- protected void unregisterService()
Hierarchy
Constants
Name | Value |
---|---|
SCOPE_PARENT | 'parent' |
SCOPE_CHILD | 'child' |
Members
protected
- $abstractFactories — array
- $aliases — array
- $allowOverride
—
Zend\ServiceManager\bool
Allow overriding by default - $allowOverride — Zend\ServiceManager\bool
- $autoAddInvokableClass
—
Zend\ServiceManager\bool
Whether or not to auto-add a class as an invokable class if it exists - $canonicalNames
—
array
Lookup for canonicalized names. - $canonicalNamesReplacements — array
- $creationOptions
—
mixed
Options to use when creating an instance - $delegators — array
- $factories — array
- $initializers — array
- $instances
—
array
Registered services and cached values - $invokableClasses
—
array
Default set of symmetric adapters - $invokableClasses — array
- $nestedContext — array
- $nestedContextCounter — integer
- $peeringServiceManagers — array
- $pendingAbstractFactoryRequests — array
- $retrieveFromPeeringManagerFirst — Zend\ServiceManager\bool
- $serviceLocator
—
Zend\ServiceManager\ServiceLocatorInterface
The main service locator - $throwExceptionInCreate — Zend\ServiceManager\bool
Methods
public
- validatePlugin() — Validate the plugin
Inherited from Zend\ServiceManager\AbstractPluginManager
protected
- createFromFactory() — Attempt to create an instance via a factory class
- createFromInvokable() — Attempt to create an instance via an invokable class
- createServiceViaCallback() — Create service via callback
public
- get() — Retrieve a service from the manager by name
- getServiceLocator() — Get the main plugin manager. Useful for fetching dependencies from within factories.
- setService() — Register a service with the locator.
- setServiceLocator() — Set the main service locator so factories can have access to it to pull deps
- validatePlugin() — Validate the plugin
Inherited from Zend\ServiceManager\ServiceManager
protected
- canonicalizeName() — Canonicalize name
- checkForCircularAliasReference() — Ensure the alias definition will not result in a circular reference
- checkNestedContextStart()
- checkNestedContextStop()
- createDelegatorFromFactory()
- createFromAbstractFactory() — Attempt to create an instance via an abstract factory
- createFromFactory() — Attempt to create an instance via a factory
- createFromInvokable() — Attempt to create an instance via an invokable class
- createServiceViaCallback() — Create service via callback
- isSubclassOf() — Checks if the object has this class as one of its parents
- resolveAlias() — Resolve the alias for the given canonical name
- retrieveFromPeeringManager() — Attempt to retrieve an instance via a peering manager
- unregisterService() — Unregister a service
public
- addAbstractFactory() — Add abstract factory
- addDelegator() — Sets the given service name as to be handled by a delegator factory
- addInitializer() — Add initializer
- addPeeringServiceManager() — Add a peering relationship
- canCreate() — Determine if we can create an instance.
- canCreateFromAbstractFactory() — Determine if we can create an instance from an abstract factory.
- create() — Create an instance of the requested service
- createScopedServiceManager() — Create scoped service manager
- doCreate() — Actually creates the service
- get() — Retrieve a registered instance
- getAllowOverride() — Get allow override
- getCanonicalNames() — Retrieve a keyed list of all canonical names. Handy for debugging!
- getRegisteredServices() — Retrieve a keyed list of all registered services. Handy for debugging!
- getThrowExceptionInCreate() — Get throw exceptions in create
- has() — Determine if an instance exists.
- hasAlias() — Determine if we have an alias
- retrieveFromPeeringManagerFirst() — Should we retrieve from the peering manager prior to attempting to create a service?
- setAlias()
- setAllowOverride() — Set allow override
- setCanonicalNames() — Allows to override the canonical names lookup map with predefined values.
- setFactory() — Set factory
- setInvokableClass() — Set invokable class
- setRetrieveFromPeeringManagerFirst() — Set flag indicating whether to pull from peering manager before attempting creation
- setService() — Register a service with the locator
- setThrowExceptionInCreate() — Set throw exceptions in create