@@ -28,10 +28,10 @@ |
||
28 | 28 | */ |
29 | 29 | public function service($service) |
30 | 30 | { |
31 | - if(array_key_exists($service, $this->services) && class_exists($this->services[$service])){ |
|
31 | + if (array_key_exists($service, $this->services) && class_exists($this->services[$service])) { |
|
32 | 32 | $service = new $this->services[$service]; |
33 | 33 | |
34 | - if($service instanceof ServiceInterface){ |
|
34 | + if ($service instanceof ServiceInterface) { |
|
35 | 35 | return $this->service = $service; |
36 | 36 | } |
37 | 37 | } |
@@ -8,64 +8,64 @@ |
||
8 | 8 | */ |
9 | 9 | class ClientHttp extends BaseClient |
10 | 10 | { |
11 | - /** |
|
12 | - * [$protocol description] |
|
13 | - * @var [type] |
|
14 | - */ |
|
15 | - protected $method; |
|
11 | + /** |
|
12 | + * [$protocol description] |
|
13 | + * @var [type] |
|
14 | + */ |
|
15 | + protected $method; |
|
16 | 16 | |
17 | - /** |
|
18 | - * [$url description] |
|
19 | - * @var [type] |
|
20 | - */ |
|
21 | - protected $url; |
|
17 | + /** |
|
18 | + * [$url description] |
|
19 | + * @var [type] |
|
20 | + */ |
|
21 | + protected $url; |
|
22 | 22 | |
23 | - /** |
|
24 | - * [$cookie description] |
|
25 | - * @var [type] |
|
26 | - */ |
|
27 | - protected $cookie; |
|
23 | + /** |
|
24 | + * [$cookie description] |
|
25 | + * @var [type] |
|
26 | + */ |
|
27 | + protected $cookie; |
|
28 | 28 | |
29 | - /** |
|
30 | - * [$response description] |
|
31 | - * @var [type] |
|
32 | - */ |
|
33 | - protected $response; |
|
29 | + /** |
|
30 | + * [$response description] |
|
31 | + * @var [type] |
|
32 | + */ |
|
33 | + protected $response; |
|
34 | 34 | |
35 | - /** |
|
36 | - * [request description] |
|
37 | - * @param string $method [description] |
|
38 | - * @param string $url [description] |
|
39 | - * @param array $parameters [description] |
|
40 | - * @param array $files [description] |
|
41 | - * @param array $server [description] |
|
42 | - * @param [type] $content [description] |
|
43 | - * @param boolean $changeHistory [description] |
|
44 | - * @return @instance |
|
45 | - */ |
|
46 | - public function request($method, $url, array $parameters = array(), array $files = array(), array $server = array(), $content = null, $changeHistory = true) |
|
47 | - { |
|
48 | - $this->method = $method; |
|
49 | - $this->url = $url; |
|
35 | + /** |
|
36 | + * [request description] |
|
37 | + * @param string $method [description] |
|
38 | + * @param string $url [description] |
|
39 | + * @param array $parameters [description] |
|
40 | + * @param array $files [description] |
|
41 | + * @param array $server [description] |
|
42 | + * @param [type] $content [description] |
|
43 | + * @param boolean $changeHistory [description] |
|
44 | + * @return @instance |
|
45 | + */ |
|
46 | + public function request($method, $url, array $parameters = array(), array $files = array(), array $server = array(), $content = null, $changeHistory = true) |
|
47 | + { |
|
48 | + $this->method = $method; |
|
49 | + $this->url = $url; |
|
50 | 50 | |
51 | - return parent::request($this->method, $this->url, $parameters, $files, $server, $content, $changeHistory); |
|
52 | - } |
|
51 | + return parent::request($this->method, $this->url, $parameters, $files, $server, $content, $changeHistory); |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * [headers description] |
|
56 | - * @return [type] [description] |
|
57 | - */ |
|
58 | - private function headers() |
|
59 | - { |
|
60 | - return $this->response->getHeaders(); |
|
61 | - } |
|
54 | + /** |
|
55 | + * [headers description] |
|
56 | + * @return [type] [description] |
|
57 | + */ |
|
58 | + private function headers() |
|
59 | + { |
|
60 | + return $this->response->getHeaders(); |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * [cookie description] |
|
65 | - * @return [type] [description] |
|
66 | - */ |
|
67 | - public function cookie() |
|
68 | - { |
|
69 | - return $this->headers()['Set-Cookie'][0]; |
|
70 | - } |
|
63 | + /** |
|
64 | + * [cookie description] |
|
65 | + * @return [type] [description] |
|
66 | + */ |
|
67 | + public function cookie() |
|
68 | + { |
|
69 | + return $this->headers()['Set-Cookie'][0]; |
|
70 | + } |
|
71 | 71 | } |
72 | 72 | \ No newline at end of file |