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.  */
  27.  
  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. {
  41.     /**
  42.      * Holds the properties of this class.
  43.      *
  44.      * @var array(string=>mixed) 
  45.      */
  46.     protected $properties = array();
  47.  
  48.     /**
  49.      * Sets the property $name to $value.
  50.      *
  51.      * @throws ezcBasePropertyNotFoundException
  52.      *          if the property $name does not exist
  53.      *
  54.      * @param string $name The property name
  55.      * @param mixed $value The property value
  56.      * @ignore
  57.      */
  58.     public function __set$name$value )
  59.     {
  60.         switch $name )
  61.         {
  62.             case 'language':
  63.                 $this->properties[$name$value;
  64.                 break;
  65.  
  66.             default:
  67.                 throw new ezcBasePropertyNotFoundException$name );
  68.         }
  69.     }
  70.  
  71.     /**
  72.      * Returns the value of property $name.
  73.      *
  74.      * @throws ezcBasePropertyNotFoundException
  75.      *          if the property $name does not exist
  76.      *
  77.      * @param string $name The property name
  78.      * @return mixed 
  79.      * @ignore
  80.      */
  81.     public function __get$name )
  82.     {
  83.         switch $name )
  84.         {
  85.             case 'language':
  86.                 if isset$this->properties[$name) )
  87.                 {
  88.                     return $this->properties[$name];
  89.                 }
  90.                 break;
  91.  
  92.             default:
  93.                 throw new ezcBasePropertyNotFoundException$name );
  94.         }
  95.     }
  96.  
  97.     /**
  98.      * Returns whether the property $name is set.
  99.      *
  100.      * @param string $name The property name
  101.      * @return bool 
  102.      * @ignore
  103.      */
  104.     public function __isset$name )
  105.     {
  106.         switch $name )
  107.         {
  108.             case 'language':
  109.                 return isset$this->properties[$name);
  110.  
  111.             default:
  112.                 return false;
  113.         }
  114.     }
  115. }
  116. ?>
Documentation generated by phpDocumentor 1.4.3