示例#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);
 }
示例#2
0
文件: base.php 项目: bermi/akelos
 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];
 }