getComponentConfig() public method

Get a component configuration (configurations from within the environment folder).
public getComponentConfig ( string $component, string $query = '', null $default = null ) : mixed | ConfigObject
$component string Component name.
$query string Query inside the component config.
$default null Default value which should be returned if query has no matches.
return mixed | Webiny\Component\Config\ConfigObject
Example #1
0
 public function testGetComponentConfigQueryDefault()
 {
     $env = Environment::getInstance();
     $env->initializeEnvironment(__DIR__ . '/../DemoApp/');
     $app = new Application($env);
     $result = $app->getComponentConfig('Router', 'Testing', 'default');
     $this->assertSame('default', $result);
 }