Methods summary
public
|
|
public
array
|
|
public
Nette\DI\Container
|
#
addService( string $name, object $service )
Adds the service to the container.
Adds the service to the container.
Parameters
Returns
|
public
|
#
removeService( string $name )
Removes the service from the container.
Removes the service from the container.
Parameters
|
public
object
|
#
getService( string $name )
Gets the service object by name.
Gets the service object by name.
Parameters
Returns
object object
Throws
|
public
string
|
#
getServiceType( string $name )
Gets the service type by name.
Gets the service type by name.
Parameters
Returns
string string
Throws
|
public
boolean
|
#
hasService( string $name )
Does the service exist?
Parameters
Returns
boolean bool
|
public
boolean
|
#
isCreated( string $name )
Is the service created?
Parameters
Returns
boolean bool
|
public
object
|
#
createService( string $name, array $args = array() )
Creates new instance of the service.
Creates new instance of the service.
Parameters
Returns
object object
Throws
|
public
object
|
#
getByType( string $class, boolean $need = TRUE )
Resolves service by type.
Resolves service by type.
Parameters
- $class
- or interface
- $need
- exception if service doesn't exist?
Returns
object service or NULL
Throws
|
public
string[]
|
#
findByType( string $class )
Gets the service names of the specified type.
Gets the service names of the specified type.
Parameters
Returns
string[] string[]
|
public
array
|
#
findByTag( string $tag )
Gets the service names of the specified tag.
Gets the service names of the specified tag.
Parameters
Returns
array of [service name => tag attributes]
|
public
object
|
#
createInstance( string $class, array $args = array() )
Creates new instance using autowiring.
Creates new instance using autowiring.
Parameters
- $class
- class
- $args
- arguments
Returns
object object
Throws
|
public
|
#
callInjects( object $service )
Calls all methods starting with with "inject" using autowiring.
Calls all methods starting with with "inject" using autowiring.
Parameters
|
public
mixed
|
#
callMethod( $function, array $args = array() )
Calls method using autowiring.
Calls method using autowiring.
Returns
mixed mixed
|
public
mixed
|
#
expand( mixed $s )
Expands %placeholders%.
Deprecated
Parameters
Returns
mixed mixed
|
public
mixed
&
|
#
__get( string $name )
Deprecated
Parameters
Returns
mixed property value
Throws
MemberAccessException if the property is not defined.
Overrides
|
public
|
#
__set( string $name, mixed $service )
Deprecated
Parameters
- $name
- name
- $service
- value
Throws
MemberAccessException if the property is not defined or is read-only
Overrides
|
public
boolean
|
#
__isset( string $name )
Deprecated
Parameters
Returns
boolean bool
Overrides
|
public
|
#
__unset( string $name )
Deprecated
Parameters
Throws
MemberAccessException MemberAccessException
Overrides
|
public static
|
|