Show
Ignore:
Timestamp:
09/28/08 19:29:10 (3 months ago)
Author:
nowelium
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/php/misc/Hermit/src/Hermit/Hermit.php

    r19836 r20152  
    55 */ 
    66class Hermit { 
     7    protected $proxy; 
    78    protected $listeners = array(); 
    89    protected $delegators = array(); 
     
    1516          $class = HermitDaoManager::get($class); 
    1617        } 
    17         $this->proxy = self::__create($class); 
     18        $proxy = self::__create($class); 
     19        $this->proxy = self::wrap($proxy, $class); 
    1820    } 
    1921    public function __call($name, $parameters = array()){ 
     
    4547        return HermitClassProxy::delegate($reflector); 
    4648    } 
     49    protected static function wrap(HermitProxy $proxy, $targetClass){ 
     50        if(HermitTransactionManager::has($targetClass)){ 
     51            return HermitTransactionManager::createProxy($proxy, $targetClass); 
     52        } 
     53        return $proxy; 
     54    } 
    4755} 
    4856