示例#1
0
 /**
  * @param object $helper
  * @param HelperBroker $broker
  */
 protected function registerPublicMethodsOfObjectAsHelperMethods($helper, HelperBroker $broker)
 {
     $reflection = new \ReflectionClass($helper);
     $methods = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC);
     foreach ($methods as $method) {
         $broker->addHelper($method, array($helper, $method));
     }
 }
示例#2
0
 public function getHelper($helper, $params = array())
 {
     parent::getHelper($helper, $params);
     return new $this->_helperClassName($this->_helperParams);
 }