Overview

Namespaces

  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • 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
    • Tests
      • Batch
      • Cache
      • Common
        • Cache
        • Exception
      • Http
        • Curl
        • Exception
        • Message
          • Header
      • Inflection
      • Iterator
      • Log
      • Message
      • Mock
      • Parser
        • Cookie
        • Message
      • Parsers
        • UriTemplate
      • Plugin
        • Async
        • Backoff
        • Cache
        • Cookie
          • CookieJar
        • CurlAuth
        • ErrorResponse
        • History
        • Log
        • Md5
        • Mock
        • Oauth
        • Redirect
      • Service
        • Builder
        • Command
          • LocationVisitor
            • Request
            • Response
        • Description
        • Exception
        • Mock
          • Command
            • Sub
          • Model
        • Resource
      • Stream
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • VivaPayments
      • Message
  • PHP

Classes

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

Class Cookie

Set-Cookie object

Guzzle\Plugin\Cookie\Cookie implements Guzzle\Common\ToArrayInterface
Namespace: Guzzle\Plugin\Cookie
Located at src/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 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
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
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

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
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
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
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
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
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
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
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
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 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
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
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
Name of the attribute to set
$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
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
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
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

#
Omnipay Viva Payments Gateway Module API Documentation API documentation generated by ApiGen