diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-04 21:33:05 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-04 21:33:05 -0500 |
commit | 135b921db75da5995eab7e36393ecd4d2b0bc66f (patch) | |
tree | 46efc60fcf1f9d5c57ab1fb9418c2acfbda0698a /vendor/OAuth/Common/Http/Client/AbstractClient.php | |
parent | 850645dd6b22f5b495d1680e0b49540e0ebf9bd3 (diff) |
Switch to composer
Diffstat (limited to 'vendor/OAuth/Common/Http/Client/AbstractClient.php')
-rwxr-xr-x | vendor/OAuth/Common/Http/Client/AbstractClient.php | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/vendor/OAuth/Common/Http/Client/AbstractClient.php b/vendor/OAuth/Common/Http/Client/AbstractClient.php deleted file mode 100755 index 94000b18..00000000 --- a/vendor/OAuth/Common/Http/Client/AbstractClient.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php - -namespace OAuth\Common\Http\Client; - -/** - * Abstract HTTP client - */ -abstract class AbstractClient implements ClientInterface -{ - /** - * @var string The user agent string passed to services - */ - protected $userAgent; - - /** - * @var int The maximum number of redirects - */ - protected $maxRedirects = 5; - - /** - * @var int The maximum timeout - */ - protected $timeout = 15; - - /** - * Creates instance - * - * @param string $userAgent The UA string the client will use - */ - public function __construct($userAgent = 'PHPoAuthLib') - { - $this->userAgent = $userAgent; - } - - /** - * @param int $redirects Maximum redirects for client - * - * @return ClientInterface - */ - public function setMaxRedirects($redirects) - { - $this->maxRedirects = $redirects; - - return $this; - } - - /** - * @param int $timeout Request timeout time for client in seconds - * - * @return ClientInterface - */ - public function setTimeout($timeout) - { - $this->timeout = $timeout; - - return $this; - } - - /** - * @param array $headers - */ - public function normalizeHeaders(&$headers) - { - // Normalize headers - array_walk( - $headers, - function (&$val, &$key) { - $key = ucfirst(strtolower($key)); - $val = ucfirst(strtolower($key)) . ': ' . $val; - } - ); - } -} |