Changeset 4971 for trunk/lib/Doctrine

Show
Ignore:
Timestamp:
09/23/08 03:45:02 (4 months ago)
Author:
guilhermeblanco
Message:

[2.0] Moved Doctrine_Query to definite namespace Doctrine_ORM_Query.
Fixed paths that were referring wrong namespace resolution.
Implemented more Parser and AST classes: JoinVariableDeclaration? and Join.
Fixed wrong semantical checks of IndexBy? grammar rule. They should be in IdentificationVariableDeclaration? and JoinVariableDeclaration?.

Location:
trunk/lib/Doctrine
Files:
1 added
2 removed
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/Doctrine/ORM/EntityManager.php

    r4962 r4971  
    244244    public function createQuery($dql = "") 
    245245    { 
    246         $query = new Doctrine_Query($this); 
     246        $query = new Doctrine_ORM_Query($this); 
    247247        if ( ! empty($dql)) { 
    248248            $query->setDql($dql); 
  • trunk/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php

    r4964 r4971  
    5555     * The current hydration mode. 
    5656     */ 
    57     protected $_hydrationMode = Doctrine_Query::HYDRATE_OBJECT; 
     57    protected $_hydrationMode = Doctrine_ORM_Query::HYDRATE_OBJECT; 
    5858     
    5959    protected $_nullObject; 
  • trunk/lib/Doctrine/ORM/Internal/Hydration/StandardHydrator.php

    r4967 r4971  
    9090        $stmt = $parserResult->getDatabaseStatement(); 
    9191         
    92         if ($hydrationMode == Doctrine_Query::HYDRATE_NONE) { 
     92        if ($hydrationMode == Doctrine_ORM_Query::HYDRATE_NONE) { 
    9393            return $stmt->fetchAll(PDO::FETCH_NUM); 
    9494        } 
     
    9797        $this->_queryComponents = $parserResult->getQueryComponents(); 
    9898 
    99         if ($hydrationMode == Doctrine_Query::HYDRATE_ARRAY) { 
     99        if ($hydrationMode == Doctrine_ORM_Query::HYDRATE_ARRAY) { 
    100100            $driver = new Doctrine_ORM_Internal_Hydration_ArrayDriver(); 
    101101        } else { 
     
    124124         
    125125        // Holds the resulting hydrated data structure 
    126         if ($parserResult->isMixedQuery() || $hydrationMode == Doctrine_Query::HYDRATE_SCALAR) { 
     126        if ($parserResult->isMixedQuery() || $hydrationMode == Doctrine_ORM_Query::HYDRATE_SCALAR) { 
    127127            $result = array(); 
    128128        } else { 
     
    146146        $cache = array(); 
    147147        // Evaluate HYDRATE_SINGLE_SCALAR 
    148         if ($hydrationMode == Doctrine_Query::HYDRATE_SINGLE_SCALAR) { 
     148        if ($hydrationMode == Doctrine_ORM_Query::HYDRATE_SINGLE_SCALAR) { 
    149149            $result = $stmt->fetchAll(PDO::FETCH_ASSOC); 
    150150            if (count($result) > 1 || count($result[0]) > 1) { 
     
    158158        while ($data = $stmt->fetch(PDO::FETCH_ASSOC)) { 
    159159            // Evaluate HYDRATE_SCALAR 
    160             if ($hydrationMode == Doctrine_Query::HYDRATE_SCALAR) { 
     160            if ($hydrationMode == Doctrine_ORM_Query::HYDRATE_SCALAR) { 
    161161                $result[] = $this->_gatherScalarRowData($data, $cache); 
    162162                continue;       
     
    247247                        } 
    248248                    } else if ( ! isset($baseElement[$relationAlias])) { 
    249                         if ($hydrationMode == Doctrine_Query::HYDRATE_ARRAY) { 
     249                        if ($hydrationMode == Doctrine_ORM_Query::HYDRATE_ARRAY) { 
    250250                            $baseElement[$relationAlias] = array(); 
    251251                        } else { 
     
    267267                } 
    268268                 
    269                 if ($hydrationMode == Doctrine_Query::HYDRATE_ARRAY) { 
     269                if ($hydrationMode == Doctrine_ORM_Query::HYDRATE_ARRAY) { 
    270270                    $coll =& $baseElement[$relationAlias]; 
    271271                } else { 
     
    360360                 
    361361                // Cache general information like the column name <-> field name mapping 
    362                 $e = explode(Doctrine_Query_ParserRule::SQLALIAS_SEPARATOR, $key); 
     362                $e = explode(Doctrine_ORM_Query_ParserRule::SQLALIAS_SEPARATOR, $key); 
    363363                $columnName = array_pop($e);                 
    364364                $cache[$key]['dqlAlias'] = $this->_tableAliases[ 
    365                         implode(Doctrine_Query_ParserRule::SQLALIAS_SEPARATOR, $e) 
     365                        implode(Doctrine_ORM_Query_ParserRule::SQLALIAS_SEPARATOR, $e) 
    366366                        ]; 
    367367                $classMetadata = $this->_queryComponents[$cache[$key]['dqlAlias']]['metadata']; 
     
    445445                 
    446446                // cache general information like the column name <-> field name mapping 
    447                 $e = explode(Doctrine_Query_ParserRule::SQLALIAS_SEPARATOR, $key); 
     447                $e = explode(Doctrine_ORM_Query_ParserRule::SQLALIAS_SEPARATOR, $key); 
    448448                $columnName = array_pop($e);               
    449449                $cache[$key]['dqlAlias'] = $this->_tableAliases[ 
    450                         implode(Doctrine_Query_ParserRule::SQLALIAS_SEPARATOR, $e) 
     450                        implode(Doctrine_ORM_Query_ParserRule::SQLALIAS_SEPARATOR, $e) 
    451451                        ]; 
    452452                $classMetadata = $this->_queryComponents[$cache[$key]['dqlAlias']]['metadata'];