## Apache Zeta Components Manual :: File Source for response.php

## Source for file response.php

Documentation is available at response.php

1. <?php
2. /**
3. * File containing the ezcMvcResponse class
4. *
5. * Licensed to the Apache Software Foundation (ASF) under one
6. * or more contributor license agreements. See the NOTICE file
7. * distributed with this work for additional information
8. * regarding copyright ownership. The ASF licenses this file
9. * to you under the Apache License, Version 2.0 (the
10. * "License"); you may not use this file except in compliance
11. * with the License. You may obtain a copy of the License at
12. *
13. * http://www.apache.org/licenses/LICENSE-2.0
14. *
15. * Unless required by applicable law or agreed to in writing,
16. * software distributed under the License is distributed on an
17. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18. * KIND, either express or implied. See the License for the
19. * specific language governing permissions and limitations
20. * under the License.
21. *
22. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
23. * @version //autogentag//
24. * @filesource
25. * @package MvcTools
26. */
28. /**
29. * Struct which holds the abstract response.
30. *
31. * @package MvcTools
32. * @version //autogentag//
33. */
34. class ezcMvcResponse extends ezcBaseStruct
35. {
36. /**
37. * Result status, which contains additional information about the result, such
38. * as a location header (for external redirects), or a www-authenticate information
39. * struct.
40. *
41. * @var ezcBaseStruct
42. */
43. public $status ;
45. /**
46. * Date of the result
47. *
48. * @var DateTime
49. */
50. public $date ;
52. /**
53. * Generator string, f.e. "eZ Components MvcTools"
54. *
55. * @var string
56. */
57. public $generator ;
59. /**
60. * Contains cache control settings
61. *
62. * @var ezcMvcResultCache
63. */
64. public $cache ;
66. /**
67. * Contains all the cookies to be set
68. *
69. * @var array(ezcMvcResultCookie)
70. */
71. public $cookies ;
73. /**
74. * Contains content meta-data, such as language, type, charset.
75. *
76. * @var ezcMvcResultContent
77. */
78. public $content ;
80. /**
81. * Server body.
82. *
83. * @var string
84. */
85. public $body ;
87. /**
88. * Constructs a new ezcMvcResponse.
89. *
90. * @param ezcBaseStruct $status
91. * @param DateTime $date
92. * @param string $generator
93. * @param ezcMvcResultCache $cache
94. * @param array(ezcMvcResultCookie) $cookies
95. * @param ezcMvcResultContent $content
96. * @param string $body
97. */
98. public function __construct ( $status = null, $date = null,
99. $generator = '', $cache = null, $cookies = array(), $content = null, $body = '' )
100. {
101. $this-> status = $status;
102. $this-> date = $date;
103. $this-> generator = $generator;
104. $this-> cache = $cache;
105. $this-> cookies = $cookies;
106. $this-> content = $content;
107. $this-> body = $body;
108. }
110. /**
111. * Returns a new instance of this class with the data specified by $array.
112. *
113. * $array contains all the data members of this class in the form:
114. * array('member_name'=>value).
115. *
116. * __set_state makes this class exportable with var_export.
117. * var_export() generates code, that calls this method when it
118. * is parsed with PHP.
119. *
120. * @param array(string=>mixed) $array
121. * @return ezcMvcResponse
122. */
123. static public function __set_state ( array $array )
124. {
125. return new ezcMvcResponse( $array['status'], $array['date'],
126. $array['generator'], $array['cache'], $array['cookies'],
127. $array['content'], $array['body'] );
128. }
129. }
130. ?>

Documentation generated by phpDocumentor 1.4.3