src/Control/CookieJar.php
public function get($name, $includeUnsent = true)
    {
        $cookies = $includeUnsent ? $this->current : $this->existing;
        if (isset($cookies[$name])) {
            return $cookies[$name];
        }

        //Normalise cookie names by replacing '.' with '_'
        $safeName = str_replace('.', '_', $name);
        if (isset($cookies[$safeName])) {
            return $cookies[$safeName];
        }
        return null;
    }
public function get($name, $includeUnsent = true)
    {
        $cookies = $includeUnsent ? $this->current : $this->existing;
        if (isset($cookies[$name])) {
            return $cookies[$name];
        }

        //Normalise cookie names by replacing '.' with '_'
        $safeName = str_replace('.', '_', $name);
        if (isset($cookies[$safeName])) {
            return $cookies[$safeName];
        }
        return null;
    }
public function get ( $ name , $ includeUnsent = true ) { $ cookies = $ includeUnsent ? $ this -> current : $ this -> existing ; if ( isset ( $ cookies [ $ name ] ) ) { return $ cookies [ $ name ] ; } //Normalise cookie names by replacing '.' with '_' $ safeName = str_replace ( '.' , '_' , $ name ) ; if ( isset ( $ cookies [ $ safeName ] ) ) { return $ cookies [ $ safeName ] ; } return null ; }
Get the cookie value by name

Cookie names are normalised to work around PHP's behaviour of replacing incoming variable name . with _

@param string $name The name of the cookie to get
@param boolean $includeUnsent Include cookies we've yet to send when fetching values

@return string|null The cookie value or null if unset
Get the cookie value by name