/** * Validates request URI path to ensure resource request can be fulfilled. * * @throw AblePolecatView_Exception If request URI path is not validated. */ public function validateRequestPath() { $request_path = AblePolecat_Host::getRequest()->getRequestPath(FALSE); if (!isset($request_path[0]) || $request_path[0] != '' || count($request_path) > 1) { $request_path = AblePolecat_Host::getRequest()->getRequestPath(); throw new AblePolecat_Resource_Exception($request_path . ' is not a valid request URI path for ' . __CLASS__ . '.'); } }
/** * @return string URL to project root on web (location of index.php). */ public static function getBaseUrl() { $baseUrl = AblePolecat_Host::getRequest()->getBaseUrl(FALSE); return $baseUrl; }
<?php /** * @file AblePolecat-View/var/www/htdocs/index.php * @brief All requests are routed through index.php. * * @author Karl Kuhrman * @copyright 2015 [GPL V2] Karl Kuhrman */ /** * Path settings. */ include_once 'path.config'; /** * Route HTTP request. */ require_once implode(DIRECTORY_SEPARATOR, array(ABLE_POLECAT_CORE, 'Host.php')); AblePolecat_Host::routeRequest();