Changeset 4364 for trunk/lib/Doctrine.php
- Timestamp:
- 05/13/08 22:20:34 (8 months ago)
- Files:
-
- 1 modified
-
trunk/lib/Doctrine.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Doctrine.php
r4225 r4364 290 290 * FETCHMODE_RECORD 291 291 * 292 * Specifies that the fetch method shall return Doctrine_ Record292 * Specifies that the fetch method shall return Doctrine_Entity 293 293 * objects as the elements of the result set. 294 294 * … … 472 472 */ 473 473 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 474 482 475 483 /** … … 710 718 * Get all the loaded models, you can provide an array of classes or it will use get_declared_classes() 711 719 * 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_ Records720 * 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 714 722 * 715 723 * @return array $loadedModels … … 748 756 * isValidModelClass 749 757 * 750 * Checks if what is passed is a valid Doctrine_ Record758 * Checks if what is passed is a valid Doctrine_Entity 751 759 * Will load class in to memory in order to inflect it and find out information about the class 752 760 * … … 756 764 public static function isValidModelClass($class) 757 765 { 758 if ($class instanceof Doctrine_ Record) {766 if ($class instanceof Doctrine_Entity) { 759 767 $class = get_class($class); 760 768 } … … 767 775 // Skip the following classes 768 776 // - abstract classes 769 // - not a subclass of Doctrine_ Record777 // - not a subclass of Doctrine_Entity 770 778 // - don't have a setTableDefinition method 771 779 if (!$class->isAbstract() && 772 $class->isSubClassOf('Doctrine_ Record')) {780 $class->isSubClassOf('Doctrine_Entity')) { 773 781 774 782 return true; … … 806 814 * generateModelsFromDb 807 815 * 808 * method for importing existing schema to Doctrine_ Recordclasses816 * method for importing existing schema to Doctrine_Entity classes 809 817 * 810 818 * @param string $directory Directory to write your models to