/** * Constructor. * * @param string $clientid * @param string $clientsecret * @param moodle_url $returnurl * @param string $scope */ public function __construct($clientid, $clientsecret, moodle_url $returnurl, $scope) { parent::__construct(); $this->clientid = $clientid; $this->clientsecret = $clientsecret; $this->returnurl = $returnurl; $this->scope = $scope; $this->accesstoken = $this->get_stored_token(); }
public function __construct($host = '', $apiDir = '') { parent::__construct($host, $apiDir); $this->setCurlTimeOut(300); }
public function __construct() { global $_M; parent::__construct(); $this->set('file', 'index.php?n=platform&c=dl&a=dodlfile'); }
/** * Constructor. * * @param string $hostname * @param string $clientid * @param string $clientsecret * @param stdClass $accesstoken */ public function __construct($hostname, $clientid = '', $clientsecret = '', $accesstoken = null) { parent::__construct(); $this->_hostname = $hostname; $this->_apibaseurl = $this->_hostname . self::API_URL; $this->_clientid = $clientid; $this->_clientsecret = $clientsecret; if (empty($accesstoken)) { $this->_accesstoken = $this->get_new_token(); } else { $this->_accesstoken = $accesstoken; } }