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

## Source for file result.php

Documentation is available at result.php

1. <?php
2. /**
3. * File containing the ezcMvcResult 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. * This struct contains the result data to be formatted by a response writer.
30. *
31. * @package MvcTools
32. * @version //autogentag//
33. */
34. class ezcMvcResult extends ezcBaseStruct
35. {
36. /**
37. * Result status
38. *
39. * Set this to an object that implements the ezcMvcResultStatusObject, for
40. * example ezcMvcResultUnauthorized or ezcMvcExternalRedirect. These status
41. * objects are used by the response writers to take appropriate actions.
42. *
43. * @var ezcMvcResultStatusObject
44. */
45. public $status ;
47. /**
48. * Date of the result
49. *
50. * @var DateTime
51. */
52. public $date ;
54. /**
55. * Generator string, f.e. "eZ Components MvcTools"
56. *
57. * @var string
58. */
59. public $generator ;
61. /**
62. * Contains cache control settings
63. *
64. * @var ezcMvcResultCache
65. */
66. public $cache ;
68. /**
69. * Contains all the cookies to be set
70. *
71. * @var array(ezcMvcResultCookie)
72. */
73. public $cookies ;
75. /**
76. * Contains content meta-data, such as language, type, charset.
77. *
78. * @var ezcMvcResultContent
79. */
80. public $content ;
82. /**
83. * Result variables
84. *
85. * @var array(mixed)
86. */
87. public $variables ;
89. /**
90. * Constructs a new ezcMvcResult.
91. *
92. * @param int $status
93. * @param DateTime $date
94. * @param string $generator
95. * @param ezcMvcResultCache $cache
96. * @param array(ezcMvcResultCookie) $cookies
97. * @param ezcMvcResultContent $content
98. * @param array(mixed) $variables
99. */
100. public function __construct ( $status = 0, $date = null,
101. $generator = '', $cache = null, $cookies = array(), $content = null,
102. $variables = array() )
103. {
104. $this-> status = $status;
105. $this-> date = $date;
106. $this-> generator = $generator;
107. $this-> cache = $cache;
108. $this-> cookies = $cookies;
109. $this-> content = $content;
110. $this-> variables = $variables;
111. }
113. /**
114. * Returns a new instance of this class with the data specified by $array.
115. *
116. * $array contains all the data members of this class in the form:
117. * array('member_name'=>value).
118. *
119. * __set_state makes this class exportable with var_export.
120. * var_export() generates code, that calls this method when it
121. * is parsed with PHP.
122. *
123. * @param array(string=>mixed) $array
124. * @return ezcMvcResult
125. */
126. static public function __set_state ( array $array )
127. {
128. return new ezcMvcResult( $array['status'], $array['date'],
129. $array['generator'], $array['cache'], $array['cookies'],
130. $array['content'], $array['variables'] );
131. }
132. }
133. ?>

Documentation generated by phpDocumentor 1.4.3