/** * * @param type $name * @param array $urlParameters * @return \Sokil\Rest\Request */ public function createRequest($name, array $urlParameters = null) { $request = parent::createRequest($name, $urlParameters); // authorise if (!$this->isAuthorised() && strtolower($name) !== 'auth') { $this->_auth(); } // client authorised - set token to request $request->setQueryParam('auth_token', $this->_token); return $request; }