phpbb\di\container_builder::with_config_path PHP Method

with_config_path() public method

Set a custom path to find the configuration of the container.
public with_config_path ( string $config_path )
$config_path string
    public function with_config_path($config_path)
    {
        $this->config_path = $config_path;
        return $this;
    }

Usage Example

Beispiel #1
0
 public function test_with_config_path()
 {
     $this->builder->with_config_path($this->phpbb_root_path . 'fixtures/other_config/');
     $container = $this->builder->get_container();
     $this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\ContainerBuilder', $container);
     $this->assertTrue($container->hasParameter('other_config'));
     $this->assertFalse($container->hasParameter('core'));
 }