froms[] = new From($table, $alias); return $this; } /** * @return array|string[] */ protected function getFromSQL() { if (empty($this->froms)) { return []; } return [ 'FROM ' . implode( ', ', array_map(function (From $from) { if ($from->alias) { return DB::prepare( '%1s AS %2s', $from->table, $from->alias ); } return DB::prepare('%1s', $from->table); }, $this->froms) ) ]; } }