mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-07-14 00:53:09 -07:00
v2: Updates
* Simplifies & beautifies everything * Introduces a new Class system. * Errors are defaulted to AWS's handler. * New function names & more efficient handling. * Should fix a majority of the errors. Please read the README for more!
This commit is contained in:
parent
ad0726e41e
commit
e6d7753dc8
1095 changed files with 45088 additions and 2911 deletions
|
@ -1,7 +1,9 @@
|
|||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Creates a composed Guzzle handler function by stacking middlewares on top of
|
||||
|
@ -9,7 +11,7 @@ use Psr\Http\Message\RequestInterface;
|
|||
*/
|
||||
class HandlerStack
|
||||
{
|
||||
/** @var callable */
|
||||
/** @var callable|null */
|
||||
private $handler;
|
||||
|
||||
/** @var array */
|
||||
|
@ -22,7 +24,7 @@ class HandlerStack
|
|||
* Creates a default handler stack that can be used by clients.
|
||||
*
|
||||
* The returned handler will wrap the provided handler or use the most
|
||||
* appropriate default handler for you system. The returned HandlerStack has
|
||||
* appropriate default handler for your system. The returned HandlerStack has
|
||||
* support for cookies, redirects, HTTP error exceptions, and preparing a body
|
||||
* before sending.
|
||||
*
|
||||
|
@ -59,6 +61,8 @@ class HandlerStack
|
|||
*
|
||||
* @param RequestInterface $request
|
||||
* @param array $options
|
||||
*
|
||||
* @return ResponseInterface|PromiseInterface
|
||||
*/
|
||||
public function __invoke(RequestInterface $request, array $options)
|
||||
{
|
||||
|
@ -206,7 +210,7 @@ class HandlerStack
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param string $name
|
||||
* @return int
|
||||
*/
|
||||
private function findByName($name)
|
||||
|
@ -223,10 +227,10 @@ class HandlerStack
|
|||
/**
|
||||
* Splices a function into the middleware list at a specific position.
|
||||
*
|
||||
* @param $findName
|
||||
* @param $withName
|
||||
* @param string $findName
|
||||
* @param string $withName
|
||||
* @param callable $middleware
|
||||
* @param $before
|
||||
* @param bool $before
|
||||
*/
|
||||
private function splice($findName, $withName, callable $middleware, $before)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue