diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-09-01 16:40:50 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-09-01 16:40:50 +0200 |
commit | 0aba549e7f11e1035fa7a2e880803b47cbadd919 (patch) | |
tree | f2ba9c9cd15a555e2864764824d96b362653dbe6 /core | |
parent | 92e90c8eb995c886b3e9cd77c14e3f0b25b95cd7 (diff) | |
download | nextcloud-server-0aba549e7f11e1035fa7a2e880803b47cbadd919.tar.gz nextcloud-server-0aba549e7f11e1035fa7a2e880803b47cbadd919.zip |
Use more object oriented way for console commands
Diffstat (limited to 'core')
-rw-r--r-- | core/command/status.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/core/command/status.php b/core/command/status.php new file mode 100644 index 00000000000..601780257e4 --- /dev/null +++ b/core/command/status.php @@ -0,0 +1,30 @@ +<?php + +namespace OC\Core\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; + +class Status extends Command +{ + protected function configure() + { + $this + ->setName('status') + ->setDescription('show some status information') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $values = array( + 'installed' => \OC_Config::getValue('installed') ? 'true' : 'false', + 'version' => implode('.', \OC_Util::getVersion()), + 'versionstring' => \OC_Util::getVersionString(), + 'edition' => \OC_Util::getEditionString()); + print_r($values); + } +} |