public function resolveTable(string $name)
    {
        if (!empty($name) && is_string($name))
        {
            if (isset($this->aliases[$name]))
                return array($this->aliases[$name], $name);

            if (isset($this->tables[$name]))
            {
                if (count($this->tables[$name]) === 1)
                    return array($name, null);
                throw new QueryException("Multiple references to $name, use the appropriate alias");
            }

            if (!empty($this->parent_scope))
                return $this->parent_scope->resolveTable($name);

            throw new QueryException("Unknown source table $name");
        }

        throw new QueryException("No table identifier provided");
    }
public function resolveTable(string $name)
    {
        if (!empty($name) && is_string($name))
        {
            if (isset($this->aliases[$name]))
                return array($this->aliases[$name], $name);

            if (isset($this->tables[$name]))
            {
                if (count($this->tables[$name]) === 1)
                    return array($name, null);
                throw new QueryException("Multiple references to $name, use the appropriate alias");
            }

            if (!empty($this->parent_scope))
                return $this->parent_scope->resolveTable($name);

            throw new QueryException("Unknown source table $name");
        }

        throw new QueryException("No table identifier provided");
    }
public function resolveTable ( string $ name ) { if ( ! empty ( $ name ) && is_string ( $ name ) ) { if ( isset ( $ this -> aliases [ $ name ] ) ) return array ( $ this -> aliases [ $ name ] , $ name ) ; if ( isset ( $ this -> tables [ $ name ] ) ) { if ( count ( $ this -> tables [ $ name ] ) === 1 ) return array ( $ name , null ) ; throw new QueryException ( "Multiple references to $name, use the appropriate alias" ) ; } if ( ! empty ( $ this -> parent_scope ) ) return $ this -> parent_scope -> resolveTable ( $ name ) ; throw new QueryException ( "Unknown source table $name" ) ; } throw new QueryException ( "No table identifier provided" ) ; }
Find a table by its name
@param string $name The name of the table
@return TableClause The table searched for - can be from an outer scope
Find a table by its name