~tcuthbert/wordpress/openstack-objectstorage

« back to all changes in this revision

Viewing changes to src/OpenStack/Common/Transport/Guzzle/ResponseAdapter.php

  • Committer: Jacek Nykis
  • Date: 2015-02-11 15:35:31 UTC
  • Revision ID: jacek.nykis@canonical.com-20150211153531-hmy6zi0ov2qfkl0b
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
/*
 
4
 * (c) Copyright 2014 Rackspace US, Inc.
 
5
 *
 
6
 * Licensed under the Apache License, Version 2.0 (the "License"); you may
 
7
 * not use this file except in compliance with the License. You may obtain
 
8
 * a copy of the License at
 
9
 *
 
10
 *      http://www.apache.org/licenses/LICENSE-2.0
 
11
 *
 
12
 * Unless required by applicable law or agreed to in writing, software
 
13
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 
14
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 
15
 * License for the specific language governing permissions and limitations
 
16
 * under the License.
 
17
 */
 
18
 
 
19
namespace OpenStack\Common\Transport\Guzzle;
 
20
 
 
21
use GuzzleHttp\Message\ResponseInterface as GuzzleResponseInterface;
 
22
use OpenStack\Common\Transport\ResponseInterface;
 
23
 
 
24
/**
 
25
 * This class wraps {@see \GuzzleHttp\Message\ResponseInterface}.
 
26
 *
 
27
 * @inheritDoc
 
28
 */
 
29
class ResponseAdapter extends MessageAdapter implements ResponseInterface
 
30
{
 
31
    public function __construct(GuzzleResponseInterface $guzzleResponse)
 
32
    {
 
33
        $this->setMessage($guzzleResponse);
 
34
    }
 
35
 
 
36
    public function getStatusCode()
 
37
    {
 
38
        return $this->message->getStatusCode();
 
39
    }
 
40
 
 
41
    public function getReasonPhrase()
 
42
    {
 
43
        return $this->message->getReasonPhrase();
 
44
    }
 
45
 
 
46
    public function json()
 
47
    {
 
48
        return $this->message->json();
 
49
    }
 
50
}
 
 
b'\\ No newline at end of file'