Show
Ignore:
Timestamp:
05/13/08 22:20:34 (8 months ago)
Author:
romanb
Message:

Doctrine_Record renamed. Hydration refactored. Other refactorings.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/Doctrine.php

    r4225 r4364  
    290290     * FETCHMODE_RECORD 
    291291     * 
    292      * Specifies that the fetch method shall return Doctrine_Record 
     292     * Specifies that the fetch method shall return Doctrine_Entity 
    293293     * objects as the elements of the result set. 
    294294     * 
     
    472472     */ 
    473473    const HYDRATE_NONE              = 4; 
     474     
     475    /* new hydration modes. move to Query class when it's time. */ 
     476    //const HYDRATE_IDENTITY_OBJECT = 1; // default, auto-adds PKs, produces object graphs 
     477    //const HYDRATE_IDENTITY_ARRAY = 2; // auto-adds PKs, produces array graphs 
     478    //const HYDRATE_SCALAR = 3; // produces flat result list with scalar values 
     479    //const HYDRATE_SINGLE_SCALAR = 4; // produces a single scalar value 
     480    //const HYDRATE_NONE = 5; // produces a result set as it's returned by the db 
     481     
    474482 
    475483    /** 
     
    710718     * Get all the loaded models, you can provide an array of classes or it will use get_declared_classes() 
    711719     * 
    712      * Will filter through an array of classes and return the Doctrine_Records out of them. 
    713      * If you do not specify $classes it will return all of the currently loaded Doctrine_Records 
     720     * Will filter through an array of classes and return the Doctrine_Entitys out of them. 
     721     * If you do not specify $classes it will return all of the currently loaded Doctrine_Entitys 
    714722     * 
    715723     * @return array   $loadedModels 
     
    748756     * isValidModelClass 
    749757     * 
    750      * Checks if what is passed is a valid Doctrine_Record 
     758     * Checks if what is passed is a valid Doctrine_Entity 
    751759     * Will load class in to memory in order to inflect it and find out information about the class 
    752760     * 
     
    756764    public static function isValidModelClass($class) 
    757765    { 
    758         if ($class instanceof Doctrine_Record) { 
     766        if ($class instanceof Doctrine_Entity) { 
    759767            $class = get_class($class); 
    760768        } 
     
    767775            // Skip the following classes 
    768776            // - abstract classes 
    769             // - not a subclass of Doctrine_Record 
     777            // - not a subclass of Doctrine_Entity 
    770778            // - don't have a setTableDefinition method 
    771779            if (!$class->isAbstract() && 
    772                 $class->isSubClassOf('Doctrine_Record')) { 
     780                $class->isSubClassOf('Doctrine_Entity')) { 
    773781 
    774782                return true; 
     
    806814     * generateModelsFromDb 
    807815     * 
    808      * method for importing existing schema to Doctrine_Record classes 
     816     * method for importing existing schema to Doctrine_Entity classes 
    809817     * 
    810818     * @param string $directory Directory to write your models to