Show
Ignore:
Timestamp:
02/19/08 00:24:32 (11 months ago)
Author:
jwage
Message:

Merged r3834 to 0.9 and trunk. Fixed conservative model loading to actually be conservative.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/Doctrine.php

    r3754 r3835  
    690690        } 
    691691 
    692         return self::filterInvalidModels($loadedModels); 
     692        // We do not want to filter invalid models when using conservative model loading 
     693        // The filtering requires that the class be loaded and inflected in order to determine if it is  
     694        // a valid class. 
     695        if ($manager->getAttribute(Doctrine::ATTR_MODEL_LOADING) == Doctrine::MODEL_LOADING_CONSERVATIVE) { 
     696            return $loadedModels; 
     697        } else { 
     698            return self::filterInvalidModels($loadedModels); 
     699        } 
    693700    } 
    694701 
     
    715722     * 
    716723     * Filter through an array of classes and return all the classes that are valid models 
     724     * This will inflect the class, causing it to be loaded in to memory. 
    717725     * 
    718726     * @param classes  Array of classes to filter through, otherwise uses get_declared_classes() 
     
    736744     * 
    737745     * Checks if what is passed is a valid Doctrine_Record 
     746     * Will load class in to memory in order to inflect it and find out information about the class 
    738747     * 
    739748     * @param   mixed   $class Can be a string named after the class, an instance of the class, or an instance of the class reflected