diff --git a/README.md b/README.md index d20be24..7adb85e 100644 --- a/README.md +++ b/README.md @@ -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()) diff --git a/src/Curl/Curl.php b/src/Curl/Curl.php index f9608e6..50d920b 100644 --- a/src/Curl/Curl.php +++ b/src/Curl/Curl.php @@ -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; } /**