public static function toArray($value)
    {
        $data = [];

        $cookies = $value ? explode(';', $value) : [];
        foreach ($cookies as $cookie) {
            list($name, $value) = explode('=', $cookie);
            $name = trim($name);
            $value = urldecode($value);
            if (!isset($data[$name])) {
                $data[$name] = $value;
            }
        }
        return $data;
    }
public static function toArray($value)
    {
        $data = [];

        $cookies = $value ? explode(';', $value) : [];
        foreach ($cookies as $cookie) {
            list($name, $value) = explode('=', $cookie);
            $name = trim($name);
            $value = urldecode($value);
            if (!isset($data[$name])) {
                $data[$name] = $value;
            }
        }
        return $data;
    }
public static function toArray ( $ value ) { $ data = [ ] ; $ cookies = $ value ? explode ( ';' , $ value ) : [ ] ; foreach ( $ cookies as $ cookie ) { list ( $ name , $ value ) = explode ( '=' , $ cookie ) ; $ name = trim ( $ name ) ; $ value = urldecode ( $ value ) ; if ( ! isset ( $ data [ $ name ] ) ) { $ data [ $ name ] = $ value ; } } return $ data ; }
Extract cookies values from a request.

@param  string  $value A Cookie header value.
@return array           The cookies values.
Extract cookies values from a request .