Add alias Curl::getCookie(); Update available methods in readme

This commit is contained in:
Zach Borboa
2015-08-21 15:46:18 -07:00
parent b3aa20609e
commit 9dbfd50646
2 changed files with 14 additions and 2 deletions
+2
View File
@@ -168,7 +168,9 @@ Curl::downloadComplete($fh)
Curl::error($callback)
Curl::exec($ch = null)
Curl::get($url, $data = array())
Curl::getCookie($key) {
Curl::getOpt($option)
Curl::getResponseCookie($key) {
Curl::head($url, $data = array())
Curl::headerCallback($ch, $header)
Curl::options($url, $data = array())
+12 -2
View File
@@ -544,13 +544,23 @@ class Curl
}
/**
* get Cookie of Response, if Key is set. Otherwise return NULL
* Get cookie.
*
* @access public
* @param $key
*/
public function getCookie($key) {
return $this->getResponseCookie($key);
}
/**
* Get response cookie.
*
* @access public
* @param $key
*/
public function getResponseCookie($key) {
return (isset($this->responseCookies[$key]))?$this->responseCookies[$key]:NULL;
return isset($this->responseCookies[$key]) ? $this->responseCookies[$key] : null;
}
/**