コード例 #1
0
ファイル: RoutesCommand.php プロジェクト: letsdrink/ouzo
 private function generatePhpHelper()
 {
     $routesPhpHelperPath = Path::join(ROOT_PATH, ApplicationPaths::getHelperPath(), 'GeneratedUriHelper.php');
     if (UriHelperGenerator::generate()->saveToFile($routesPhpHelperPath) !== false) {
         $this->_output->writeln("File with PHP uri helpers is generated in <info>{$routesPhpHelperPath}</info>");
     }
 }
コード例 #2
0
ファイル: Layout.php プロジェクト: letsdrink/ouzo
 public function renderLayout()
 {
     if ($this->_layout) {
         $layoutPath = Path::join(ROOT_PATH, ApplicationPaths::getLayoutPath(), $this->_layout . '.phtml');
         /** @noinspection PhpIncludeInspection */
         require_once $layoutPath;
     }
 }
コード例 #3
0
ファイル: TwigRenderer.php プロジェクト: letsdrink/ouzo
 public function __construct($viewName, array $attributes)
 {
     $this->_viewName = $viewName;
     $this->_attributes = $attributes;
     $this->_loaderPath = Path::join(ROOT_PATH, ApplicationPaths::getViewPath());
     $this->_viewFilename = $viewName . self::EXTENSION;
     $this->_viewPath = Path::join($this->_loaderPath, $this->_viewFilename);
 }
コード例 #4
0
ファイル: View.php プロジェクト: letsdrink/ouzo
 private function _loadHelpers()
 {
     $viewHelperPath = Path::join('Helper', 'ViewHelper.php');
     $appHelperPath = Path::join(ROOT_PATH, ApplicationPaths::getHelperPath(), 'ApplicationHelper.php');
     $formHelperPath = Path::join('Helper', 'FormHelper.php');
     $urlHelperPath = Path::join(ROOT_PATH, ApplicationPaths::getHelperPath(), 'UrlHelper.php');
     $this->_requireOnce($viewHelperPath);
     Files::loadIfExists($appHelperPath);
     $this->_requireOnce($formHelperPath);
     Files::loadIfExists($urlHelperPath);
 }
コード例 #5
0
ファイル: PhtmlRenderer.php プロジェクト: letsdrink/ouzo
 private function _loadViewHelper()
 {
     $helperPath = Path::join(ROOT_PATH, ApplicationPaths::getViewPath(), $this->_viewName . '.helper.php');
     Files::loadIfExists($helperPath);
 }
コード例 #6
0
ファイル: ViewPathResolver.php プロジェクト: letsdrink/ouzo
 public static function resolveViewPath($name, $responseType)
 {
     return Path::join(ROOT_PATH, ApplicationPaths::getViewPath(), $name . self::getViewPostfix($responseType));
 }