/** * Initializes a new session and return a cURL handle. * @param string $url url to request. * @param array $options HTTP request options. Keys: query, data, referer. * @param boolean $parseJson Whether to parse response in json format. * @return cURL handle. */ protected function initRequest($url, $options = array()) { $ch = parent::initRequest($url, $options); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); if (isset($params['data'])) { curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml", "SOAPAction: \"/soap/action/query\"", "Content-length: " . strlen($data))); } return $ch; }
/** * Initialize the component. * * @param EAuth $component the component instance. * @param array $options properties initialization. */ public function init($component, $options = array()) { parent::init($component, $options); $this->auth = Yii::app()->loid->load(); //$this->auth = new EOpenID(); }
public function init($component, $options = array()) { parent::init($component, $options); // Try to restore access token from session. $this->restoreAccessToken(); }
/** * Initializes a new session and return a cURL handle. * * @param string $url url to request. * @param array $options HTTP request options. Keys: query, data, referer. * @param boolean $parseJson Whether to parse response in json format. * @return cURL handle. */ protected function initRequest($url, $options = array()) { $ch = parent::initRequest($url, $options); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); return $ch; }