PHP Class Nette\Configurator

Author: David Grudl
Inheritance: extends nette\Object
Show file Open project: nette/bootstrap Class Usage Examples

Public Properties

Property Type Description
$autowireExcludedClasses of classes which shouldn't be autowired
$defaultExtensions array
$onCompile function (Configurator $sender, DI\Compiler $compiler); Occurs after the compiler is created

Protected Properties

Property Type Description
$files [file|array, section]
$parameters array
$services array

Public Methods

Method Description
__construct ( )
addConfig ( $file ) : self Adds configuration file.
addParameters ( array $params ) : self Adds new parameters. The %params% will be expanded.
addServices ( array $services ) : self Add instances of services.
createContainer ( ) : Container Returns system DI container.
createRobotLoader ( ) : RobotLoader
detectDebugMode ( $list = NULL ) : boolean Detects debug mode by IP address.
enableDebugger ( $logDirectory = NULL, $email = NULL ) : void
generateContainer ( Compiler $compiler ) : string
isDebugMode ( ) : boolean
loadContainer ( ) : string Loads system DI container class and returns its name.
setDebugMode ( $value ) : self Set parameter %debugMode%.
setTempDirectory ( $path ) : self Sets path to temporary directory.
setTimeZone ( $timezone ) : self Sets the default timezone.

Protected Methods

Method Description
createLoader ( ) : Loader
fixCompatibility ( $config ) : array Back compatibility with < v2.3
getCacheDirectory ( )
getDefaultParameters ( ) : array

Method Details

__construct() public method

public __construct ( )

addConfig() public method

Adds configuration file.
public addConfig ( $file ) : self
return self

addParameters() public method

Adds new parameters. The %params% will be expanded.
public addParameters ( array $params ) : self
$params array
return self

addServices() public method

Add instances of services.
public addServices ( array $services ) : self
$services array
return self

createContainer() public method

Returns system DI container.
public createContainer ( ) : Container
return Nette\DI\Container

createLoader() protected method

protected createLoader ( ) : Loader
return Nette\DI\Config\Loader

createRobotLoader() public method

public createRobotLoader ( ) : RobotLoader
return Nette\Loaders\RobotLoader

detectDebugMode() public static method

Detects debug mode by IP address.
public static detectDebugMode ( $list = NULL ) : boolean
return boolean

enableDebugger() public method

public enableDebugger ( $logDirectory = NULL, $email = NULL ) : void
return void

fixCompatibility() protected method

Back compatibility with < v2.3
protected fixCompatibility ( $config ) : array
return array

generateContainer() public method

public generateContainer ( Compiler $compiler ) : string
$compiler Nette\DI\Compiler
return string

getCacheDirectory() protected method

protected getCacheDirectory ( )

getDefaultParameters() protected method

protected getDefaultParameters ( ) : array
return array

isDebugMode() public method

public isDebugMode ( ) : boolean
return boolean

loadContainer() public method

Loads system DI container class and returns its name.
public loadContainer ( ) : string
return string

setDebugMode() public method

Set parameter %debugMode%.
public setDebugMode ( $value ) : self
return self

setTempDirectory() public method

Sets path to temporary directory.
public setTempDirectory ( $path ) : self
return self

setTimeZone() public method

Sets the default timezone.
public setTimeZone ( $timezone ) : self
return self

Property Details

$autowireExcludedClasses public property

of classes which shouldn't be autowired
public $autowireExcludedClasses

$defaultExtensions public property

public array $defaultExtensions
return array

$files protected property

[file|array, section]
protected $files

$onCompile public property

function (Configurator $sender, DI\Compiler $compiler); Occurs after the compiler is created
public $onCompile

$parameters protected property

protected array $parameters
return array

$services protected property

protected array $services
return array