Changeset 1022

Show
Ignore:
Timestamp:
02/06/07 20:49:28 (2 years ago)
Author:
zYne
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/Doctrine/Db/Statement.php

    r1002 r1022  
    236236                          $cursorOffset = null) 
    237237    { 
    238         return $this->stmt->fetch($fetchStyle, $cursorOrientation, $cursorOffset); 
     238        $event = new Doctrine_Db_Event($this, Doctrine_Db_Event::FETCHALL, $this->stmt->queryString,  
     239                                       array($fetchStyle, $cursorOrientation, $cursorOffset)); 
     240 
     241        $data = $this->adapter->getListener()->onPreFetch($event); 
     242 
     243        if ($data === null) { 
     244            $data = $this->stmt->fetch($fetchStyle, $cursorOrientation, $cursorOffset); 
     245        } 
     246         
     247        $this->adapter->getListener()->onFetch($event); 
     248     
     249        return $data; 
    239250    } 
    240251    /**