コード例 #1
0
ファイル: Dispatcher.php プロジェクト: creogen/rapidphp
 protected function viewFile($module, $controller, $action)
 {
     if ($module) {
         $module = str_replace('-', '_', $module);
         $module = substr($module, -1) == '/' ? substr($module, 0, -1) : $module;
     }
     $controller = str_replace('-', '_', $controller);
     $action = str_replace('-', '_', $action);
     return $this->application->viewPath() . $module . DIRECTORY_SEPARATOR . $controller . DIRECTORY_SEPARATOR . $action . '.phtml';
 }