PHP 클래스 phpbb\di\container_builder

파일 보기 프로젝트 열기: phpbb/phpbb 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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