示例#1
0
文件: Web.php 项目: hovenko/Madcow
 /**
  * Returns an autodetected path to a template based on
  * the private path of the given action.
  *
  * @param DF_Web_Action $action
  * @return string
  */
 protected static function template_from_action($action)
 {
     if (!$action instanceof DF_Web_Action) {
         throw new DF_Error_InvalidArgumentException('action', $action, DF_Web_Action);
     }
     $template = sprintf('%s.tpl', $action->get_private_path());
     return $template;
 }