container_builder
class container_builder
Properties
protected string | $environment | ||
protected string | $phpbb_root_path | ||
protected string | $php_ext | ||
protected ContainerBuilder | $container | The container under construction |
|
protected driver_interface | $dbal_connection | ||
protected bool | $use_extensions | Indicates whether extensions should be used (default to true). |
|
protected string | $config_path | Defines a custom path to find the configuration of the container (default to $this->phpbb_root_path . 'config') |
|
protected bool | $use_cache | Indicates whether the container should be dumped to the filesystem (default to true). |
|
protected bool | $compile_container | Indicates if the container should be compiled automatically (default to true). |
|
protected array | $custom_parameters | Custom parameters to inject into the container. |
|
protected config_php_file | $config_php_file | ||
protected string | $cache_dir |
Methods
Constructor
Build and return a new Container respecting the current configuration
Enable the extensions.
Enable the extensions.
Disable the extensions.
Enable the caching of the container.
Disable the caching of the container.
Set the cache directory.
Enable the compilation of the container.
Disable the compilation of the container.
Set a custom path to find the configuration of the container.
Set custom parameters to inject into the container.
Returns the path to the container configuration (default: root_path/config)
Returns the path to the cache directory (default: root_path/cache/environment).
Load the enabled extensions.
Dump the container to the disk.
Create the ContainerBuilder object
Inject the customs parameters into the container
Inject the dbal connection driver into container
Returns the core parameters.
Gets the environment parameters.
Get the filename under which the dumped container will be stored.
Get the filename under which the dumped extensions autoloader will be stored.
Return the name of the current environment.
Details
at line 130
__construct(string $phpbb_root_path, string $php_ext)
Constructor
at line 147
phpbb_cache_container|ContainerBuilder
get_container()
Build and return a new Container respecting the current configuration
at line 275
$this
with_environment(string $environment)
Enable the extensions.
at line 287
$this
with_extensions()
Enable the extensions.
at line 299
$this
without_extensions()
Disable the extensions.
at line 313
$this
with_cache()
Enable the caching of the container.
If DEBUG_CONTAINER is set this option is ignored and a new container is build.
at line 325
$this
without_cache()
Disable the caching of the container.
at line 338
$this
with_cache_dir(string $cache_dir)
Set the cache directory.
at line 350
$this
with_compiled_container()
Enable the compilation of the container.
at line 362
$this
without_compiled_container()
Disable the compilation of the container.
at line 375
$this
with_config_path(string $config_path)
Set a custom path to find the configuration of the container.
at line 388
$this
with_custom_parameters(array $custom_parameters)
Set custom parameters to inject into the container.
at line 401
$this
with_config(config_php_file $config_php_file)
Set custom parameters to inject into the container.
at line 413
protected string
get_config_path()
Returns the path to the container configuration (default: root_path/config)
at line 423
string
get_cache_dir()
Returns the path to the cache directory (default: root_path/cache/environment).
at line 431
protected
load_extensions()
Load the enabled extensions.
at line 499
protected
dump_container(ConfigCache $cache)
Dump the container to the disk.
at line 526
protected ContainerBuilder
create_container(array $extensions)
Create the ContainerBuilder object
at line 547
protected
inject_custom_parameters()
Inject the customs parameters into the container
at line 558
protected
inject_dbal_driver()
Inject the dbal connection driver into container
at line 592
protected array
get_core_parameters()
Returns the core parameters.
at line 613
protected array
get_env_parameters()
Gets the environment parameters.
Only the parameters starting with "PHPBB__" are considered.
at line 632
protected string
get_container_filename()
Get the filename under which the dumped container will be stored.
at line 648
protected string
get_autoload_filename()
Get the filename under which the dumped extensions autoloader will be stored.
at line 664
protected string
get_environment()
Return the name of the current environment.