Open Journal Systems  3.3.0
Guzzle\Plugin\Cookie\Cookie Class Reference
Inheritance diagram for Guzzle\Plugin\Cookie\Cookie:
Guzzle\Common\ToArrayInterface

Public Member Functions

 __construct (array $data=array())
 
 getAttribute ($name)
 
 getAttributes ()
 
 getComment ()
 
 getCommentUrl ()
 
 getDiscard ()
 
 getDomain ()
 
 getExpires ()
 
 getHttpOnly ()
 
 getMaxAge ()
 
 getName ()
 
 getPath ()
 
 getPorts ()
 
 getSecure ()
 
 getValue ()
 
 getVersion ()
 
 isExpired ()
 
 matchesDomain ($domain)
 
 matchesPath ($path)
 
 matchesPort ($port)
 
 setAttribute ($name, $value)
 
 setComment ($comment)
 
 setCommentUrl ($commentUrl)
 
 setDiscard ($discard)
 
 setDomain ($domain)
 
 setExpires ($timestamp)
 
 setHttpOnly ($httpOnly)
 
 setMaxAge ($maxAge)
 
 setName ($name)
 
 setPath ($path)
 
 setPorts (array $ports)
 
 setSecure ($secure)
 
 setValue ($value)
 
 setVersion ($version)
 
 toArray ()
 
 validate ()
 

Static Protected Member Functions

static getInvalidCharacters ()
 

Protected Attributes

 $data
 

Static Protected Attributes

static $invalidCharString
 

Detailed Description

Set-Cookie object

Definition at line 10 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Plugin\Cookie\Cookie::__construct ( array  $data = array())

Member Function Documentation

◆ getAttribute()

Guzzle\Plugin\Cookie\Cookie::getAttribute (   $name)

Get a specific data point from the extra cookie data

Parameters
string$nameName of the data point to retrieve
Returns
null|string

Definition at line 389 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ getAttributes()

Guzzle\Plugin\Cookie\Cookie::getAttributes ( )

Get an array of extra cookie data

Returns
array

Definition at line 377 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ getComment()

Guzzle\Plugin\Cookie\Cookie::getComment ( )

Get the comment

Returns
string|null

Definition at line 289 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ getCommentUrl()

Guzzle\Plugin\Cookie\Cookie::getCommentUrl ( )

Get the comment URL of the cookie

Returns
string|null

Definition at line 311 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ getDiscard()

Guzzle\Plugin\Cookie\Cookie::getDiscard ( )

◆ getDomain()

Guzzle\Plugin\Cookie\Cookie::getDomain ( )

◆ getExpires()

◆ getHttpOnly()

Guzzle\Plugin\Cookie\Cookie::getHttpOnly ( )

Get whether or not this is an HTTP only cookie

Returns
bool

Definition at line 355 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ getInvalidCharacters()

static Guzzle\Plugin\Cookie\Cookie::getInvalidCharacters ( )
staticprotected

Gets an array of invalid cookie characters

Returns
array

Definition at line 32 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

References Guzzle\Plugin\Cookie\Cookie\$invalidCharString.

◆ getMaxAge()

Guzzle\Plugin\Cookie\Cookie::getMaxAge ( )

Maximum lifetime of the cookie in seconds

Returns
int|null

Definition at line 179 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

Referenced by Guzzle\Plugin\Cookie\Cookie\__construct().

◆ getName()

◆ getPath()

Guzzle\Plugin\Cookie\Cookie::getPath ( )

◆ getPorts()

Guzzle\Plugin\Cookie\Cookie::getPorts ( )

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

Returns
array

Definition at line 333 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

Referenced by Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\add(), and Guzzle\Plugin\Cookie\Cookie\matchesPort().

◆ getSecure()

Guzzle\Plugin\Cookie\Cookie::getSecure ( )

Get whether or not this is a secure cookie

Returns
null|bool

Definition at line 245 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ getValue()

Guzzle\Plugin\Cookie\Cookie::getValue ( )

◆ getVersion()

Guzzle\Plugin\Cookie\Cookie::getVersion ( )

Version of the cookie specification. RFC 2965 is 1

Returns
mixed

Definition at line 223 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ isExpired()

Guzzle\Plugin\Cookie\Cookie::isExpired ( )

Check if the cookie is expired

Returns
bool

Definition at line 488 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

References Guzzle\Plugin\Cookie\Cookie\getExpires().

Referenced by Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\all().

◆ matchesDomain()

Guzzle\Plugin\Cookie\Cookie::matchesDomain (   $domain)

Check if the cookie matches a domain value

Parameters
string$domainDomain to check against
Returns
bool

Definition at line 453 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

References Guzzle\Plugin\Cookie\Cookie\getDomain().

Referenced by Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\all().

◆ matchesPath()

Guzzle\Plugin\Cookie\Cookie::matchesPath (   $path)

Check if the cookie matches a path value

Parameters
string$pathPath to check against
Returns
bool

Definition at line 416 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

References Guzzle\Plugin\Cookie\Cookie\getPath().

Referenced by Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\all().

◆ matchesPort()

Guzzle\Plugin\Cookie\Cookie::matchesPort (   $port)

Check if the cookie is compatible with a specific port

Parameters
int$portPort to check
Returns
bool

Definition at line 478 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

References Guzzle\Plugin\Cookie\Cookie\getPorts().

◆ setAttribute()

Guzzle\Plugin\Cookie\Cookie::setAttribute (   $name,
  $value 
)

Set a cookie data attribute

Parameters
string$nameName of the attribute to set
string$valueValue to set
Returns
Cookie

Definition at line 402 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ setComment()

Guzzle\Plugin\Cookie\Cookie::setComment (   $comment)

Set the comment of the cookie

Parameters
string$commentCookie comment
Returns
Cookie

Definition at line 301 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ setCommentUrl()

Guzzle\Plugin\Cookie\Cookie::setCommentUrl (   $commentUrl)

Set the comment URL of the cookie

Parameters
string$commentUrlCookie comment URL for more information
Returns
Cookie

Definition at line 323 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ setDiscard()

Guzzle\Plugin\Cookie\Cookie::setDiscard (   $discard)

Set whether or not this is a session cookie

Parameters
bool$discardSet to true or false if this is a session cookie
Returns
Cookie

Definition at line 279 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ setDomain()

Guzzle\Plugin\Cookie\Cookie::setDomain (   $domain)

Set the domain of the cookie

Parameters
string$domain
Returns
Cookie

Definition at line 147 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ setExpires()

Guzzle\Plugin\Cookie\Cookie::setExpires (   $timestamp)

Set the unix timestamp for which the cookie will expire

Parameters
int$timestampUnix timestamp
Returns
Cookie

Definition at line 213 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

Referenced by Guzzle\Plugin\Cookie\Cookie\__construct().

◆ setHttpOnly()

Guzzle\Plugin\Cookie\Cookie::setHttpOnly (   $httpOnly)

Set whether or not this is an HTTP only cookie

Parameters
bool$httpOnlySet to true or false if this is HTTP only
Returns
Cookie

Definition at line 367 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ setMaxAge()

Guzzle\Plugin\Cookie\Cookie::setMaxAge (   $maxAge)

Set the max-age of the cookie

Parameters
int$maxAgeMax age of the cookie in seconds
Returns
Cookie

Definition at line 191 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ setName()

Guzzle\Plugin\Cookie\Cookie::setName (   $name)

Set the cookie name

Parameters
string$nameCookie name
Returns
Cookie

Definition at line 103 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ setPath()

Guzzle\Plugin\Cookie\Cookie::setPath (   $path)

Set the path of the cookie

Parameters
string$pathPath of the cookie
Returns
Cookie

Definition at line 169 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ setPorts()

Guzzle\Plugin\Cookie\Cookie::setPorts ( array  $ports)

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

Parameters
array$portsArray of acceptable ports
Returns
Cookie

Definition at line 345 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ setSecure()

Guzzle\Plugin\Cookie\Cookie::setSecure (   $secure)

Set whether or not the cookie is secure

Parameters
bool$secureSet to true or false if secure
Returns
Cookie

Definition at line 257 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ setValue()

Guzzle\Plugin\Cookie\Cookie::setValue (   $value)

Set the cookie value

Parameters
string$valueCookie value
Returns
Cookie

Definition at line 125 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ setVersion()

Guzzle\Plugin\Cookie\Cookie::setVersion (   $version)

Set the cookie version

Parameters
string | int$versionVersion to set
Returns
Cookie

Definition at line 235 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

◆ toArray()

Guzzle\Plugin\Cookie\Cookie::toArray ( )

◆ validate()

Guzzle\Plugin\Cookie\Cookie::validate ( )

Check if the cookie is valid according to RFC 6265

Returns
bool|string Returns true if valid or an error message if invalid

Definition at line 498 of file lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php.

References Guzzle\Plugin\Cookie\Cookie\getDomain(), Guzzle\Plugin\Cookie\Cookie\getName(), and Guzzle\Plugin\Cookie\Cookie\getValue().

Referenced by Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar\add().

Field Documentation

◆ $data

array Guzzle\Plugin\Cookie\Cookie::$data
protected

◆ $invalidCharString

Guzzle\Plugin\Cookie\Cookie::$invalidCharString
staticprotected

The documentation for this class was generated from the following file: