/**
  * Returns the root path of the request.
  *
  * In most case this value will be the same as KRequest::base however it can be
  * changed by pushing in a different value
  *
  * @return  object  A KHttpUrl object
  */
 public static function root($path = null)
 {
     if (!is_null($path)) {
         if (!$path instanceof KhttpUrl) {
             $path = KService::get('koowa:http.url', array('url' => $path));
         }
         self::$_root = $path;
     }
     if (is_null(self::$_root)) {
         self::$_root = self::$_base;
     }
     return self::$_root;
 }
示例#2
0
 /**
  * Returns the root path of the request.
  * 
  * In most case this value will be the same as KRequest::base however it can be
  * changed by pushing in a different value
  *
  * @return  object  A KHttpUri object
  */
 public static function root($path = null)
 {
     if (!is_null($path)) {
         if (!$path instanceof KhttpUri) {
             $path = KFactory::tmp('lib.koowa.http.uri', array('uri' => $path));
         }
         self::$_root = $path;
     }
     if (is_null(self::$_root)) {
         self::$_root = self::$_base;
     }
     return self::$_root;
 }