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>"); } }
public function renderLayout() { if ($this->_layout) { $layoutPath = Path::join(ROOT_PATH, ApplicationPaths::getLayoutPath(), $this->_layout . '.phtml'); /** @noinspection PhpIncludeInspection */ require_once $layoutPath; } }
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); }
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); }
private function _loadViewHelper() { $helperPath = Path::join(ROOT_PATH, ApplicationPaths::getViewPath(), $this->_viewName . '.helper.php'); Files::loadIfExists($helperPath); }
public static function resolveViewPath($name, $responseType) { return Path::join(ROOT_PATH, ApplicationPaths::getViewPath(), $name . self::getViewPostfix($responseType)); }