Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • Cookie
  • CookiePlugin
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class Cookie

Set-Cookie object

Guzzle\Plugin\Cookie\Cookie implements Guzzle\Common\ToArrayInterface
Namespace: Guzzle\Plugin\Cookie
Located at Guzzle/Plugin/Cookie/Cookie.php
Methods summary
protected static array
# getInvalidCharacters( )

Gets an array of invalid cookie characters

Gets an array of invalid cookie characters

Returns

array
public
# __construct( array $data = array() )

Parameters

$data
array
$data Array of cookie data provided by a Cookie parser
public array
# toArray( )

Get the cookie as an array

Get the cookie as an array

Returns

array

Implementation of

Guzzle\Common\ToArrayInterface::toArray()
public string
# getName( )

Get the cookie name

Get the cookie name

Returns

string
public Guzzle\Plugin\Cookie\Cookie
# setName( string $name )

Set the cookie name

Set the cookie name

Parameters

$name
string
$name Cookie name

Returns

Guzzle\Plugin\Cookie\Cookie
public string
# getValue( )

Get the cookie value

Get the cookie value

Returns

string
public Guzzle\Plugin\Cookie\Cookie
# setValue( string $value )

Set the cookie value

Set the cookie value

Parameters

$value
string
$value Cookie value

Returns

Guzzle\Plugin\Cookie\Cookie
public string|null
# getDomain( )

Get the domain

Get the domain

Returns

string|null
public Guzzle\Plugin\Cookie\Cookie
# setDomain( string $domain )

Set the domain of the cookie

Set the domain of the cookie

Parameters

$domain
string
$domain

Returns

Guzzle\Plugin\Cookie\Cookie
public string
# getPath( )

Get the path

Get the path

Returns

string
public Guzzle\Plugin\Cookie\Cookie
# setPath( string $path )

Set the path of the cookie

Set the path of the cookie

Parameters

$path
string
$path Path of the cookie

Returns

Guzzle\Plugin\Cookie\Cookie
public integer|null
# getMaxAge( )

Maximum lifetime of the cookie in seconds

Maximum lifetime of the cookie in seconds

Returns

integer|null
public Guzzle\Plugin\Cookie\Cookie
# setMaxAge( integer $maxAge )

Set the max-age of the cookie

Set the max-age of the cookie

Parameters

$maxAge
integer
$maxAge Max age of the cookie in seconds

Returns

Guzzle\Plugin\Cookie\Cookie
public mixed
# getExpires( )

The UNIX timestamp when the cookie expires

The UNIX timestamp when the cookie expires

Returns

mixed
public Guzzle\Plugin\Cookie\Cookie
# setExpires( integer $timestamp )

Set the unix timestamp for which the cookie will expire

Set the unix timestamp for which the cookie will expire

Parameters

$timestamp
integer
$timestamp Unix timestamp

Returns

Guzzle\Plugin\Cookie\Cookie
public mixed
# getVersion( )

Version of the cookie specification. RFC 2965 is 1

Version of the cookie specification. RFC 2965 is 1

Returns

mixed
public Guzzle\Plugin\Cookie\Cookie
# setVersion( string|integer $version )

Set the cookie version

Set the cookie version

Parameters

$version
string|integer
$version Version to set

Returns

Guzzle\Plugin\Cookie\Cookie
public null|boolean
# getSecure( )

Get whether or not this is a secure cookie

Get whether or not this is a secure cookie

Returns

null|boolean
public Guzzle\Plugin\Cookie\Cookie
# setSecure( boolean $secure )

Set whether or not the cookie is secure

Set whether or not the cookie is secure

Parameters

$secure
boolean
$secure Set to true or false if secure

Returns

Guzzle\Plugin\Cookie\Cookie
public null|boolean
# getDiscard( )

Get whether or not this is a session cookie

Get whether or not this is a session cookie

Returns

null|boolean
public Guzzle\Plugin\Cookie\Cookie
# setDiscard( boolean $discard )

Set whether or not this is a session cookie

Set whether or not this is a session cookie

Parameters

$discard
boolean
$discard Set to true or false if this is a session cookie

Returns

Guzzle\Plugin\Cookie\Cookie
public string|null
# getComment( )

Get the comment

Get the comment

Returns

string|null
public Guzzle\Plugin\Cookie\Cookie
# setComment( string $comment )

Set the comment of the cookie

Set the comment of the cookie

Parameters

$comment
string
$comment Cookie comment

Returns

Guzzle\Plugin\Cookie\Cookie
public string|null
# getCommentUrl( )

Get the comment URL of the cookie

Get the comment URL of the cookie

Returns

string|null
public Guzzle\Plugin\Cookie\Cookie
# setCommentUrl( string $commentUrl )

Set the comment URL of the cookie

Set the comment URL of the cookie

Parameters

$commentUrl
string
$commentUrl Cookie comment URL for more information

Returns

Guzzle\Plugin\Cookie\Cookie
public array
# getPorts( )

Get an array of acceptable ports this cookie can be used with

Get an array of acceptable ports this cookie can be used with

Returns

array
public Guzzle\Plugin\Cookie\Cookie
# setPorts( array $ports )

Set a list of acceptable ports this cookie can be used with

Set a list of acceptable ports this cookie can be used with

Parameters

$ports
array
$ports Array of acceptable ports

Returns

Guzzle\Plugin\Cookie\Cookie
public boolean
# getHttpOnly( )

Get whether or not this is an HTTP only cookie

Get whether or not this is an HTTP only cookie

Returns

boolean
public Guzzle\Plugin\Cookie\Cookie
# setHttpOnly( boolean $httpOnly )

Set whether or not this is an HTTP only cookie

Set whether or not this is an HTTP only cookie

Parameters

$httpOnly
boolean
$httpOnly Set to true or false if this is HTTP only

Returns

Guzzle\Plugin\Cookie\Cookie
public array
# getAttributes( )

Get an array of extra cookie data

Get an array of extra cookie data

Returns

array
public null|string
# getAttribute( string $name )

Get a specific data point from the extra cookie data

Get a specific data point from the extra cookie data

Parameters

$name
string
$name Name of the data point to retrieve

Returns

null|string
public Guzzle\Plugin\Cookie\Cookie
# setAttribute( string $name, string $value )

Set a cookie data attribute

Set a cookie data attribute

Parameters

$name
string
$name Name of the attribute to set
$value
string
$value Value to set

Returns

Guzzle\Plugin\Cookie\Cookie
public boolean
# matchesPath( string $path )

Check if the cookie matches a path value

Check if the cookie matches a path value

Parameters

$path
string
$path Path to check against

Returns

boolean
public boolean
# matchesDomain( string $domain )

Check if the cookie matches a domain value

Check if the cookie matches a domain value

Parameters

$domain
string
$domain Domain to check against

Returns

boolean
public boolean
# matchesPort( integer $port )

Check if the cookie is compatible with a specific port

Check if the cookie is compatible with a specific port

Parameters

$port
integer
$port Port to check

Returns

boolean
public boolean
# isExpired( )

Check if the cookie is expired

Check if the cookie is expired

Returns

boolean
public boolean|string
# validate( )

Check if the cookie is valid according to RFC 6265

Check if the cookie is valid according to RFC 6265

Returns

boolean|string
Returns true if valid or an error message if invalid
Properties summary
protected array $data
#

Cookie data

Cookie data

protected static string $invalidCharString
#

ASCII codes not valid for for use in a cookie name

Cookie names are defined as 'token', according to RFC 2616, Section 2.2 A valid token may contain any CHAR except CTLs (ASCII 0 - 31 or 127) or any of the following separators

ASCII codes not valid for for use in a cookie name

Cookie names are defined as 'token', according to RFC 2616, Section 2.2 A valid token may contain any CHAR except CTLs (ASCII 0 - 31 or 127) or any of the following separators

php-coveralls API documentation generated by ApiGen 2.8.0