aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console
diff options
context:
space:
mode:
authorCarlo <carlo@phpbbitalia.net>2014-07-15 16:07:52 +0200
committerCarlo <carlo@phpbbitalia.net>2014-07-15 16:07:52 +0200
commit7cffedf5e310e0cde9bfd541ca835a4fedf26ef3 (patch)
tree8a858aa91d95e9fa984adde8e09f4cbcf46f9dff /phpBB/phpbb/console
parent3eafeeb88d173bc4f2b082ee5f09f85bef931ec9 (diff)
downloadforums-7cffedf5e310e0cde9bfd541ca835a4fedf26ef3.tar
forums-7cffedf5e310e0cde9bfd541ca835a4fedf26ef3.tar.gz
forums-7cffedf5e310e0cde9bfd541ca835a4fedf26ef3.tar.bz2
forums-7cffedf5e310e0cde9bfd541ca835a4fedf26ef3.tar.xz
forums-7cffedf5e310e0cde9bfd541ca835a4fedf26ef3.zip
[ticket/12685] Override getDefaultInputDefinition()
PHPBB3-12685
Diffstat (limited to 'phpBB/phpbb/console')
-rw-r--r--phpBB/phpbb/console/application.php26
1 files changed, 18 insertions, 8 deletions
diff --git a/phpBB/phpbb/console/application.php b/phpBB/phpbb/console/application.php
index b08346b8fa..bc4897af18 100644
--- a/phpBB/phpbb/console/application.php
+++ b/phpBB/phpbb/console/application.php
@@ -37,9 +37,26 @@ class application extends \Symfony\Component\Console\Application
*/
public function __construct($name, $version, \phpbb\user $user)
{
+ $this->user = $user;
+
parent::__construct($name, $version);
+ }
- $this->user = $user;
+ /**
+ * {@inheritdoc}
+ */
+ protected function getDefaultInputDefinition()
+ {
+ $input_definition = parent::getDefaultInputDefinition();
+
+ $input_definition->addOption(new InputOption(
+ 'safe-mode',
+ null,
+ InputOption::VALUE_NONE,
+ $this->user->lang('CLI_DESCRIPTION_OPTION_SAFE_MODE')
+ ));
+
+ return $input_definition;
}
/**
@@ -66,13 +83,6 @@ class application extends \Symfony\Component\Console\Application
$this->user->lang('CLI_DESCRIPTION_OPTION_SHELL')
));
- $this->getDefinition()->addOption(new InputOption(
- '--safe-mode',
- null,
- InputOption::VALUE_NONE,
- $this->user->lang('CLI_DESCRIPTION_OPTION_SAFE_MODE')
- ));
-
return parent::getHelp();
}