示例#1
0
 /**
  * @param Authenticator $authenticator
  * @return string
  */
 public function fetch(Authenticator $authenticator = null)
 {
     if ($authenticator) {
         $request = new Request(static::$url, null, Request::GET, $authenticator->getSession());
         $authenticator->validateAuthentication($request);
     } else {
         $request = new Request(static::$url, null, Request::GET);
     }
     return $request->getContent();
 }
示例#2
0
 /**
  * @return string
  * @auth
  */
 public function getSession()
 {
     return $this->authenticator->getSession();
 }