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.  */
  27.  
  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. {
  44.     /**
  45.      * The term (name) of the category.
  46.      *
  47.      * @var string 
  48.      */
  49.     public $term;
  50.  
  51.     /**
  52.      * The scheme (domain) for the category.
  53.      *
  54.      * @var string 
  55.      */
  56.     public $scheme;
  57.  
  58.     /**
  59.      * The label for the category.
  60.      *
  61.      * @var string 
  62.      */
  63.     public $label;
  64.  
  65.     /**
  66.      * Subcategory for the category.
  67.      *
  68.      * @var ezcFeedCategoryElement 
  69.      */
  70.     public $category;
  71.  
  72.     /**
  73.      * Adds a new element with name $name to the feed item and returns it.
  74.      *
  75.      * The subcategory is only used by the iTunes module (ezcFeedITunesModule).
  76.      *
  77.      * Example:
  78.      * <code>
  79.      * // $feed is an ezcFeed object
  80.      * $category = $feed->add( 'category' );
  81.      * $category->term = 'Technology';
  82.      * $subCategory = $category->add( 'category' );
  83.      * $subCategory->term = 'Gadgets';
  84.      * </code>
  85.      *
  86.      * @param string $name The name of the element to add
  87.      * @return ezcFeedCategoryElement 
  88.      */
  89.     public function add$name )
  90.     {
  91.         if $name === 'category' )
  92.         {
  93.             $this->category = new ezcFeedCategoryElement();
  94.             return $this->category;
  95.         }
  96.         else
  97.         {
  98.             return parent::add$name );
  99.         }
  100.     }
  101. }
  102. ?>
Documentation generated by phpDocumentor 1.4.3