Exemple #1
0
 public static function getUrlParamsForModel(AkBaseModel $Model)
 {
     $url_function = AkInflector::underscore($Model->getModelName()) . '_params';
     if (!function_exists($url_function)) {
         throw new Exception($url_function . ' function not found for AkRouterHelper::getUrlOptionsForModel');
     }
     return $url_function($Model);
 }
Exemple #2
0
 public function __get($attribute)
 {
     if (preg_match('/^(.+)_helper$/', $attribute, $matches)) {
         $this->getHelperLoader()->instantiateHelperAsHandlerAttribute($matches[1], $matches[0]);
         if (isset($this->{$attribute})) {
             return $this->{$attribute};
         }
     }
     if (!isset($this->_dynamic_attributes[$attribute])) {
         return parent::__get($attribute);
     }
     return $this->_dynamic_attributes[$attribute];
 }