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); }
/** * @return void */ private function includeRoutes() { $routesPath = Path::join(ROOT_PATH, 'config', 'routes.php'); Files::loadIfExists($routesPath); }
private function _loadViewHelper() { $helperPath = Path::join(ROOT_PATH, ApplicationPaths::getViewPath(), $this->_viewName . '.helper.php'); Files::loadIfExists($helperPath); }
<?php use Ouzo\Utilities\Clock; use Ouzo\Utilities\Files; use Ouzo\Utilities\Path; error_reporting(E_ALL); putenv('environment=test'); define('ROOT_PATH', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR); require 'vendor/autoload.php'; Files::loadIfExists(Path::join(ROOT_PATH, 'config', 'error_codes.php')); Files::loadIfExists(Path::join(ROOT_PATH, 'config', 'routes.php')); Clock::freeze();