Changeset 4494

Show
Ignore:
Timestamp:
06/08/08 20:34:31 (13 months ago)
Author:
guilhermeblanco
Message:

Fixed #1115. getInvoker() now returns the table class of component.

Location:
branches/0.11/lib/Doctrine
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/0.11/lib/Doctrine/Event.php

    r4433 r4494  
    313313 
    314314    /** 
     315     * setInvoker 
     316     * Defines new invoker (used in Hydrator) 
     317     * 
     318     * @param mixed $invoker 
     319     * @return void 
     320     */ 
     321    public function setInvoker($invoker) 
     322    { 
     323        $this->_invoker = $invoker; 
     324    } 
     325 
     326 
     327    /** 
    315328     * getParams 
    316329     * returns the parameters of the query 
  • branches/0.11/lib/Doctrine/Hydrator.php

    r4415 r4494  
    7474        } 
    7575 
    76         $event = new Doctrine_Event(null, Doctrine_Event::HYDRATE, null); 
    77  
    7876        // Used variables during hydration 
    7977        reset($this->_queryComponents); 
     
    112110        } 
    113111 
     112        $event = new Doctrine_Event(null, Doctrine_Event::HYDRATE, null); 
     113 
    114114        // Process result set 
    115115        $cache = array(); 
     
    124124            $table = $this->_queryComponents[$rootAlias]['table']; 
    125125            $componentName = $table->getComponentName(); 
     126            // Ticket #1115 (getInvoker() should return the component that has addEventListener) 
     127            $event->setInvoker($table); 
    126128            $event->set('data', $rowData[$rootAlias]); 
    127129            $listeners[$componentName]->preHydrate($event);