mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-09 04:52:42 +00:00
Set console options in the same fashion for every shell/task.
This commit is contained in:
parent
8578708e76
commit
5c08c77b93
22 changed files with 470 additions and 426 deletions
|
@ -137,29 +137,25 @@ class ServerShell extends AppShell {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get and configure the optionparser.
|
||||
* Gets the option parser instance and configures it.
|
||||
*
|
||||
* @return ConsoleOptionParser
|
||||
*/
|
||||
public function getOptionParser() {
|
||||
$parser = parent::getOptionParser();
|
||||
|
||||
$parser->addOption('host', array(
|
||||
'short' => 'H',
|
||||
'help' => __d('cake_console', 'ServerHost')
|
||||
));
|
||||
$parser->addOption('port', array(
|
||||
'short' => 'p',
|
||||
'help' => __d('cake_console', 'ListenPort')
|
||||
));
|
||||
$parser->addOption('document_root', array(
|
||||
'short' => 'd',
|
||||
'help' => __d('cake_console', 'DocumentRoot')
|
||||
));
|
||||
|
||||
$parser->description(array(
|
||||
__d('cake_console', 'PHP Built-in Server for CakePHP'),
|
||||
__d('cake_console', '<warning>[WARN] Don\'t use this at the production environment</warning>'),
|
||||
__d('cake_console', '<warning>[WARN] Don\'t use this at the production environment</warning>')
|
||||
))->addOption('host', array(
|
||||
'short' => 'H',
|
||||
'help' => __d('cake_console', 'ServerHost')
|
||||
))->addOption('port', array(
|
||||
'short' => 'p',
|
||||
'help' => __d('cake_console', 'ListenPort')
|
||||
))->addOption('document_root', array(
|
||||
'short' => 'd',
|
||||
'help' => __d('cake_console', 'DocumentRoot')
|
||||
));
|
||||
|
||||
return $parser;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue