Platformsh\Cli\CliConfig::get PHP Method

get() public method

public get ( string $name ) : mixed
$name string
return mixed
    public function get($name)
    {
        $value = Util::getNestedArrayValue(self::$config, explode('.', $name), $exists);
        if (!$exists) {
            throw new \RuntimeException('Configuration not defined: ' . $name);
        }
        return $value;
    }

Usage Example

 /**
  * @inheritdoc
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if (null === $this->command) {
         $this->command = $this->getApplication()->find($input->getArgument('command_name'));
     }
     $config = new CliConfig();
     $helper = new DescriptorHelper();
     $helper->register('txt', new CustomTextDescriptor($config->get('application.executable')));
     $helper->register('md', new CustomMarkdownDescriptor($config->get('application.executable')));
     $helper->describe($output, $this->command, ['format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw')]);
 }
All Usage Examples Of Platformsh\Cli\CliConfig::get