Command/SyncParametersCommand.php
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $parameter = $input->getArgument('parameter');
        $set = $input->getOption('set');

        /** @var PairStorage $pairStorage */
        $pairStorage = $this->getContainer()->get('ongr_connections.pair_storage');

        if (isset($parameter) & !empty($parameter)) {
            $setValue = $pairStorage->get($parameter);

            $output->writeln(
                "Parameter `$parameter`: " .
                ($setValue === null ? 'has no value.' : var_export($setValue, true))
            );

            if ($set) {
                $pairStorage->set($parameter, $set);
                $output->writeln('New value written: ' . var_export($set, true));
            } else {
                $output->writeln('If you want to write new value, use --set="<new value>" option.');
            }
        }
    }
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $parameter = $input->getArgument('parameter');
        $set = $input->getOption('set');

        /** @var PairStorage $pairStorage */
        $pairStorage = $this->getContainer()->get('ongr_connections.pair_storage');

        if (isset($parameter) & !empty($parameter)) {
            $setValue = $pairStorage->get($parameter);

            $output->writeln(
                "Parameter `$parameter`: " .
                ($setValue === null ? 'has no value.' : var_export($setValue, true))
            );

            if ($set) {
                $pairStorage->set($parameter, $set);
                $output->writeln('New value written: ' . var_export($set, true));
            } else {
                $output->writeln('If you want to write new value, use --set="<new value>" option.');
            }
        }
    }
protected function execute ( InputInterface $ input , OutputInterface $ output ) { $ parameter = $ input -> getArgument ( 'parameter' ) ; $ set = $ input -> getOption ( 'set' ) ; /** @var PairStorage $pairStorage */ $ pairStorage = $ this -> getContainer ( ) -> get ( 'ongr_connections.pair_storage' ) ; if ( isset ( $ parameter ) & ! empty ( $ parameter ) ) { $ setValue = $ pairStorage -> get ( $ parameter ) ; $ output -> writeln ( "Parameter `$parameter`: " . ( $ setValue === null ? 'has no value.' : var_export ( $ setValue , true ) ) ) ; if ( $ set ) { $ pairStorage -> set ( $ parameter , $ set ) ; $ output -> writeln ( 'New value written: ' . var_export ( $ set , true ) ) ; } else { $ output -> writeln ( 'If you want to write new value, use --set="<new value>" option.' ) ; } } }
{@inheritdoc}
{