Zend\ServiceManager\Di\DiAbstractServiceFactory
Synopsis
class DiAbstractServiceFactory
extends DiServiceFactory
implements
AbstractFactoryInterface
{
- // Inherited constants from DiServiceFactory
- 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;
- // Inherited members from DiServiceFactory
- protected Di $di;
- protected InstanceManager $name;
- protected array $parameters;
- protected string $useServiceLocator;
- protected ServiceLocatorInterface $serviceLocator;
- // 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 createServiceWithName()
- public void canCreateServiceWithName()
- // Inherited methods from DiServiceFactory
- public void __construct()
- public createService()
- public get()
- // 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
Extends
Implements
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
- $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
- $name — \Zend\Di\InstanceManager
- $parameters — array
- $references
—
array
All the class references [dependency][source] - $serviceLocator — Zend\ServiceManager\ServiceLocatorInterface
- $useServiceLocator — string
Methods
public
- __construct() — Constructor
- canCreateServiceWithName() — {@inheritDoc}
- createServiceWithName() — {@inheritDoc}
Inherited from Zend\ServiceManager\Di\DiServiceFactory
public
- createService() — Create service
- get() — Override, as we want it to use the functionality defined in the proxy
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