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

## Source for file translation_data.php

Documentation is available at translation_data.php

1. <?php
2. /**
3. *
4. * Licensed to the Apache Software Foundation (ASF) under one
5. * or more contributor license agreements. See the NOTICE file
6. * distributed with this work for additional information
7. * regarding copyright ownership. The ASF licenses this file
8. * to you under the Apache License, Version 2.0 (the
9. * "License"); you may not use this file except in compliance
10. * with the License. You may obtain a copy of the License at
11. *
12. * http://www.apache.org/licenses/LICENSE-2.0
13. *
14. * Unless required by applicable law or agreed to in writing,
15. * software distributed under the License is distributed on an
16. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17. * KIND, either express or implied. See the License for the
18. * specific language governing permissions and limitations
19. * under the License.
20. *
21. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
22. * @version //autogentag//
23. * @filesource
24. * @package Translation
25. */
27. /**
28. * A container to store one translatable string.
29. *
30. * This struct is used in various classes to store the data accompanying one
31. * translatable string.
32. *
33. * @package Translation
34. * @version //autogentag//
35. */
36. class ezcTranslationData extends ezcBaseStruct
37. {
38. /**
39. * Used when the translated string is up-to-date
40. */
41. const TRANSLATED = 0;
43. /**
44. * Used when a translated string has not been translated yet.
45. */
46. const UNFINISHED = 1;
48. /**
49. * Used when a translated string is obsolete.
50. */
51. const OBSOLETE = 2;
53. /**
54. * The original untranslated source string.
55. *
56. * @var string
57. */
58. public $original ;
60. /**
61. * The translated string.
62. *
63. * @var string
64. */
65. public $translation ;
67. /**
68. * Comment about the translation.
69. *
70. * @var string
71. */
72. public $comment ;
74. /**
75. * The status, which is one of the three constants TRANSLATED, UNFINISHED or OBSOLETE.
76. *
77. * @var integer
78. */
79. public $status ;
81. /**
82. * The filename the string was found in
83. *
84. * @var string
85. */
86. public $filename ;
88. /**
89. * The line where the string is
90. *
91. * @var integer
92. */
93. public $line ;
95. /**
96. * The column where the string is
97. *
98. * @var integer
99. */
100. public $column ;
102. /**
103. * Constructs an ezcTranslationData object.
104. *
105. * @param string $original
106. * @param string $translation
107. * @param string $comment
108. * @param int $status
109. * @param string $filename
110. * @param int $line
111. * @param int $column
112. */
113. function __construct ( $original, $translation, $comment, $status, $filename = null, $line = null, $column = null )
114. {
115. $this-> original = $original;
116. $this-> translation = $translation;
117. $this-> comment = $comment;
118. $this-> status = $status;
119. $this-> filename = $filename;
120. $this-> line = $line;
121. $this-> column = $column;
122. }
124. /**
125. * Returns a new instance of this class with the data specified by $array.
126. *
127. * $array contains all the data members of this class in the form:
128. * array('member_name'=>value).
129. *
130. * __set_state makes this class exportable with var_export.
131. * var_export() generates code, that calls this method when it
132. * is parsed with PHP.
133. *
134. * @param array(string=>mixed) $array
135. * @return ezcTranslationData
136. * @ignore
137. */
138. static public function __set_state( array $array )
139. {
140. return new ezcTranslationData( $array['original'], $array['translation'], $array['comment'], $array['status'], $array['filename'], $array['line'], $array['column'] );
141. }
142. }
143. ?>

Documentation generated by phpDocumentor 1.4.3