/** * @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(); }
/** * @return string * @auth */ public function getSession() { return $this->authenticator->getSession(); }