コード例 #1
0
ファイル: ListCommand.php プロジェクト: apioo/fusio-impl
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $result = $this->connectionService->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);
 }
コード例 #2
0
ファイル: Collection.php プロジェクト: apioo/fusio-impl
 /**
  * Returns the GET response
  *
  * @return array|\PSX\Record\RecordInterface
  */
 protected function doGet()
 {
     return $this->connectionService->getAll($this->getParameter('startIndex', Validate::TYPE_INTEGER) ?: 0, $this->getParameter('search', Validate::TYPE_STRING) ?: null);
 }