tables = $tables; return $this; } public function add(/* array|string */ $table) : self { foreach((array) $table as $alias => $name) { $this->tables[$alias] = $name; } return $this; } public function render() : string { return $this->renderSegments([ 'FROM', $this->renderTables(), ]); } protected function renderTables() : string { $list = []; foreach((array) $this->tables as $alias => $table) { $list[] = ! is_numeric($alias) ? "$table $alias" : $table; } return implode(", ", $list); } }