Changeset 4316
- Timestamp:
- 04/30/08 19:17:42 (14 months ago)
- Files:
-
- 1 modified
-
branches/0.11/lib/Doctrine/Record/Abstract.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/lib/Doctrine/Record/Abstract.php
r4252 r4316 313 313 { 314 314 if ( ! is_object($tpl)) { 315 if (class_exists($tpl, true)) { 315 $className = 'Doctrine_Template_' . $tpl; 316 317 if (class_exists($className, true)) { 318 $tpl = new $className($options); 319 } else if (class_exists($tpl, true)) { 316 320 $tpl = new $tpl($options); 317 321 } else { 318 $className = 'Doctrine_Template_' . $tpl; 319 320 if ( ! class_exists($className, true)) { 321 throw new Doctrine_Record_Exception("Couldn't load plugin."); 322 } 323 324 325 $tpl = new $className($options); 322 throw new Doctrine_Record_Exception('Could not load behavior named: "' . $tpl . '"'); 326 323 } 327 324 } 328 325 329 326 if ( ! ($tpl instanceof Doctrine_Template)) { 330 throw new Doctrine_Record_Exception('Loaded pluginclass is not an istance of Doctrine_Template.');327 throw new Doctrine_Record_Exception('Loaded behavior class is not an istance of Doctrine_Template.'); 331 328 } 332 329