/** * Returns the compiled query. * * @access public * @return array */ public function get() { $query = $this->query->getCompiler()->select(); $query['sql'] = '(' . $query['sql'] . ')'; if ($this->alias !== null) { $query['sql'] .= ' AS ' . $this->query->getCompiler()->wrap($this->alias); } return $query; }