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

## Source for file element.php

Documentation is available at element.php

1. <?php
2. /**
3. * File containing the ezcFeedElement 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. * @package Feed
23. * @version //autogentag//
24. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
25. * @filesource
26. */
28. /**
29. * Base container for element data.
30. *
31. * @property string $language
32. * The language of a feed element. Mainly used by ATOM elements
33. * with the type ezcFeedTextElement (title, description, content,
34. * copyright, etc). It is inherited in all feed elements.
35. *
36. * @package Feed
37. * @version //autogentag//
38. * @mainclass
39. */
40. class ezcFeedElement
41. {
42. /**
43. * Holds the properties of this class.
44. *
45. * @var array(string=>mixed)
46. */
47. protected $properties = array();
49. /**
50. * Sets the property $name to $value.
51. *
52. * @throws ezcBasePropertyNotFoundException
53. * if the property $name does not exist
54. *
55. * @param string $name The property name
56. * @param mixed $value The property value
57. * @ignore
58. */
59. public function __set( $name, $value )
60. {
61. switch ( $name )
62. {
63. case 'language':
64. $this-> properties [$name] = $value;
65. break;
67. default:
68. throw new ezcBasePropertyNotFoundException ( $name );
69. }
70. }
72. /**
73. * Returns the value of property $name.
74. *
75. * @throws ezcBasePropertyNotFoundException
76. * if the property $name does not exist
77. *
78. * @param string $name The property name
79. * @return mixed
80. * @ignore
81. */
82. public function __get( $name )
83. {
84. switch ( $name )
85. {
86. case 'language':
87. if ( isset( $this-> properties [$name] ) )
88. {
89. return $this-> properties [$name];
90. }
91. break;
93. default:
94. throw new ezcBasePropertyNotFoundException ( $name );
95. }
96. }
98. /**
99. * Returns whether the property $name is set.
100. *
101. * @param string $name The property name
102. * @return bool
103. * @ignore
104. */
105. public function __isset( $name )
106. {
107. switch ( $name )
108. {
109. case 'language':
110. return isset( $this-> properties [$name] );
112. default:
113. return false;
114. }
115. }
116. }
117. ?>

Documentation generated by phpDocumentor 1.4.3