Changeset 7639
- Timestamp:
- 02/27/08 22:29:45 (1 year ago)
- Files:
-
- branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/database/sfPropelDataRetriever.class.php (modified) (2 diffs)
- branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/sfPropelData.class.php (modified) (2 diffs)
- branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/sfPropelPager.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/database/sfPropelDataRetriever.class.php
r5231 r7639 21 21 static public function retrieveObjects($class, $peerMethod = null) 22 22 { 23 if (!$classPath = sfAutoload::getInstance()->getClassPath($class.'Peer'))24 {25 throw new sfException(sprintf('Unable to find path for class "%s".', $class.'Peer'));26 }27 28 require_once($classPath);29 30 23 if (!$peerMethod) 31 24 { … … 40 33 } 41 34 42 $objects = call_user_func(array($classPeer, $peerMethod), new Criteria()); 43 44 return $objects; 35 return call_user_func(array($classPeer, $peerMethod), new Criteria()); 45 36 } 46 37 } branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/sfPropelData.class.php
r7614 r7639 81 81 $class = trim($class); 82 82 83 $peer_class = $class.'Peer'; 84 85 $tableMap = $this->dbMap->getTable(constant($peer_class.'::TABLE_NAME')); 86 87 $column_names = call_user_func_array(array($peer_class, 'getFieldNames'), array(BasePeer::TYPE_FIELDNAME)); 83 $tableMap = $this->dbMap->getTable(constant($class.'Peer::TABLE_NAME')); 84 85 $column_names = call_user_func_array(array($class.'Peer', 'getFieldNames'), array(BasePeer::TYPE_FIELDNAME)); 88 86 89 87 // iterate through datas for this class … … 248 246 } 249 247 250 $peer_class = $class.'Peer'; 251 252 if (!$classPath = sfAutoload::getInstance()->getClassPath($peer_class)) 253 { 254 throw new sfException(sprintf('Unable to find path for class "%s".', $peer_class)); 255 } 256 257 require_once($classPath); 258 259 call_user_func(array($peer_class, 'doDeleteAll'), $this->con); 248 call_user_func(array($class.'Peer', 'doDeleteAll'), $this->con); 260 249 261 250 $this->deletedClasses[] = $class; branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/sfPropelPager.class.php
r6970 r7639 43 43 $cForCount->clearGroupByColumns(); 44 44 45 // require the model class (because autoloading can crash under some conditions)46 if (!$classPath = sfAutoload::getInstance()->getClassPath($this->getClassPeer()))47 {48 throw new sfException(sprintf('Unable to find path for class "%s".', $this->getClassPeer()));49 }50 require_once($classPath);51 45 $count = call_user_func(array($this->getClassPeer(), $this->getPeerCountMethod()), $cForCount); 52 46

