Exemplo n.º 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $result = $this->schemaService->getAll($input->getOption('startIndex'), $input->getArgument('search'));
     $rows = [];
     foreach ($result->entry as $row) {
         $rows[] = [$row->id, $row->name];
     }
     $table = new Table($output);
     $table->setHeaders(['ID', 'Name'])->setRows($rows);
     $table->render($output);
 }
Exemplo n.º 2
0
 /**
  * Returns the GET response
  *
  * @return array|\PSX\Record\RecordInterface
  */
 protected function doGet()
 {
     return $this->schemaService->getAll($this->getParameter('startIndex', Validate::TYPE_INTEGER) ?: 0, $this->getParameter('search', Validate::TYPE_STRING) ?: null, $this->getParameter('routeId', Validate::TYPE_INTEGER) ?: null);
 }