Beispiel #1
0
 /**
  * Display the data of a table
  *
  * @param      string  $command  The command passed by the user with its arguments
  */
 private function showTable(string $command)
 {
     $args = $this->getArgs($command);
     $data = null;
     if ($this->checkTableName($args)) {
         if (isset($args['s']) && isset($args['e']) && is_numeric($args['s']) && is_numeric($args['e'])) {
             $data = DB::showTable($args['t'], $args['s'], $args['e']);
         } else {
             $data = DB::showTable($args['t']);
         }
     }
     if ($data !== null) {
         static::out(static::prettySqlResult($args['t'], $data) . PHP_EOL);
     }
 }