示例#1
0
 /**
  * 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__ . '.');
     }
 }
示例#2
0
 /**
  * @return string URL to project root on web (location of index.php).
  */
 public static function getBaseUrl()
 {
     $baseUrl = AblePolecat_Host::getRequest()->getBaseUrl(FALSE);
     return $baseUrl;
 }