PHP Класс phpbb\di\container_builder

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$cache_dir string
$compile_container boolean Indicates if the container should be compiled automatically (default to true).
$config_path string Defines a custom path to find the configuration of the container (default to $this->phpbb_root_path . 'config')
$config_php_file phpbb\config_php_file
$container Symfony\Component\DependencyInjection\ContainerBuilder The container under construction
$custom_parameters array Default to: array( 'core.root_path', $this->phpbb_root_path, 'core.php_ext', $this->php_ext, );
$environment The environment to use.
$php_ext php file extension
$phpbb_root_path phpBB Root Path
$use_cache boolean If DEBUG_CONTAINER is set this option is ignored and a new container is build.
$use_extensions boolean Indicates whether extensions should be used (default to true).

Открытые методы

Метод Описание
__construct ( string $phpbb_root_path, string $php_ext ) Constructor
get_container ( ) : phpbb_cache_container | ContainerBuilder Build and return a new Container respecting the current configuration
with_cache ( ) Enable the caching of the container.
with_cache_dir ( string $cache_dir ) Set the cache directory.
with_compiled_container ( ) Enable the compilation of the container.
with_config ( phpbb\config_php_file $config_php_file ) Set custom parameters to inject into the container.
with_config_path ( string $config_path ) Set a custom path to find the configuration of the container.
with_custom_parameters ( array $custom_parameters ) Set custom parameters to inject into the container.
with_environment ( string $environment ) Enable the extensions.
with_extensions ( ) Enable the extensions.
without_cache ( ) Disable the caching of the container.
without_compiled_container ( ) Disable the compilation of the container.
without_extensions ( ) Disable the extensions.

Защищенные методы

Метод Описание
create_container ( array $extensions ) : ContainerBuilder Create the ContainerBuilder object
dump_container ( Symfony\Component\Config\ConfigCache $cache ) Dump the container to the disk.
get_cache_dir ( ) : string Returns the path to the cache directory (default: root_path/cache/environment).
get_config_path ( ) : string Returns the path to the container configuration (default: root_path/config)
get_container_filename ( ) : string Get the filename under which the dumped container will be stored.
get_core_parameters ( ) : array Returns the core parameters.
get_env_parameters ( ) : array Gets the environment parameters.
get_environment ( ) : string Return the name of the current environment.
inject_custom_parameters ( ) Inject the customs parameters into the container
load_extensions ( ) Load the enabled extensions.

Описание методов

__construct() публичный Метод

Constructor
public __construct ( string $phpbb_root_path, string $php_ext )
$phpbb_root_path string Path to the phpbb includes directory.
$php_ext string php file extension

create_container() защищенный Метод

Create the ContainerBuilder object
protected create_container ( array $extensions ) : ContainerBuilder
$extensions array Array of Container extension objects
Результат Symfony\Component\DependencyInjection\ContainerBuilder object

dump_container() защищенный Метод

Dump the container to the disk.
protected dump_container ( Symfony\Component\Config\ConfigCache $cache )
$cache Symfony\Component\Config\ConfigCache The config cache

get_cache_dir() защищенный Метод

Returns the path to the cache directory (default: root_path/cache/environment).
protected get_cache_dir ( ) : string
Результат string Path to the cache directory.

get_config_path() защищенный Метод

Returns the path to the container configuration (default: root_path/config)
protected get_config_path ( ) : string
Результат string

get_container() публичный Метод

Build and return a new Container respecting the current configuration
public get_container ( ) : phpbb_cache_container | ContainerBuilder
Результат phpbb_cache_container | Symfony\Component\DependencyInjection\ContainerBuilder

get_container_filename() защищенный Метод

Get the filename under which the dumped container will be stored.
protected get_container_filename ( ) : string
Результат string Path for dumped container

get_core_parameters() защищенный Метод

Returns the core parameters.
protected get_core_parameters ( ) : array
Результат array An array of core parameters

get_env_parameters() защищенный Метод

Only the parameters starting with "PHPBB__" are considered.
protected get_env_parameters ( ) : array
Результат array An array of parameters

get_environment() защищенный Метод

Return the name of the current environment.
protected get_environment ( ) : string
Результат string

inject_custom_parameters() защищенный Метод

Inject the customs parameters into the container
protected inject_custom_parameters ( )

load_extensions() защищенный Метод

Load the enabled extensions.
protected load_extensions ( )

with_cache() публичный Метод

If DEBUG_CONTAINER is set this option is ignored and a new container is build.
public with_cache ( )

with_cache_dir() публичный Метод

Set the cache directory.
public with_cache_dir ( string $cache_dir )
$cache_dir string The cache directory.

with_compiled_container() публичный Метод

Enable the compilation of the container.

with_config() публичный Метод

Set custom parameters to inject into the container.
public with_config ( phpbb\config_php_file $config_php_file )
$config_php_file phpbb\config_php_file

with_config_path() публичный Метод

Set a custom path to find the configuration of the container.
public with_config_path ( string $config_path )
$config_path string

with_custom_parameters() публичный Метод

Set custom parameters to inject into the container.
public with_custom_parameters ( array $custom_parameters )
$custom_parameters array

with_environment() публичный Метод

Enable the extensions.
public with_environment ( string $environment )
$environment string The environment to use

with_extensions() публичный Метод

Enable the extensions.
public with_extensions ( )

without_cache() публичный Метод

Disable the caching of the container.
public without_cache ( )

without_compiled_container() публичный Метод

Disable the compilation of the container.

without_extensions() публичный Метод

Disable the extensions.
public without_extensions ( )

Описание свойств

$cache_dir защищенное свойство

protected string $cache_dir
Результат string

$compile_container защищенное свойство

Indicates if the container should be compiled automatically (default to true).
protected bool $compile_container
Результат boolean

$config_path защищенное свойство

Defines a custom path to find the configuration of the container (default to $this->phpbb_root_path . 'config')
protected string $config_path
Результат string

$config_php_file защищенное свойство

protected config_php_file,phpbb $config_php_file
Результат phpbb\config_php_file

$container защищенное свойство

The container under construction
protected ContainerBuilder,Symfony\Component\DependencyInjection $container
Результат Symfony\Component\DependencyInjection\ContainerBuilder

$custom_parameters защищенное свойство

Default to: array( 'core.root_path', $this->phpbb_root_path, 'core.php_ext', $this->php_ext, );
protected array $custom_parameters
Результат array

$environment защищенное свойство

The environment to use.
protected $environment

$php_ext защищенное свойство

php file extension
protected $php_ext

$phpbb_root_path защищенное свойство

phpBB Root Path
protected $phpbb_root_path

$use_cache защищенное свойство

If DEBUG_CONTAINER is set this option is ignored and a new container is build.
protected bool $use_cache
Результат boolean

$use_extensions защищенное свойство

Indicates whether extensions should be used (default to true).
protected bool $use_extensions
Результат boolean