public static function loadIfExists($path, $loadOnce = true)
{
if (self::exists($path)) {
self::_require($path, $loadOnce);
return true;
}
return false;
}
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); }