Arbit - project tracking

PHPillow - PHP CouchDB connector

Browse source code

File: / src/ classes/ response/ data.php

Type
text/plain text/plain
Last Author
kore
Version
143
Line Rev. Author Source
1 25 kore <?php
2 kore /**
3 kore * phpillow CouchDB backend
4 kore *
5 kore * This file is part of phpillow.
6 kore *
7 kore * phpillow is free software; you can redistribute it and/or modify it under
8 kore * the terms of the GNU Lesser General Public License as published by the Free
9 kore * Software Foundation; version 3 of the License.
10 kore *
11 kore * phpillow is distributed in the hope that it will be useful, but WITHOUT ANY
12 kore * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 kore * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
14 kore * more details.
15 kore *
16 kore * You should have received a copy of the GNU Lesser General Public License
17 kore * along with phpillow; if not, write to the Free Software Foundation, Inc., 51
18 kore * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 kore *
20 kore * @package Core
21 26 kore * @version $Revision: 143 $
22 25 kore * @license http://www.gnu.org/licenses/lgpl-3.0.txt LGPL
23 kore */
24 kore
25 kore /**
26 kore * Data response
27 kore *
28 kore * Does not contain JSON structures, but just raw data
29 kore *
30 143 kore * @property-read $contentType Mime type of returned data, as stored in
31 kore * CouchDB.
32 kore * @property-read $data Raw file data
33 kore *
34 25 kore * @package Core
35 26 kore * @version $Revision: 143 $
36 25 kore * @license http://www.gnu.org/licenses/lgpl-3.0.txt LGPL
37 kore */
38 kore class phpillowDataResponse extends phpillowResponse
39 kore {
40 kore /**
41 kore * Construct response object from raw data
42 kore *
43 33 kore * @param string $contentType
44 kore * @param string $body
45 25 kore * @return void
46 kore */
47 33 kore public function __construct( $contentType, $body )
48 25 kore {
49 33 kore $this->properties['contentType'] = $contentType;
50 55 kore $this->properties['data'] = $body;
51 25 kore }
52 kore }
53 kore