protected function execute(InputInterface $input, OutputInterface $output) { $rage4 = $this->getRage4DNS($input->getOption('credentials')); $status = $rage4->domains->createDomainVanity($input->getArgument('name'), $input->getArgument('email'), $input->getArgument('nsname'), $input->getArgument('nsprefix')); $content[] = $status->getTableRow(); $this->renderTable(Status::getTableHeaders(), $content, $output); }
protected function execute(InputInterface $input, OutputInterface $output) { $recordID = $input->getArgument('id'); $confirmation = $this->getHelperSet()->get('dialog')->askConfirmation($output, sprintf('<question>Are you sure to delete record with id %d ? (y/N)</question> ', $recordID), false); if ($input->getOption('no-interaction')) { $confirmation = true; } if (false === $confirmation) { return; } $rage4 = $this->getRage4DNS($input->getOption('credentials')); $status = $rage4->records->deleteRecord($recordID); $content[] = $status->getTableRow(); $this->renderTable(Status::getTableHeaders(), $content, $output); }
protected function execute(InputInterface $input, OutputInterface $output) { $rage4 = $this->getRage4DNS($input->getOption('credentials')); $record = new Record(); $record->setId($input->getArgument('id')); $record->setName($input->getArgument('name')); $record->setContent($input->getArgument('content')); $record->setType($input->getArgument('type')); $record->setPriority($input->getOption('priority')); $record->setFailoverEnabled($input->getOption('enable-failover') ? true : false); $record->setFailoverContent($input->getOption('failover-content')); $record->setTtl($input->getOption('ttl')); $record->setGeoRegionId($input->getOption('geozone')); $record->setGeoLock($input->getOption('lock-geo') ? true : false); $record->setGeoLong($input->getOption('geo-long')); $record->setGeoLat($input->getOption('geo-lat')); $status = $rage4->records->updateRecord($record); $content[] = $status->getTableRow(); $this->renderTable(Status::getTableHeaders(), $content, $output); }