adding zend project folders into old campcaster.

This commit is contained in:
naomiaro 2010-12-07 14:19:27 -05:00
parent 56abfaf28e
commit 7ef0c18b26
4045 changed files with 1054952 additions and 0 deletions

View file

@ -0,0 +1,125 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AccessLevel.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* Represents the gCal:accessLevel element used by the Calendar data API
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Calendar_Extension_AccessLevel extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gCal';
protected $_rootElement = 'accesslevel';
protected $_value = null;
/**
* Constructs a new Zend_Gdata_Calendar_Extension_AccessLevel object.
* @param string $value (optional) The text content of the element.
*/
public function __construct($value = null)
{
$this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
parent::__construct();
$this->_value = $value;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_value != null) {
$element->setAttribute('value', $this->_value);
}
return $element;
}
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'value':
$this->_value = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/**
* Get the value for this element's value attribute.
*
* @return string The attribute being modified.
*/
public function getValue()
{
return $this->_value;
}
/**
* Set the value for this element's value attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Calendar_Extension_Selected The element being modified.
*/
public function setValue($value)
{
$this->_value = $value;
return $this;
}
/**
* Magic toString method allows using this directly via echo
* Works best in PHP >= 4.2.0
*/
public function __toString()
{
return $this->getValue();
}
}

View file

@ -0,0 +1,125 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Color.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* Represents the gCal:color element used by the Calendar data API
* to define the color of a calendar in the UI.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Calendar_Extension_Color extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gCal';
protected $_rootElement = 'color';
protected $_value = null;
/**
* Constructs a new Zend_Gdata_Calendar_Extension_Color object.
* @param string $value (optional) The text content of the element.
*/
public function __construct($value = null)
{
$this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
parent::__construct();
$this->_value = $value;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_value != null) {
$element->setAttribute('value', $this->_value);
}
return $element;
}
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'value':
$this->_value = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/**
* Get the value for this element's value attribute.
*
* @return string The value associated with this attribute.
*/
public function getValue()
{
return $this->_value;
}
/**
* Set the value for this element's value attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Calendar_Extension_Color The element being modified.
*/
public function setValue($value)
{
$this->_value = $value;
return $this;
}
/**
* Magic toString method allows using this directly via echo
* Works best in PHP >= 4.2.0
*/
public function __toString()
{
return $this->_value;
}
}

View file

@ -0,0 +1,134 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Hidden.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* Represents the gCal:hidden element used by the Calendar data API
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Calendar_Extension_Hidden extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gCal';
protected $_rootElement = 'hidden';
protected $_value = null;
/**
* Constructs a new Zend_Gdata_Calendar_Extension_Hidden object.
* @param bool $value (optional) The value of the element.
*/
public function __construct($value = null)
{
$this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
parent::__construct();
$this->_value = $value;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_value !== null) {
$element->setAttribute('value', ($this->_value ? "true" : "false"));
}
return $element;
}
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'value':
if ($attribute->nodeValue == "true") {
$this->_value = true;
}
else if ($attribute->nodeValue == "false") {
$this->_value = false;
}
else {
require_once 'Zend/Gdata/App/InvalidArgumentException.php';
throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value.");
}
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/**
* Get the value for this element's value attribute.
*
* @return string The requested attribute.
*/
public function getValue()
{
return $this->_value;
}
/**
* Set the value for this element's value attribute.
*
* @param bool $value The desired value for this attribute.
* @return Zend_Gdata_Calendar_Extension_Hidden The element being modified.
*/
public function setValue($value)
{
$this->_value = $value;
return $this;
}
/**
* Magic toString method allows using this directly via echo
* Works best in PHP >= 4.2.0
*/
public function __toString()
{
return $this->_value;
}
}

View file

@ -0,0 +1,125 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Link.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Entry
*/
require_once 'Zend/Gdata/App/Extension/Link.php';
/**
* @see Zend_Gdata_Entry
*/
require_once 'Zend/Gdata/Calendar/Extension/WebContent.php';
/**
* Specialized Link class for use with Calendar. Enables use of gCal extension elements.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Calendar_Extension_Link extends Zend_Gdata_App_Extension_Link
{
protected $_webContent = null;
/**
* Constructs a new Zend_Gdata_Calendar_Extension_Link object.
* @see Zend_Gdata_App_Extension_Link#__construct
* @param Zend_Gdata_Calendar_Extension_Webcontent $webContent
*/
public function __construct($href = null, $rel = null, $type = null,
$hrefLang = null, $title = null, $length = null, $webContent = null)
{
$this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
parent::__construct($href, $rel, $type, $hrefLang, $title, $length);
$this->_webContent = $webContent;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_webContent != null) {
$element->appendChild($this->_webContent->getDOM($element->ownerDocument));
}
return $element;
}
/**
* Creates individual Entry objects of the appropriate type and
* stores them as members of this entry based upon DOM data.
*
* @param DOMNode $child The DOMNode to process
*/
protected function takeChildFromDOM($child)
{
$absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
switch ($absoluteNodeName) {
case $this->lookupNamespace('gCal') . ':' . 'webContent':
$webContent = new Zend_Gdata_Calendar_Extension_WebContent();
$webContent->transferFromDOM($child);
$this->_webContent = $webContent;
break;
default:
parent::takeChildFromDOM($child);
break;
}
}
/**
* Get the value for this element's WebContent attribute.
*
* @return Zend_Gdata_Calendar_Extension_Webcontent The WebContent value
*/
public function getWebContent()
{
return $this->_webContent;
}
/**
* Set the value for this element's WebContent attribute.
*
* @param Zend_Gdata_Calendar_Extension_WebContent $value The desired value for this attribute.
* @return Zend_Calendar_Extension_Link The element being modified. Provides a fluent interface.
*/
public function setWebContent($value)
{
$this->_webContent = $value;
return $this;
}
}

View file

@ -0,0 +1,132 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: QuickAdd.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* Represents the gCal:quickAdd element used by the Calendar data API
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Calendar_Extension_QuickAdd extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gCal';
protected $_rootElement = 'quickadd';
protected $_value = null;
/**
* Constructs a new Zend_Gdata_Calendar_Extension_QuickAdd object.
* @param string $value (optional) The text content of the element.
*/
public function __construct($value = null)
{
$this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
parent::__construct();
$this->_value = $value;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_value !== null) {
$element->setAttribute('value', ($this->_value ? "true" : "false"));
}
return $element;
}
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'value':
if ($attribute->nodeValue == "true") {
$this->_value = true;
}
else if ($attribute->nodeValue == "false") {
$this->_value = false;
}
else {
throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value.");
}
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/**
* Get the value for this element's value attribute.
*
* @return string The value associated with this attribute.
*/
public function getValue()
{
return $this->_value;
}
/**
* Set the value for this element's value attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Calendar_Extension_QuickAdd The element being modified.
*/
public function setValue($value)
{
$this->_value = $value;
return $this;
}
/**
* Magic toString method allows using this directly via echo
* Works best in PHP >= 4.2.0
*/
public function __toString()
{
return $this->getValue();
}
}

View file

@ -0,0 +1,133 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Selected.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* Represents the gCal:selected element used by the Calendar data API
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Calendar_Extension_Selected extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gCal';
protected $_rootElement = 'selected';
protected $_value = null;
/**
* Constructs a new Zend_Gdata_Calendar_Extension_Selected object.
* @param bool $value (optional) The value of the element.
*/
public function __construct($value = null)
{
$this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
parent::__construct();
$this->_value = $value;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_value !== null) {
$element->setAttribute('value', ($this->_value ? "true" : "false"));
}
return $element;
}
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'value':
if ($attribute->nodeValue == "true") {
$this->_value = true;
}
else if ($attribute->nodeValue == "false") {
$this->_value = false;
}
else {
require_once 'Zend/Gdata/App/InvalidArgumentException.php';
throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value.");
}
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/**
* Get the value for this element's value attribute.
*
* @return bool The value associated with this attribute.
*/
public function getValue()
{
return $this->_value;
}
/**
* Set the value for this element's value attribute.
*
* @param bool $value The desired value for this attribute.
* @return Zend_Gdata_Calendar_Extension_Selected The element being modified.
*/
public function setValue($value)
{
$this->_value = $value;
return $this;
}
/**
* Magic toString method allows using this directly via echo
* Works best in PHP >= 4.2.0
*/
public function __toString()
{
return $this->_value;
}
}

View file

@ -0,0 +1,132 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: SendEventNotifications.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* Data model class to represent an entry's sendEventNotifications
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Calendar_Extension_SendEventNotifications extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gCal';
protected $_rootElement = 'sendEventNotifications';
protected $_value = null;
/**
* Constructs a new Zend_Gdata_Extension_SendEventNotifications object.
* @param bool $value (optional) SendEventNotifications value as URI.
*/
public function __construct($value = null)
{
$this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
parent::__construct();
$this->_value = $value;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_value !== null) {
$element->setAttribute('value', ($this->_value ? "true" : "false"));
}
return $element;
}
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'value':
if ($attribute->nodeValue == "true") {
$this->_value = true;
}
else if ($attribute->nodeValue == "false") {
$this->_value = false;
}
else {
throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value.");
}
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/**
* Get the value for this element's Value attribute.
*
* @return string The requested attribute.
*/
public function getValue()
{
return $this->_value;
}
/**
* Set the value for this element's Value attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Extension_SendEventNotifications The element being modified.
*/
public function setValue($value)
{
$this->_value = $value;
return $this;
}
/**
* Magic toString method allows using this directly via echo
* Works best in PHP >= 4.2.0
*/
public function __toString()
{
return $this->getValue();
}
}

View file

@ -0,0 +1,124 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Timezone.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* Represents the gCal:timezone element used by the Calendar data API
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Calendar_Extension_Timezone extends Zend_Gdata_Extension
{
protected $_rootNamespace = 'gCal';
protected $_rootElement = 'timezone';
protected $_value = null;
/**
* Constructs a new Zend_Gdata_Calendar_Extension_Timezone object.
* @param string $value (optional) The text content of the element.
*/
public function __construct($value = null)
{
$this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
parent::__construct();
$this->_value = $value;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_value != null) {
$element->setAttribute('value', $this->_value);
}
return $element;
}
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'value':
$this->_value = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/**
* Get the value for this element's value attribute.
*
* @return string The value associated with this attribute.
*/
public function getValue()
{
return $this->_value;
}
/**
* Set the value for this element's value attribute.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Calendar_Extension_Timezone The element being modified.
*/
public function setValue($value)
{
$this->_value = $value;
return $this;
}
/**
* Magic toString method allows using this directly via echo
* Works best in PHP >= 4.2.0
*/
public function __toString()
{
return $this->getValue();
}
}

View file

@ -0,0 +1,177 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: WebContent.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* Represents the gCal:webContent element used by the Calendar data API
*
* @category Zend
* @package Zend_Gdata
* @subpackage Calendar
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_Calendar_Extension_WebContent extends Zend_Gdata_App_Extension
{
protected $_rootNamespace = 'gCal';
protected $_rootElement = 'webContent';
protected $_url = null;
protected $_height = null;
protected $_width = null;
/**
* Constructs a new Zend_Gdata_Calendar_Extension_WebContent object.
* @param string $url (optional) The value for this element's URL attribute.
* @param string $height (optional) The value for this element's height attribute.
* @param string $width (optional) The value for this element's width attribute.
*/
public function __construct($url = null, $height = null, $width = null)
{
$this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces);
parent::__construct();
$this->_url = $url;
$this->_height = $height;
$this->_width = $width;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->url != null) {
$element->setAttribute('url', $this->_url);
}
if ($this->height != null) {
$element->setAttribute('height', $this->_height);
}
if ($this->width != null) {
$element->setAttribute('width', $this->_width);
}
return $element;
}
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'url':
$this->_url = $attribute->nodeValue;
break;
case 'height':
$this->_height = $attribute->nodeValue;
break;
case 'width':
$this->_width = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/**
* Get the value for this element's URL attribute.
*
* @return string The desired value for this attribute.
*/
public function getURL()
{
return $this->_url;
}
/**
* Set the value for this element's URL attribute.
*
* @param bool $value The desired value for this attribute.
* @return Zend_Gdata_Calendar_Extension_WebContent The element being modified.
*/
public function setURL($value)
{
$this->_url = $value;
return $this;
}
/**
* Get the value for this element's height attribute.
*
* @return int The desired value for this attribute.
*/
public function getHeight()
{
return $this->_height;
}
/**
* Set the value for this element's height attribute.
*
* @param int $value The desired value for this attribute.
* @return Zend_Gdata_Calendar_Extension_WebContent The element being modified.
*/
public function setHeight($value)
{
$this->_height = $value;
return $this;
}
/**
* Get the value for this element's height attribute.
*
* @return int The desired value for this attribute.
*/
public function getWidth()
{
return $this->_width;
}
/**
* Set the value for this element's height attribute.
*
* @param int $value The desired value for this attribute.
* @return Zend_Gdata_Calendar_Extension_WebContent The element being modified.
*/
public function setWidth($value)
{
$this->_width = $value;
return $this;
}
}