Make callback_url property protected, and add get/set methods.
This commit is contained in:
		@@ -19,6 +19,13 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
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 @@ public function __construct($key, $secret, $callback_url = null)
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        $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;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user