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

## Source for file category.php

Documentation is available at category.php

1. <?php
2. /**
3. * File containing the ezcFeedCategoryElement 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. * Class defining a category.
30. *
31. * @property string $term
32. * The readable value of the category.
33. * @property string $scheme
34. * The scheme (domain) value of the category.
35. * @property string $label
36. * The label value of the category.
37. * @property ezcFeedCategoryElement $category
38. * A subcategory of the category.
39. *
40. * @package Feed
41. * @version //autogentag//
42. */
43. class ezcFeedCategoryElement extends ezcFeedElement
44. {
45. /**
46. * The term (name) of the category.
47. *
48. * @var string
49. */
50. public $term ;
52. /**
53. * The scheme (domain) for the category.
54. *
55. * @var string
56. */
57. public $scheme ;
59. /**
60. * The label for the category.
61. *
62. * @var string
63. */
64. public $label ;
66. /**
67. * Subcategory for the category.
68. *
69. * @var ezcFeedCategoryElement
70. */
71. public $category ;
73. /**
74. * Adds a new element with name $name to the feed item and returns it.
75. *
76. * The subcategory is only used by the iTunes module (ezcFeedITunesModule).
77. *
78. * Example:
79. * <code>
80. * // $feed is an ezcFeed object
81. * $category = $feed->add( 'category' );
82. * $category->term = 'Technology';
83. * $subCategory = $category->add( 'category' );
84. * $subCategory->term = 'Gadgets';
85. * </code>
86. *
87. * @param string $name The name of the element to add
88. * @return ezcFeedCategoryElement
89. */
90. public function add ( $name )
91. {
92. if ( $name === 'category' )
93. {
94. $this-> category = new ezcFeedCategoryElement ();
95. return $this-> category ;
96. }
97. else
98. {
99. return parent::add( $name );
100. }
101. }
102. }
103. ?>

Documentation generated by phpDocumentor 1.4.3