/** * Compile a SQL SELECT statement from a Query instance. * * The query will be compiled according to the order of the elements specified * in the "components" property. The entire query is passed into each component * compiler for convenience. * * @param Query $query * @return string */ public final function select(Query $query) { $sql = array(); foreach ($this->components as $component) { if (!is_null($query->{$component})) { $sql[] = call_user_func(array($this, $component), $query); } } return implode(' ', Arr::without($sql, array(null, ''))); }
/** * Load the applicable routes for a given URI. * * @param string $uri * @return array */ public function load($uri) { $segments = Arr::without(explode('/', $uri), ''); return array_merge($this->nested($segments), require $this->base . 'routes' . EXT); }