Zend\Mvc\Service\DiStrictAbstractServiceFactory
Synopsis
class DiStrictAbstractServiceFactory
extends Di
implements
AbstractFactoryInterface
{
- // constants
- const USE_SL_BEFORE_DI = 'before';
- const USE_SL_AFTER_DI = 'after';
- const USE_SL_NONE = 'none';
- // Inherited constants from Di
- const RESOLVE_EAGER = 1;
- const RESOLVE_STRICT = 2;
- const METHOD_IS_OPTIONAL = 0;
- const METHOD_IS_AWARE = 1;
- const METHOD_IS_CONSTRUCTOR = 3;
- const METHOD_IS_INSTANTIATOR = 3;
- const METHOD_IS_REQUIRED = 3;
- const METHOD_IS_EAGER = 1;
- // members
- protected Di $di;
- protected string $useServiceLocator;
- protected ServiceLocatorInterface $serviceLocator;
- protected array $allowedServiceNames;
- // Inherited members from Di
- protected DefinitionList $definitions;
- protected InstanceManager $instanceManager;
- protected array $instanceContext;
- protected array $currentDependencies;
- protected array $currentAliasDependenencies;
- protected array $references;
- // methods
- public void __construct()
- public void setAllowedServiceNames()
- public array getAllowedServiceNames()
- public void createServiceWithName()
- public void get()
- public void canCreateServiceWithName()
- // Inherited methods from Di
- public void __construct()
- public void configure()
- public self setDefinitionList()
- public DefinitionList definitions()
- public Di setInstanceManager()
- public InstanceManager instanceManager()
- protected array getCallParameters()
- public object|null get()
- public object|null newInstance()
- public void injectDependencies()
- protected void handleInjectDependencies()
- protected createInstanceViaConstructor()
- protected createInstanceViaCallback()
- protected bool resolveAndCallInjectionMethodForInstance()
- protected array resolveMethodParameters()
- protected string getClass()
- protected static bool isSubclassOf()
Hierarchy
Constants
Name | Value |
---|---|
USE_SL_BEFORE_DI | 'before' |
USE_SL_AFTER_DI | 'after' |
USE_SL_NONE | 'none' |
RESOLVE_EAGER | 1 |
RESOLVE_STRICT | 2 |
METHOD_IS_OPTIONAL | 0 |
METHOD_IS_AWARE | 1 |
METHOD_IS_CONSTRUCTOR | 3 |
METHOD_IS_INSTANTIATOR | 3 |
METHOD_IS_REQUIRED | 3 |
METHOD_IS_EAGER | 1 |
Members
protected
- $allowedServiceNames — array
- $currentAliasDependenencies
—
array
All the dependenent aliases - $currentDependencies
—
array
All the class dependencies [source][dependency] - $definitions — Zend\Di\DefinitionList
- $di — Zend\Di\Di
- $instanceContext — string
- $instanceManager — Zend\Di\InstanceManager
- $references
—
array
All the class references [dependency][source] - $serviceLocator — Zend\ServiceManager\ServiceLocatorInterface
- $useServiceLocator — string
Methods
public
- __construct()
- canCreateServiceWithName() — {@inheritDoc}
- createServiceWithName() — {@inheritDoc}
- get() — Overrides Zend\Di to allow the given serviceLocator's services to be reused by Di itself
- getAllowedServiceNames()
- setAllowedServiceNames()
Inherited from Zend\Di\Di
protected
- createInstanceViaCallback() — Get an object instance from the defined callback
- createInstanceViaConstructor() — Retrieve a class instance based on class name
- getCallParameters()
- getClass() — Utility method used to retrieve the class of a particular instance. This is here to allow extending classes to override how class names are resolved
- handleInjectDependencies()
- isSubclassOf() — Checks if the object has this class as one of its parents
- resolveAndCallInjectionMethodForInstance() — This parameter will handle any injection methods and resolution of dependencies for such methods
- resolveMethodParameters() — Resolve parameters referencing other services
public
- configure() — Provide a configuration object to configure this instance
- definitions()
- get() — Lazy-load a class
- injectDependencies() — Inject dependencies
- instanceManager()
- newInstance() — Retrieve a new instance of a class
- setDefinitionList()
- setInstanceManager() — Set the instance manager