docs/class-GuzzleHttp.Cookie.SetCookie.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class GuzzleHttp\Cookie\SetCookie | ξ ^ω^)ξ Baguette PHP Mastodon API Client / SDK</title>
<link rel="stylesheet" href="resources/style.css?c2f33731c1948fbed7c333554678bfa68d4817da">
</head>
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
<div id="groups">
<h3>Namespaces</h3>
<ul>
<li>
<a href="namespace-Baguette.html">
Baguette<span></span>
</a>
<ul>
<li>
<a href="namespace-Baguette.Mastodon.html">
Mastodon<span></span>
</a>
<ul>
<li class="main">
<a href="namespace-Baguette.Mastodon.Config.html">
Config </a>
</li>
<li class="main">
<a href="namespace-Baguette.Mastodon.Entity.html">
Entity </a>
</li>
<li class="main">
<a href="namespace-Baguette.Mastodon.Grant.html">
Grant </a>
</li>
<li class="main">
<a href="namespace-Baguette.Mastodon.Service.html">
Service </a>
</li>
</ul></li></ul></li>
<li class="active">
<a href="namespace-GuzzleHttp.html">
GuzzleHttp<span></span>
</a>
<ul>
<li class="active">
<a href="namespace-GuzzleHttp.Cookie.html">
Cookie </a>
</li>
<li>
<a href="namespace-GuzzleHttp.Exception.html">
Exception </a>
</li>
<li>
<a href="namespace-GuzzleHttp.Handler.html">
Handler </a>
</li>
<li>
<a href="namespace-GuzzleHttp.Promise.html">
Promise </a>
</li>
</ul></li>
<li>
<a href="namespace-Psr.html">
Psr<span></span>
</a>
<ul>
<li>
<a href="namespace-Psr.Http.html">
Http<span></span>
</a>
<ul>
<li>
<a href="namespace-Psr.Http.Message.html">
Message </a>
</li>
</ul></li></ul></li>
<li>
<a href="namespace-Teto.html">
Teto<span></span>
</a>
<ul>
<li>
<a href="namespace-Teto.Object.html">
Object </a>
</li>
</ul></li>
</ul>
</div>
<hr>
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-GuzzleHttp.Cookie.CookieJar.html">CookieJar</a></li>
<li><a href="class-GuzzleHttp.Cookie.FileCookieJar.html">FileCookieJar</a></li>
<li><a href="class-GuzzleHttp.Cookie.SessionCookieJar.html">SessionCookieJar</a></li>
<li class="active"><a href="class-GuzzleHttp.Cookie.SetCookie.html">SetCookie</a></li>
</ul>
<h3>Interfaces</h3>
<ul>
<li><a href="class-GuzzleHttp.Cookie.CookieJarInterface.html">CookieJarInterface</a></li>
</ul>
</div>
</div>
</div>
<div id="splitter"></div>
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text" placeholder="Search">
</form>
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="namespace-GuzzleHttp.Cookie.html" title="Summary of GuzzleHttp\Cookie"><span>Namespace</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
</ul>
<ul>
</ul>
</div>
<div id="content" class="class">
<h1>Class SetCookie</h1>
<div class="description">
<p>Set-Cookie object</p>
</div>
<div class="info">
<b>Namespace:</b> <a href="namespace-GuzzleHttp.html">GuzzleHttp</a>\<a href="namespace-GuzzleHttp.Cookie.html">Cookie</a><br>
<b>Located at</b> <a href="source-class-GuzzleHttp.Cookie.SetCookie.html#4-404" title="Go to source code">Cookie/SetCookie.php</a>
<br>
</div>
<table class="summary methods" id="methods">
<caption>Methods summary</caption>
<tr data-order="fromString" id="_fromString">
<td class="attributes"><code>
public static
<code><a href="class-GuzzleHttp.Cookie.SetCookie.html">GuzzleHttp\Cookie\SetCookie</a></code>
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_fromString">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#25-68" title="Go to source code">fromString</a>( <span>string <var>$cookie</var></span> )</code>
<div class="description short">
<p>Create a new SetCookie object from a string</p>
</div>
<div class="description detailed hidden">
<p>Create a new SetCookie object from a string</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$cookie</var></dt>
<dd>Set-Cookie header string</dd>
</dl></div>
<h4>Returns</h4>
<div class="list">
<code><a href="class-GuzzleHttp.Cookie.SetCookie.html">GuzzleHttp\Cookie\SetCookie</a></code>
</div>
</div>
</div></td>
</tr>
<tr data-order="__construct" id="___construct">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#70-83" title="Go to source code">__construct</a>( <span>array <var>$data</var> = []</span> )</code>
<div class="description short">
</div>
<div class="description detailed hidden">
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$data</var></dt>
<dd>Array of cookie data provided by a Cookie parser</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="__toString" id="___toString">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#___toString">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#85-99" title="Go to source code">__toString</a>( )</code>
<div class="description short">
</div>
<div class="description detailed hidden">
</div>
</div></td>
</tr>
<tr data-order="toArray" id="_toArray">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_toArray">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#101-104" title="Go to source code">toArray</a>( )</code>
<div class="description short">
</div>
<div class="description detailed hidden">
</div>
</div></td>
</tr>
<tr data-order="getName" id="_getName">
<td class="attributes"><code>
public
string
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getName">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#106-114" title="Go to source code">getName</a>( )</code>
<div class="description short">
<p>Get the cookie name</p>
</div>
<div class="description detailed hidden">
<p>Get the cookie name</p>
<h4>Returns</h4>
<div class="list">
string
</div>
</div>
</div></td>
</tr>
<tr data-order="setName" id="_setName">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setName">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#116-124" title="Go to source code">setName</a>( <span>string <var>$name</var></span> )</code>
<div class="description short">
<p>Set the cookie name</p>
</div>
<div class="description detailed hidden">
<p>Set the cookie name</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$name</var></dt>
<dd>Cookie name</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="getValue" id="_getValue">
<td class="attributes"><code>
public
string
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getValue">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#126-134" title="Go to source code">getValue</a>( )</code>
<div class="description short">
<p>Get the cookie value</p>
</div>
<div class="description detailed hidden">
<p>Get the cookie value</p>
<h4>Returns</h4>
<div class="list">
string
</div>
</div>
</div></td>
</tr>
<tr data-order="setValue" id="_setValue">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setValue">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#136-144" title="Go to source code">setValue</a>( <span>string <var>$value</var></span> )</code>
<div class="description short">
<p>Set the cookie value</p>
</div>
<div class="description detailed hidden">
<p>Set the cookie value</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$value</var></dt>
<dd>Cookie value</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="getDomain" id="_getDomain">
<td class="attributes"><code>
public
string|null
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getDomain">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#146-154" title="Go to source code">getDomain</a>( )</code>
<div class="description short">
<p>Get the domain</p>
</div>
<div class="description detailed hidden">
<p>Get the domain</p>
<h4>Returns</h4>
<div class="list">
string|null
</div>
</div>
</div></td>
</tr>
<tr data-order="setDomain" id="_setDomain">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setDomain">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#156-164" title="Go to source code">setDomain</a>( <span>string <var>$domain</var></span> )</code>
<div class="description short">
<p>Set the domain of the cookie</p>
</div>
<div class="description detailed hidden">
<p>Set the domain of the cookie</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$domain</var></dt>
<dd></dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="getPath" id="_getPath">
<td class="attributes"><code>
public
string
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getPath">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#166-174" title="Go to source code">getPath</a>( )</code>
<div class="description short">
<p>Get the path</p>
</div>
<div class="description detailed hidden">
<p>Get the path</p>
<h4>Returns</h4>
<div class="list">
string
</div>
</div>
</div></td>
</tr>
<tr data-order="setPath" id="_setPath">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setPath">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#176-184" title="Go to source code">setPath</a>( <span>string <var>$path</var></span> )</code>
<div class="description short">
<p>Set the path of the cookie</p>
</div>
<div class="description detailed hidden">
<p>Set the path of the cookie</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$path</var></dt>
<dd>Path of the cookie</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="getMaxAge" id="_getMaxAge">
<td class="attributes"><code>
public
integer|null
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getMaxAge">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#186-194" title="Go to source code">getMaxAge</a>( )</code>
<div class="description short">
<p>Maximum lifetime of the cookie in seconds</p>
</div>
<div class="description detailed hidden">
<p>Maximum lifetime of the cookie in seconds</p>
<h4>Returns</h4>
<div class="list">
integer|null
</div>
</div>
</div></td>
</tr>
<tr data-order="setMaxAge" id="_setMaxAge">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setMaxAge">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#196-204" title="Go to source code">setMaxAge</a>( <span>integer <var>$maxAge</var></span> )</code>
<div class="description short">
<p>Set the max-age of the cookie</p>
</div>
<div class="description detailed hidden">
<p>Set the max-age of the cookie</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$maxAge</var></dt>
<dd>Max age of the cookie in seconds</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="getExpires" id="_getExpires">
<td class="attributes"><code>
public
mixed
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getExpires">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#206-214" title="Go to source code">getExpires</a>( )</code>
<div class="description short">
<p>The UNIX timestamp when the cookie Expires</p>
</div>
<div class="description detailed hidden">
<p>The UNIX timestamp when the cookie Expires</p>
<h4>Returns</h4>
<div class="list">
mixed
</div>
</div>
</div></td>
</tr>
<tr data-order="setExpires" id="_setExpires">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setExpires">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#216-226" title="Go to source code">setExpires</a>( <span>integer <var>$timestamp</var></span> )</code>
<div class="description short">
<p>Set the unix timestamp for which the cookie will expire</p>
</div>
<div class="description detailed hidden">
<p>Set the unix timestamp for which the cookie will expire</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$timestamp</var></dt>
<dd>Unix timestamp</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="getSecure" id="_getSecure">
<td class="attributes"><code>
public
null|boolean
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getSecure">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#228-236" title="Go to source code">getSecure</a>( )</code>
<div class="description short">
<p>Get whether or not this is a secure cookie</p>
</div>
<div class="description detailed hidden">
<p>Get whether or not this is a secure cookie</p>
<h4>Returns</h4>
<div class="list">
null|boolean
</div>
</div>
</div></td>
</tr>
<tr data-order="setSecure" id="_setSecure">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setSecure">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#238-246" title="Go to source code">setSecure</a>( <span>boolean <var>$secure</var></span> )</code>
<div class="description short">
<p>Set whether or not the cookie is secure</p>
</div>
<div class="description detailed hidden">
<p>Set whether or not the cookie is secure</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$secure</var></dt>
<dd>Set to true or false if secure</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="getDiscard" id="_getDiscard">
<td class="attributes"><code>
public
null|boolean
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getDiscard">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#248-256" title="Go to source code">getDiscard</a>( )</code>
<div class="description short">
<p>Get whether or not this is a session cookie</p>
</div>
<div class="description detailed hidden">
<p>Get whether or not this is a session cookie</p>
<h4>Returns</h4>
<div class="list">
null|boolean
</div>
</div>
</div></td>
</tr>
<tr data-order="setDiscard" id="_setDiscard">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setDiscard">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#258-266" title="Go to source code">setDiscard</a>( <span>boolean <var>$discard</var></span> )</code>
<div class="description short">
<p>Set whether or not this is a session cookie</p>
</div>
<div class="description detailed hidden">
<p>Set whether or not this is a session cookie</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$discard</var></dt>
<dd>Set to true or false if this is a session cookie</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="getHttpOnly" id="_getHttpOnly">
<td class="attributes"><code>
public
boolean
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getHttpOnly">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#268-276" title="Go to source code">getHttpOnly</a>( )</code>
<div class="description short">
<p>Get whether or not this is an HTTP only cookie</p>
</div>
<div class="description detailed hidden">
<p>Get whether or not this is an HTTP only cookie</p>
<h4>Returns</h4>
<div class="list">
boolean
</div>
</div>
</div></td>
</tr>
<tr data-order="setHttpOnly" id="_setHttpOnly">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setHttpOnly">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#278-286" title="Go to source code">setHttpOnly</a>( <span>boolean <var>$httpOnly</var></span> )</code>
<div class="description short">
<p>Set whether or not this is an HTTP only cookie</p>
</div>
<div class="description detailed hidden">
<p>Set whether or not this is an HTTP only cookie</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$httpOnly</var></dt>
<dd>Set to true or false if this is HTTP only</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="matchesPath" id="_matchesPath">
<td class="attributes"><code>
public
boolean
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_matchesPath">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#288-326" title="Go to source code">matchesPath</a>( <span>string <var>$requestPath</var></span> )</code>
<div class="description short">
<p>Check if the cookie matches a path value.</p>
</div>
<div class="description detailed hidden">
<p>Check if the cookie matches a path value.</p>
<p>A request-path path-matches a given cookie-path if at least one of
the following conditions holds:</p>
<ul>
<li>The cookie-path and the request-path are identical.</li>
<li>The cookie-path is a prefix of the request-path, and the last character of the cookie-path is %x2F ("/").</li>
<li>The cookie-path is a prefix of the request-path, and the first character of the request-path that is not included in the cookie- path is a %x2F ("/") character.</li>
</ul>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$requestPath</var></dt>
<dd>Path to check against</dd>
</dl></div>
<h4>Returns</h4>
<div class="list">
boolean
</div>
</div>
</div></td>
</tr>
<tr data-order="matchesDomain" id="_matchesDomain">
<td class="attributes"><code>
public
boolean
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_matchesDomain">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#328-353" title="Go to source code">matchesDomain</a>( <span>string <var>$domain</var></span> )</code>
<div class="description short">
<p>Check if the cookie matches a domain value</p>
</div>
<div class="description detailed hidden">
<p>Check if the cookie matches a domain value</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$domain</var></dt>
<dd>Domain to check against</dd>
</dl></div>
<h4>Returns</h4>
<div class="list">
boolean
</div>
</div>
</div></td>
</tr>
<tr data-order="isExpired" id="_isExpired">
<td class="attributes"><code>
public
boolean
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_isExpired">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#355-363" title="Go to source code">isExpired</a>( )</code>
<div class="description short">
<p>Check if the cookie is expired</p>
</div>
<div class="description detailed hidden">
<p>Check if the cookie is expired</p>
<h4>Returns</h4>
<div class="list">
boolean
</div>
</div>
</div></td>
</tr>
<tr data-order="validate" id="_validate">
<td class="attributes"><code>
public
boolean|string
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_validate">#</a>
<code><a href="source-class-GuzzleHttp.Cookie.SetCookie.html#365-403" title="Go to source code">validate</a>( )</code>
<div class="description short">
<p>Check if the cookie is valid according to RFC 6265</p>
</div>
<div class="description detailed hidden">
<p>Check if the cookie is valid according to RFC 6265</p>
<h4>Returns</h4>
<div class="list">
boolean|string<br>Returns true if valid or an error message if invalid
</div>
</div>
</div></td>
</tr>
</table>
</div>
<div id="footer">
ξ ^ω^)ξ Baguette PHP Mastodon API Client / SDK API documentation generated by <a href="http://apigen.org">ApiGen</a>
</div>
</div>
</div>
<script src="resources/combined.js"></script>
<script src="elementlist.js"></script>
</body>
</html>