[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/zend/Zend/Gdata/Calendar/ -> ListFeed.php (source)

   1  <?php
   2  
   3  /**
   4   * Zend Framework
   5   *
   6   * LICENSE
   7   *
   8   * This source file is subject to the new BSD license that is bundled
   9   * with this package in the file LICENSE.txt.
  10   * It is also available through the world-wide-web at this URL:
  11   * http://framework.zend.com/license/new-bsd
  12   * If you did not receive a copy of the license and are unable to
  13   * obtain it through the world-wide-web, please send an email
  14   * to [email protected] so we can send you a copy immediately.
  15   *
  16   * @category   Zend
  17   * @package    Zend_Gdata
  18   * @subpackage Calendar
  19   * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  20   * @license    http://framework.zend.com/license/new-bsd     New BSD License
  21   * @version    $Id$
  22   */
  23  
  24  /**
  25   * @see Zend_Gdata_Feed
  26   */
  27  require_once 'Zend/Gdata/Feed.php';
  28  
  29  /**
  30   * @see Zend_Gdata_Extension_Timezone
  31   */
  32  require_once 'Zend/Gdata/Calendar/Extension/Timezone.php';
  33  
  34  /**
  35   * Represents the meta-feed list of calendars
  36   *
  37   * @category   Zend
  38   * @package    Zend_Gdata
  39   * @subpackage Calendar
  40   * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  41   * @license    http://framework.zend.com/license/new-bsd     New BSD License
  42   */
  43  class Zend_Gdata_Calendar_ListFeed extends Zend_Gdata_Feed
  44  {
  45      protected $_timezone = null;
  46  
  47      /**
  48       * The classname for individual feed elements.
  49       *
  50       * @var string
  51       */
  52      protected $_entryClassName = 'Zend_Gdata_Calendar_ListEntry';
  53  
  54      /**
  55       * The classname for the feed.
  56       *
  57       * @var string
  58       */
  59      protected $_feedClassName = 'Zend_Gdata_Calendar_ListFeed';
  60  
  61      public function __construct($element = null)
  62      {
  63          $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
  64          parent::__construct($element);
  65      }
  66  
  67      public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
  68      {
  69          $element = parent::getDOM($doc, $majorVersion, $minorVersion);
  70          if ($this->_timezone != null) {
  71              $element->appendChild($this->_timezone->getDOM($element->ownerDocument));
  72          }
  73          return $element;
  74      }
  75  
  76      protected function takeChildFromDOM($child)
  77      {
  78          $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
  79          switch ($absoluteNodeName) {
  80          case $this->lookupNamespace('gCal') . ':' . 'timezone';
  81              $timezone = new Zend_Gdata_Calendar_Extension_Timezone();
  82              $timezone->transferFromDOM($child);
  83              $this->_timezone = $timezone;
  84              break;
  85          default:
  86              parent::takeChildFromDOM($child);
  87              break;
  88          }
  89      }
  90  
  91      public function getTimezone()
  92      {
  93          return $this->_timezone;
  94      }
  95  
  96      /**
  97       * @param Zend_Gdata_Calendar_Extension_Timezone $value
  98       * @return Zend_Gdata_Extension_ListEntry Provides a fluent interface
  99       */
 100      public function setTimezone($value)
 101      {
 102          $this->_timezone = $value;
 103          return $this;
 104      }
 105  
 106  }


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1