protected function setup() {
		$this->rs = new \HaveAPI\Client\Resource($this->client, 'token', $this->description->resources->token, array());
		$this->via = isSet($this->opts['via']) ? $this->opts['via'] : self::HTTP_HEADER;
		
		if(isSet($this->opts['token'])) {
			$this->configured = true;
			$this->token = $this->opts['token'];
			return;
		}
		
		$this->requestToken();
	}
protected function setup() {
		$this->rs = new \HaveAPI\Client\Resource($this->client, 'token', $this->description->resources->token, array());
		$this->via = isSet($this->opts['via']) ? $this->opts['via'] : self::HTTP_HEADER;
		
		if(isSet($this->opts['token'])) {
			$this->configured = true;
			$this->token = $this->opts['token'];
			return;
		}
		
		$this->requestToken();
	}
protected function setup ( ) { $ this -> rs = new \ HaveAPI \ Client \ Resource ( $ this -> client , 'token' , $ this -> description -> resources -> token , array ( ) ) ; $ this -> via = isSet ( $ this -> opts [ 'via' ] ) ? $ this -> opts [ 'via' ] : self :: HTTP_HEADER ; if ( isSet ( $ this -> opts [ 'token' ] ) ) { $ this -> configured = true ; $ this -> token = $ this -> opts [ 'token' ] ; return ; } $ this -> requestToken ( ) ; }
Request a new token if it isn't in the options.
Request a new token if it isn t in the options .