extends class Phalcon\Di
implements ArrayAccess, Phalcon\DiInterface
This is a variant of the standard Phalcon\Di. By default it automatically registers all the services provided by the framework. Thanks to this, the developer does not need to register each service individually providing a full stack framework
Phalcon\Di\FactoryDefault constructor
Sets the internal event manager
Returns the internal event manager
Registers a service in the services container
Registers an “always shared” service in the services container
Removes a service in the services container It also removes any shared instance created for the service
Attempts to register a service in the services container Only is successful if a service hasn’t been registered previously with the same name
Sets a service using a raw Phalcon\Di\Service definition
Returns a service definition without resolving
Returns a Phalcon\Di\Service instance
Resolves the service based on its configuration
Resolves a service, the resolved service is stored in the DI, subsequent requests for this service will return the same instance
Check whether the DI contains a service by a name
Check whether the last service obtained via getShared produced a fresh instance or an existing one
Return the services registered in the DI
Check if a service is registered using the array syntax
Allows to register a shared service using the array syntax
$di["request"] = new \Phalcon\Http\Request();
Allows to obtain a shared service using the array syntax
var_dump($di["request"]);
Removes a service from the services container using the array syntax
Magic method to get or set services using setters/getters
Set a default dependency injection container to be obtained into static methods
Return the latest DI created
Resets the internal default DI
© 2011–2017 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/latest/api/Phalcon_Di_FactoryDefault.html