| @@ 74-100 (lines=27) @@ | ||
| 71 | /** |
|
| 72 | * Configures the current command. |
|
| 73 | */ |
|
| 74 | protected function configure() |
|
| 75 | { |
|
| 76 | $this |
|
| 77 | ->setName('browscap:fetch') |
|
| 78 | ->setDescription('Fetches an updated INI file for Browscap.') |
|
| 79 | ->addArgument( |
|
| 80 | 'file', |
|
| 81 | InputArgument::OPTIONAL, |
|
| 82 | 'browscap.ini file', |
|
| 83 | $this->defaultIniFile |
|
| 84 | ) |
|
| 85 | ->addOption( |
|
| 86 | 'remote-file', |
|
| 87 | 'r', |
|
| 88 | InputOption::VALUE_OPTIONAL, |
|
| 89 | 'browscap.ini file to download from remote location (possible values are: ' . IniLoader::PHP_INI_LITE |
|
| 90 | . ', ' . IniLoader::PHP_INI . ', ' . IniLoader::PHP_INI_FULL . ')', |
|
| 91 | IniLoader::PHP_INI |
|
| 92 | ) |
|
| 93 | ->addOption( |
|
| 94 | 'debug', |
|
| 95 | 'd', |
|
| 96 | InputOption::VALUE_NONE, |
|
| 97 | 'Should the debug mode entered?' |
|
| 98 | ) |
|
| 99 | ; |
|
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| 103 | * @param InputInterface $input |
|
| @@ 75-101 (lines=27) @@ | ||
| 72 | /** |
|
| 73 | * Configures the current command. |
|
| 74 | */ |
|
| 75 | protected function configure() |
|
| 76 | { |
|
| 77 | $this |
|
| 78 | ->setName('browscap:update') |
|
| 79 | ->setDescription('Fetches an updated INI file for Browscap and overwrites the current PHP file.') |
|
| 80 | ->addOption( |
|
| 81 | 'remote-file', |
|
| 82 | 'r', |
|
| 83 | InputOption::VALUE_OPTIONAL, |
|
| 84 | 'browscap.ini file to download from remote location (possible values are: ' . IniLoader::PHP_INI_LITE |
|
| 85 | . ', ' . IniLoader::PHP_INI . ', ' . IniLoader::PHP_INI_FULL . ')', |
|
| 86 | IniLoader::PHP_INI |
|
| 87 | ) |
|
| 88 | ->addOption( |
|
| 89 | 'no-backup', |
|
| 90 | null, |
|
| 91 | InputOption::VALUE_NONE, |
|
| 92 | 'Do not backup the previously existing file' |
|
| 93 | ) |
|
| 94 | ->addOption( |
|
| 95 | 'debug', |
|
| 96 | 'd', |
|
| 97 | InputOption::VALUE_NONE, |
|
| 98 | 'Should the debug mode entered?' |
|
| 99 | ) |
|
| 100 | ; |
|
| 101 | } |
|
| 102 | ||
| 103 | /** |
|
| 104 | * @param InputInterface $input |
|
| @@ 75-95 (lines=21) @@ | ||
| 72 | /** |
|
| 73 | * Configures the current command. |
|
| 74 | */ |
|
| 75 | protected function configure() |
|
| 76 | { |
|
| 77 | $this |
|
| 78 | ->setName('browscap:check-update') |
|
| 79 | ->setDescription('Checks if an updated INI file is available.') |
|
| 80 | ->addOption( |
|
| 81 | 'debug', |
|
| 82 | 'd', |
|
| 83 | InputOption::VALUE_NONE, |
|
| 84 | 'Should the debug mode entered?' |
|
| 85 | ) |
|
| 86 | ->addOption( |
|
| 87 | 'remote-file', |
|
| 88 | 'r', |
|
| 89 | InputOption::VALUE_OPTIONAL, |
|
| 90 | 'browscap.ini file to download from remote location (possible values are: ' . IniLoader::PHP_INI_LITE |
|
| 91 | . ', ' . IniLoader::PHP_INI . ', ' . IniLoader::PHP_INI_FULL . ')', |
|
| 92 | IniLoader::PHP_INI |
|
| 93 | ) |
|
| 94 | ; |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * @param InputInterface $input |
|