コード例 #1
0
 protected function configure()
 {
     $registry = Registry::getInstance();
     $translator = $registry->get('translator');
     parent::configure();
     $this->setName('ip:fw:address-list')->setDescription($translator->trans('Work with /ip firewall address-list lists'));
 }
コード例 #2
0
ファイル: UserCommand.php プロジェクト: joncutrer/tikomatic
 protected function configure()
 {
     $registry = Registry::getInstance();
     $translator = $registry->get('translator');
     parent::configure();
     $this->setName('user')->setDescription($translator->trans('Create/Read/Update/Delete users'));
 }
コード例 #3
0
 protected function configure()
 {
     $registry = Registry::getInstance();
     $translator = $registry->get('translator');
     parent::configure();
     $this->setName('sys:res')->setDescription($translator->trans('Get System/Resource info'));
 }
コード例 #4
0
 protected function configure()
 {
     $registry = Registry::getInstance();
     $translator = $registry->get('translator');
     parent::configure();
     $this->setName('sys:version')->setDescription($translator->trans('Get RouterOS software version'));
 }
コード例 #5
0
 protected function configure()
 {
     $registry = Registry::getInstance();
     $translator = $registry->get('translator');
     parent::configure();
     $this->setName('ip:address')->setDescription($translator->trans('Work with /ip address(es)'))->addArgument('action', InputArgument::IS_ARRAY, "enable | disable | add | remove");
 }
コード例 #6
0
 protected function configure()
 {
     $registry = Registry::getInstance();
     $translator = $registry->get('translator');
     parent::configure();
     $this->setName('sys:reboot')->setDescription($translator->trans('Reboot Router'))->addArgument('action', InputArgument::IS_ARRAY, "now | in <time> | status | cancel");
 }
コード例 #7
0
 protected function configure()
 {
     $registry = Registry::getInstance();
     $translator = $registry->get('translator');
     parent::configure();
     $this->setName('sys:history')->setDescription($translator->trans('Print configuration change history'));
 }
コード例 #8
0
 protected function configure()
 {
     $registry = Registry::getInstance();
     $translator = $registry->get('translator');
     parent::configure();
     $this->setName('user:ssh-keys')->setDescription($translator->trans('Get list of user ssh keys'));
 }
コード例 #9
0
ファイル: ExportCommand.php プロジェクト: joncutrer/tikomatic
 protected function configure()
 {
     $registry = Registry::getInstance();
     $translator = $registry->get('translator');
     parent::configure();
     $this->setName('export')->setDescription($translator->trans('Export configuration of remote device'));
 }
コード例 #10
0
 protected function configure()
 {
     $registry = Registry::getInstance();
     $translator = $registry->get('translator');
     parent::configure();
     $this->setName('sys:uptime')->setDescription($translator->trans('Get device uptime'));
 }
コード例 #11
0
 protected function configure()
 {
     $registry = Registry::getInstance();
     $translator = $registry->get('translator');
     parent::configure();
     $this->setName('ip:fw:connection')->setDescription($translator->trans('Print active firewall connections'));
 }
コード例 #12
0
ファイル: ConfigTest.php プロジェクト: joncutrer/tikomatic
 public function testSet()
 {
     $registry = Registry::getInstance();
     $testconfig = $registry->get('config');
     $this->assertEquals('en', $testconfig->get('language'));
     $testconfig->set('language', 'gb');
     $this->assertEquals('gb', $testconfig->get('language'));
 }
コード例 #13
0
ファイル: RegistryTest.php プロジェクト: joncutrer/tikomatic
 public function testSetGet()
 {
     $obj = new \stdClass();
     $registry = Registry::getInstance();
     $registry->set('obj', $obj);
     $newregistry = Registry::getInstance();
     $getobj = $newregistry->get('obj');
     $this->assertInstanceOf('stdClass', $getobj);
 }
コード例 #14
0
ファイル: config.php プロジェクト: joncutrer/tikomatic
<?php

use Tikomatic\Registry;
use Tikomatic\Config;
$config = new Config();
$registry = Registry::getInstance();
$registry->set('config', $config);
コード例 #15
0
ファイル: TikCommand.php プロジェクト: joncutrer/tikomatic
 protected function askPassword($input, $output)
 {
     $registry = Registry::getInstance();
     $translator = $registry->get('translator');
     $helper = $this->getHelper('question');
     $question = new Question($translator->trans('Password') . ':', null);
     //setHidden does not work with Phar
     //$question->setHidden(true);
     //$question->setHiddenFallback(false);
     return $helper->ask($input, $output, $question);
 }