public function cookie($key)
    {
        deprecationWarning(
            'ServerRequest::cookie() is deprecated. ' .
            'Use getCookie() instead.'
        );

        if (isset($this->cookies[$key])) {
            return $this->cookies[$key];
        }

        return null;
    }
public function cookie($key)
    {
        deprecationWarning(
            'ServerRequest::cookie() is deprecated. ' .
            'Use getCookie() instead.'
        );

        if (isset($this->cookies[$key])) {
            return $this->cookies[$key];
        }

        return null;
    }
public function cookie ( $ key ) { deprecationWarning ( 'ServerRequest::cookie() is deprecated. ' . 'Use getCookie() instead.' ) ; if ( isset ( $ this -> cookies [ $ key ] ) ) { return $ this -> cookies [ $ key ] ; } return null ; }
Read cookie data from the request's cookie data.

@param string $key The key you want to read.
@return null|string Either the cookie value, or null if the value doesn't exist.
@deprecated 3.4.0 Use getCookie() instead.
Read cookie data from the request s cookie data .