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')); }
protected function configure() { $registry = Registry::getInstance(); $translator = $registry->get('translator'); parent::configure(); $this->setName('user')->setDescription($translator->trans('Create/Read/Update/Delete users')); }
protected function configure() { $registry = Registry::getInstance(); $translator = $registry->get('translator'); parent::configure(); $this->setName('sys:res')->setDescription($translator->trans('Get System/Resource info')); }
protected function configure() { $registry = Registry::getInstance(); $translator = $registry->get('translator'); parent::configure(); $this->setName('sys:version')->setDescription($translator->trans('Get RouterOS software version')); }
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"); }
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"); }
protected function configure() { $registry = Registry::getInstance(); $translator = $registry->get('translator'); parent::configure(); $this->setName('sys:history')->setDescription($translator->trans('Print configuration change history')); }
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')); }
protected function configure() { $registry = Registry::getInstance(); $translator = $registry->get('translator'); parent::configure(); $this->setName('export')->setDescription($translator->trans('Export configuration of remote device')); }
protected function configure() { $registry = Registry::getInstance(); $translator = $registry->get('translator'); parent::configure(); $this->setName('sys:uptime')->setDescription($translator->trans('Get device uptime')); }
protected function configure() { $registry = Registry::getInstance(); $translator = $registry->get('translator'); parent::configure(); $this->setName('ip:fw:connection')->setDescription($translator->trans('Print active firewall connections')); }
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')); }
public function testSetGet() { $obj = new \stdClass(); $registry = Registry::getInstance(); $registry->set('obj', $obj); $newregistry = Registry::getInstance(); $getobj = $newregistry->get('obj'); $this->assertInstanceOf('stdClass', $getobj); }
<?php use Tikomatic\Registry; use Tikomatic\Config; $config = new Config(); $registry = Registry::getInstance(); $registry->set('config', $config);
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); }