Changeset 4573
- Timestamp:
- 06/27/08 23:39:41 (12 months ago)
- Location:
- branches/0.11/lib/Doctrine
- Files:
-
- 3 modified
-
Query/Abstract.php (modified) (2 diffs)
-
Record.php (modified) (1 diff)
-
Table.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/lib/Doctrine/Query/Abstract.php
r4572 r4573 1003 1003 return $result; 1004 1004 } 1005 1006 1005 1007 1006 /** … … 1064 1063 $record = $table->getRecordInstance(); 1065 1064 1066 // check (and call) preDql*() callback on the model class 1067 if (method_exists($record, $callback['callback'])) { 1068 $record->$callback['callback']($this, $component, $alias); 1069 } 1070 1071 // trigger preDql*() callback event 1065 // Trigger preDql*() callback event 1072 1066 $params = array('component`' => $component, 'alias' => $alias); 1073 1067 $event = new Doctrine_Event($record, $callback['const'], $this, $params); 1068 1069 $record->$callback['callback']($event); 1074 1070 $table->getRecordListener()->$callback['callback']($event); 1075 1071 } -
branches/0.11/lib/Doctrine/Record.php
r4503 r4573 384 384 */ 385 385 public function postInsert($event) 386 { } 387 388 /** 389 * Empty template method to provide Record classes with the ability to alter DQL select 390 * queries at runtime 391 */ 392 public function preDqlSelect($event) 393 { } 394 395 /** 396 * Empty template method to provide Record classes with the ability to alter DQL update 397 * queries at runtime 398 */ 399 public function preDqlUpdate($event) 400 { } 401 402 /** 403 * Empty template method to provide Record classes with the ability to alter DQL delete 404 * queries at runtime 405 */ 406 public function preDqlDelete($event) 386 407 { } 387 408 -
branches/0.11/lib/Doctrine/Table.php
r4508 r4573 471 471 472 472 /** 473 * Gets the record instance 473 * Gets the record instance for this table. The Doctrine_Table instance always holds at least one 474 * instance of a model so that it can be reused for several things, but primarily it is first 475 * used to instantiate all the internal in memory meta data 474 476 * 475 477 * @return object Empty instance of the record … … 477 479 public function getRecordInstance() 478 480 { 481 if ( ! $this->record) { 482 $this->record = new $this->_options['name']; 483 } 479 484 return $this->record; 480 485 }