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

## Source for file request_file.php

Documentation is available at request_file.php

1. <?php
2. /**
3. * File containing the ezcMvcRequestFile 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 a file bundled with the request.
30. *
31. * @package MvcTools
32. * @version //autogentag//
33. */
34. class ezcMvcRequestFile extends ezcBaseStruct
35. {
36. /**
37. * File mimetype.
38. *
39. * @var string
40. */
41. public $mimeType ;
43. /**
44. * File name.
45. *
46. * @var string
47. */
48. public $name ;
50. /**
51. * File size.
52. *
53. * @var int
54. */
55. public $size ;
57. /**
58. * Status of the upload.
59. *
60. * @todo Mention what the different status codes mean.
61. * @var mixed
62. */
63. public $status ;
65. /**
66. * Temporary file path.
67. *
68. * @var string
69. */
70. public $tmpPath ;
72. /**
73. * Constructs a new ezcMvcRequestFile.
74. *
75. * @param string $mimeType
76. * @param string $name
77. * @param int $size
78. * @param mixed $status
79. * @param string $tmpPath
80. */
81. public function __construct ( $mimeType = '', $name = '',
82. $size = 0, $status = null, $tmpPath = '' )
83. {
84. $this-> mimeType = $mimeType;
85. $this-> name = $name;
86. $this-> size = $size;
87. $this-> status = $status;
88. $this-> tmpPath = $tmpPath;
89. }
91. /**
92. * Returns a new instance of this class with the data specified by $array.
93. *
94. * $array contains all the data members of this class in the form:
95. * array('member_name'=>value).
96. *
97. * __set_state makes this class exportable with var_export.
98. * var_export() generates code, that calls this method when it
99. * is parsed with PHP.
100. *
101. * @param array(string=>mixed) $array
102. * @return ezcMvcRequestFile
103. */
104. static public function __set_state ( array $array )
105. {
106. return new ezcMvcRequestFile( $array['mimeType'], $array['name'],
107. $array['size'], $array['status'], $array['tmpPath'] );
108. }
109. }
110. ?>

Documentation generated by phpDocumentor 1.4.3