Container
class Container
The dependency injection container default implementation.
Properties
array deprecated | $parameters | ||
protected string[] | $types | ||
protected string[] | $aliases | ||
protected array[] | $tags | ||
protected array[] | $wiring |
Methods
No description
No description
No description
No description
No description
Adds the service to the container.
Removes the service from the container.
Gets the service object by name.
Gets the service object by name.
Gets the service type by name.
Does the service exist?
Is the service created?
Creates new instance of the service.
Resolves service by type.
Gets the autowired service names of the specified type.
Gets the service names of the specified type.
Gets the service names of the specified tag.
Creates new instance using autowiring.
Calls all methods starting with "inject" using autowiring.
Calls method using autowiring.
No description
No description
Details
at line 48
__construct(array $params = [])
No description
at line 58
array
getParameters()
No description
at line 64
mixed
getParameter(string|int $key)
No description
at line 73
protected array
getStaticParameters()
No description
at line 79
protected mixed
getDynamicParameter(string|int $key)
No description
at line 89
Container
addService(string $name, object $service)
Adds the service to the container.
at line 129
void
removeService(string $name)
Removes the service from the container.
at line 140
object
getService(string $name)
Gets the service object by name.
at line 158
object
getByName(string $name)
Gets the service object by name.
at line 168
string
getServiceType(string $name)
Gets the service type by name.
at line 189
bool
hasService(string $name)
Does the service exist?
at line 199
bool
isCreated(string $name)
Is the service created?
at line 214
object
createService(string $name)
Creates new instance of the service.
at line 245
object|null
getByType(string $type, bool $throw = true)
Resolves service by type.
at line 286
array
findAutowired(string $type)
internal |
Gets the autowired service names of the specified type.
at line 297
array
findByType(string $type)
Gets the service names of the specified type.
at line 310
array
findByTag(string $tag)
Gets the service names of the specified tag.
at line 336
object
createInstance(string $class, array $args = [])
Creates new instance using autowiring.
at line 356
void
callInjects(object $service)
Calls all methods starting with "inject" using autowiring.
at line 365
mixed
callMethod(callable $function, array $args = [])
Calls method using autowiring.
at line 379
static string
getMethodName(string $name)
No description
at line 389
void
initialize()
No description