Make callback_url property protected, and add get/set methods.

This commit is contained in:
GaryJones 2012-11-22 13:17:23 +00:00
parent b06d99ccbf
commit a58bceb4aa

View File

@ -19,6 +19,13 @@ namespace GaryJones\OAuth;
*/ */
class Client extends Credential class Client extends Credential
{ {
/**
* URL to which authorized requests will redirect to.
*
* @var string
*/
protected $callback_url;
/** /**
* Constructs a new client object and populates the required parameters. * Constructs a new client object and populates the required parameters.
* *
@ -30,6 +37,26 @@ class Client extends Credential
{ {
$this->setKey($key); $this->setKey($key);
$this->setSecret($secret); $this->setSecret($secret);
$this->setCallbackUrl($callback_url);
}
/**
* Get the callback URL.
*
* @return string
*/
public function getCallbackUrl()
{
return $this->callback_url;
}
/**
* Set the callbackURL
*
* @param string $callback_url
*/
public function setCallbackUrl($callback_url)
{
$this->callback_url = $callback_url; $this->callback_url = $callback_url;
} }
} }