docs/class-GuzzleHttp.HandlerStack.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class GuzzleHttp\HandlerStack | ξ ^ω^)ξ 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>
<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.Client.html">Client</a></li>
<li class="active"><a href="class-GuzzleHttp.HandlerStack.html">HandlerStack</a></li>
<li><a href="class-GuzzleHttp.MessageFormatter.html">MessageFormatter</a></li>
<li><a href="class-GuzzleHttp.Middleware.html">Middleware</a></li>
<li><a href="class-GuzzleHttp.Pool.html">Pool</a></li>
<li><a href="class-GuzzleHttp.PrepareBodyMiddleware.html">PrepareBodyMiddleware</a></li>
<li><a href="class-GuzzleHttp.RedirectMiddleware.html">RedirectMiddleware</a></li>
<li><a href="class-GuzzleHttp.RequestOptions.html">RequestOptions</a></li>
<li><a href="class-GuzzleHttp.RetryMiddleware.html">RetryMiddleware</a></li>
<li><a href="class-GuzzleHttp.TransferStats.html">TransferStats</a></li>
<li><a href="class-GuzzleHttp.UriTemplate.html">UriTemplate</a></li>
</ul>
<h3>Interfaces</h3>
<ul>
<li><a href="class-GuzzleHttp.ClientInterface.html">ClientInterface</a></li>
</ul>
<h3>Functions</h3>
<ul>
<li><a href="function-GuzzleHttp.choose_handler.html">choose_handler</a></li>
<li><a href="function-GuzzleHttp.debug_resource.html">debug_resource</a></li>
<li><a href="function-GuzzleHttp.default_ca_bundle.html">default_ca_bundle</a></li>
<li><a href="function-GuzzleHttp.default_user_agent.html">default_user_agent</a></li>
<li><a href="function-GuzzleHttp.describe_type.html">describe_type</a></li>
<li><a href="function-GuzzleHttp.headers_from_lines.html">headers_from_lines</a></li>
<li><a href="function-GuzzleHttp.is_host_in_noproxy.html">is_host_in_noproxy</a></li>
<li><a href="function-GuzzleHttp.json_decode.html">json_decode</a></li>
<li><a href="function-GuzzleHttp.json_encode.html">json_encode</a></li>
<li><a href="function-GuzzleHttp.normalize_header_keys.html">normalize_header_keys</a></li>
<li><a href="function-GuzzleHttp.uri_template.html">uri_template</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.html" title="Summary of GuzzleHttp"><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 HandlerStack</h1>
<div class="description">
<p>Creates a composed Guzzle handler function by stacking middlewares on top of
an HTTP handler function.</p>
</div>
<div class="info">
<b>Namespace:</b> <a href="namespace-GuzzleHttp.html">GuzzleHttp</a><br>
<b>Located at</b> <a href="source-class-GuzzleHttp.HandlerStack.html#6-273" title="Go to source code">HandlerStack.php</a>
<br>
</div>
<table class="summary methods" id="methods">
<caption>Methods summary</caption>
<tr data-order="create" id="_create">
<td class="attributes"><code>
public static
<code><a href="class-GuzzleHttp.HandlerStack.html">GuzzleHttp\HandlerStack</a></code>
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_create">#</a>
<code><a href="source-class-GuzzleHttp.HandlerStack.html#21-47" title="Go to source code">create</a>( <span>callable <var>$handler</var> = <span class="php-keyword1">null</span></span> )</code>
<div class="description short">
<p>Creates a default handler stack that can be used by clients.</p>
</div>
<div class="description detailed hidden">
<p>Creates a default handler stack that can be used by clients.</p>
<p>The returned handler will wrap the provided handler or use the most
appropriate default handler for you system. The returned HandlerStack has
support for cookies, redirects, HTTP error exceptions, and preparing a body
before sending.</p>
<p>The returned handler stack can be passed to a client in the "handler"
option.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$handler</var></dt>
<dd><p>HTTP handler function to use with the stack. If no
handler is provided, the best handler for your
system will be utilized.</p></dd>
</dl></div>
<h4>Returns</h4>
<div class="list">
<code><a href="class-GuzzleHttp.HandlerStack.html">GuzzleHttp\HandlerStack</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.HandlerStack.html#49-55" title="Go to source code">__construct</a>( <span>callable <var>$handler</var> = <span class="php-keyword1">null</span></span> )</code>
<div class="description short">
</div>
<div class="description detailed hidden">
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$handler</var></dt>
<dd>Underlying HTTP handler.</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="__invoke" id="___invoke">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#___invoke">#</a>
<code><a href="source-class-GuzzleHttp.HandlerStack.html#57-68" title="Go to source code">__invoke</a>( <span><code><a href="class-Psr.Http.Message.RequestInterface.html">Psr\Http\Message\RequestInterface</a></code> <var>$request</var></span>, <span>array <var>$options</var></span> )</code>
<div class="description short">
<p>Invokes the handler stack as a composed handler</p>
</div>
<div class="description detailed hidden">
<p>Invokes the handler stack as a composed handler</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$request</var></dt>
<dd></dd>
<dt><var>$options</var></dt>
<dd></dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="__toString" id="___toString">
<td class="attributes"><code>
public
string
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#___toString">#</a>
<code><a href="source-class-GuzzleHttp.HandlerStack.html#70-97" title="Go to source code">__toString</a>( )</code>
<div class="description short">
<p>Dumps a string representation of the stack.</p>
</div>
<div class="description detailed hidden">
<p>Dumps a string representation of the stack.</p>
<h4>Returns</h4>
<div class="list">
string
</div>
</div>
</div></td>
</tr>
<tr data-order="setHandler" id="_setHandler">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setHandler">#</a>
<code><a href="source-class-GuzzleHttp.HandlerStack.html#99-109" title="Go to source code">setHandler</a>( <span>callable <var>$handler</var></span> )</code>
<div class="description short">
<p>Set the HTTP handler that actually returns a promise.</p>
</div>
<div class="description detailed hidden">
<p>Set the HTTP handler that actually returns a promise.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$handler</var></dt>
<dd><p>Accepts a request and array of options and
returns a Promise.</p></dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="hasHandler" id="_hasHandler">
<td class="attributes"><code>
public
boolean
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_hasHandler">#</a>
<code><a href="source-class-GuzzleHttp.HandlerStack.html#111-119" title="Go to source code">hasHandler</a>( )</code>
<div class="description short">
<p>Returns true if the builder has a handler.</p>
</div>
<div class="description detailed hidden">
<p>Returns true if the builder has a handler.</p>
<h4>Returns</h4>
<div class="list">
boolean
</div>
</div>
</div></td>
</tr>
<tr data-order="unshift" id="_unshift">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_unshift">#</a>
<code><a href="source-class-GuzzleHttp.HandlerStack.html#121-131" title="Go to source code">unshift</a>( <span>callable <var>$middleware</var></span>, <span>string <var>$name</var> = <span class="php-keyword1">null</span></span> )</code>
<div class="description short">
<p>Unshift a middleware to the bottom of the stack.</p>
</div>
<div class="description detailed hidden">
<p>Unshift a middleware to the bottom of the stack.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$middleware</var></dt>
<dd>Middleware function</dd>
<dt><var>$name</var></dt>
<dd>Name to register for this middleware.</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="push" id="_push">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_push">#</a>
<code><a href="source-class-GuzzleHttp.HandlerStack.html#133-143" title="Go to source code">push</a>( <span>callable <var>$middleware</var></span>, <span>string <var>$name</var> = <span class="php-quote">''</span></span> )</code>
<div class="description short">
<p>Push a middleware to the top of the stack.</p>
</div>
<div class="description detailed hidden">
<p>Push a middleware to the top of the stack.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$middleware</var></dt>
<dd>Middleware function</dd>
<dt><var>$name</var></dt>
<dd>Name to register for this middleware.</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="before" id="_before">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_before">#</a>
<code><a href="source-class-GuzzleHttp.HandlerStack.html#145-155" title="Go to source code">before</a>( <span>string <var>$findName</var></span>, <span>callable <var>$middleware</var></span>, <span>string <var>$withName</var> = <span class="php-quote">''</span></span> )</code>
<div class="description short">
<p>Add a middleware before another middleware by name.</p>
</div>
<div class="description detailed hidden">
<p>Add a middleware before another middleware by name.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$findName</var></dt>
<dd>Middleware to find</dd>
<dt><var>$middleware</var></dt>
<dd>Middleware function</dd>
<dt><var>$withName</var></dt>
<dd>Name to register for this middleware.</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="after" id="_after">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_after">#</a>
<code><a href="source-class-GuzzleHttp.HandlerStack.html#157-167" title="Go to source code">after</a>( <span>string <var>$findName</var></span>, <span>callable <var>$middleware</var></span>, <span>string <var>$withName</var> = <span class="php-quote">''</span></span> )</code>
<div class="description short">
<p>Add a middleware after another middleware by name.</p>
</div>
<div class="description detailed hidden">
<p>Add a middleware after another middleware by name.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$findName</var></dt>
<dd>Middleware to find</dd>
<dt><var>$middleware</var></dt>
<dd>Middleware function</dd>
<dt><var>$withName</var></dt>
<dd>Name to register for this middleware.</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="remove" id="_remove">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_remove">#</a>
<code><a href="source-class-GuzzleHttp.HandlerStack.html#169-184" title="Go to source code">remove</a>( <span>callable|string <var>$remove</var></span> )</code>
<div class="description short">
<p>Remove a middleware by instance or name from the stack.</p>
</div>
<div class="description detailed hidden">
<p>Remove a middleware by instance or name from the stack.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$remove</var></dt>
<dd>Middleware to remove by instance or name.</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="resolve" id="_resolve">
<td class="attributes"><code>
public
callable
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_resolve">#</a>
<code><a href="source-class-GuzzleHttp.HandlerStack.html#186-206" title="Go to source code">resolve</a>( )</code>
<div class="description short">
<p>Compose the middleware and handler into a single callable function.</p>
</div>
<div class="description detailed hidden">
<p>Compose the middleware and handler into a single callable function.</p>
<h4>Returns</h4>
<div class="list">
callable
</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>