src/Console/Command/BaseDatabaseCommand.php
private function getCliPath(InputInterface $input)
    {

        $filePaths = [
            __DIR__ . '/../../../config/sr-config.php',
            __DIR__ . '/../../../../../../sr-config.php',
            __DIR__ . '/../../../../../../config/sr-config.php',
        ];

        if ($input->hasOption('config')) {
            $filePaths[] = $input->getOption('config');
        }

        foreach ($filePaths as $path) {
            if (is_file($path)) {
                return $path;
            }
        }

        throw new \Exception(
            'There is not found config file.' . PHP_EOL .
            'You can pass path to file as option: -c FILE_PATH'
        );
    }
private function getCliPath(InputInterface $input)
    {

        $filePaths = [
            __DIR__ . '/../../../config/sr-config.php',
            __DIR__ . '/../../../../../../sr-config.php',
            __DIR__ . '/../../../../../../config/sr-config.php',
        ];

        if ($input->hasOption('config')) {
            $filePaths[] = $input->getOption('config');
        }

        foreach ($filePaths as $path) {
            if (is_file($path)) {
                return $path;
            }
        }

        throw new \Exception(
            'There is not found config file.' . PHP_EOL .
            'You can pass path to file as option: -c FILE_PATH'
        );
    }
private function getCliPath ( InputInterface $ input ) { $ filePaths = [ __DIR__ . '/../../../config/sr-config.php' , __DIR__ . '/../../../../../../sr-config.php' , __DIR__ . '/../../../../../../config/sr-config.php' , ] ; if ( $ input -> hasOption ( 'config' ) ) { $ filePaths [ ] = $ input -> getOption ( 'config' ) ; } foreach ( $ filePaths as $ path ) { if ( is_file ( $ path ) ) { return $ path ; } } throw new \ Exception ( 'There is not found config file.' . PHP_EOL . 'You can pass path to file as option: -c FILE_PATH' ) ; }
Returns cli-config file path
@param InputInterface $input
@return string
@throws \Exception
Returns cli - config file path