public function getCookie($name)
    {
        $this->buildCookieCollection();
        if (!$this->cookies->has($name)) {
            return null;
        }

        return $this->cookies->get($name)->getValue();
    }
public function getCookie($name)
    {
        $this->buildCookieCollection();
        if (!$this->cookies->has($name)) {
            return null;
        }

        return $this->cookies->get($name)->getValue();
    }
public function getCookie ( $ name ) { $ this -> buildCookieCollection ( ) ; if ( ! $ this -> cookies -> has ( $ name ) ) { return null ; } return $ this -> cookies -> get ( $ name ) -> getValue ( ) ; }
Get the value of a single cookie.

@param string $name The name of the cookie value.
@return string|array|null Either the cookie's value or null when the cookie is undefined.
Get the value of a single cookie .