Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • none

Classes

Interfaces

Exceptions

  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class DIContainerBuilder

Basic container builder.

Object
Extended by DIContainerBuilder
Package: Nette\DI
Author: David Grudl
Located at DI/ContainerBuilder.php
Methods summary
public DIServiceDefinition
# addDefinition( string $name )

Adds new service definition. The expressions %param% and @service will be expanded.

Adds new service definition. The expressions %param% and @service will be expanded.

Parameters

$name
string

Returns

DIServiceDefinition
public
# removeDefinition( string $name )

Removes the specified service definition.

Removes the specified service definition.

Parameters

$name
string
public DIServiceDefinition
# getDefinition( string $name )

Gets the service definition.

Gets the service definition.

Parameters

$name
string

Returns

DIServiceDefinition
public array
# getDefinitions( )

Gets all service definitions.

Gets all service definitions.

Returns

array
public boolean
# hasDefinition( string $name )

Does the service definition exist?

Does the service definition exist?

Parameters

$name
string

Returns

boolean
public string
# getByType( string $class )

Resolves service name by type.

Resolves service name by type.

Parameters

$class
string
class or interface

Returns

string
service name or NULL

Throws

ServiceCreationException
public array
# findByTag( string $tag )

Gets the service objects of the specified tag.

Gets the service objects of the specified tag.

Parameters

$tag
string

Returns

array
of [service name => tag attributes]
public array
# autowireArguments( $class, $method, array $arguments )

Creates a list of arguments using autowiring.

Creates a list of arguments using autowiring.

Returns

array
public DIContainerBuilder
# addDependency( $file )

Adds a file to the list of dependencies.

Adds a file to the list of dependencies.

Returns

DIContainerBuilder
public array
# getDependencies( )

Returns the list of dependent files.

Returns the list of dependent files.

Returns

array
public PhpClassType
# generateClass( $parentClass = 'DIContainer' )

Generates PHP class.

Generates PHP class.

Returns

PhpClassType
public mixed
# expand( $value )

Expands %placeholders% in strings (recursive).

Expands %placeholders% in strings (recursive).

Returns

mixed
Methods inherited from Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants summary
string CREATED_SERVICE 'self'
#
string THIS_CONTAINER 'container'
#
Properties summary
public array $parameters array()
#

%param% will be expanded

%param% will be expanded

Magic properties summary
public read-only array $dependencies
#
Magic properties inherited from Object
$reflection
Nette Framework 2.0.18 (for PHP 5.2, un-prefixed) API documentation generated by ApiGen 2.8.0