CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly.

This commit is contained in:
Paul Baranowski 2011-04-14 18:55:04 -04:00
parent 514777e8d2
commit b11cbd8159
4546 changed files with 138 additions and 51 deletions

View file

@ -0,0 +1,43 @@
<?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 App
* @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: Author.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension/Person.php';
/**
* Represents the atom:author element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Author extends Zend_Gdata_App_Extension_Person
{
protected $_rootElement = 'author';
}

View file

@ -0,0 +1,140 @@
<?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 App
* @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: Category.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Represents the atom:category element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Category extends Zend_Gdata_App_Extension
{
protected $_rootElement = 'category';
protected $_term = null;
protected $_scheme = null;
protected $_label = null;
public function __construct($term = null, $scheme = null, $label=null)
{
parent::__construct();
$this->_term = $term;
$this->_scheme = $scheme;
$this->_label = $label;
}
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_term !== null) {
$element->setAttribute('term', $this->_term);
}
if ($this->_scheme !== null) {
$element->setAttribute('scheme', $this->_scheme);
}
if ($this->_label !== null) {
$element->setAttribute('label', $this->_label);
}
return $element;
}
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'term':
$this->_term = $attribute->nodeValue;
break;
case 'scheme':
$this->_scheme = $attribute->nodeValue;
break;
case 'label':
$this->_label = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/**
* @return string|null
*/
public function getTerm()
{
return $this->_term;
}
/**
* @param string|null $value
* @return Zend_Gdata_App_Extension_Category Provides a fluent interface
*/
public function setTerm($value)
{
$this->_term = $value;
return $this;
}
/**
* @return string|null
*/
public function getScheme()
{
return $this->_scheme;
}
/**
* @param string|null $value
* @return Zend_Gdata_App_Extension_Category Provides a fluent interface
*/
public function setScheme($value)
{
$this->_scheme = $value;
return $this;
}
/**
* @return string|null
*/
public function getLabel()
{
return $this->_label;
}
/**
* @param string|null $value
* @return Zend_Gdata_App_Extension_Category Provides a fluent interface
*/
public function setLabel($value)
{
$this->_label = $value;
return $this;
}
}

View file

@ -0,0 +1,88 @@
<?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 App
* @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: Content.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension_Text
*/
require_once 'Zend/Gdata/App/Extension/Text.php';
/**
* Represents the atom:content element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Content extends Zend_Gdata_App_Extension_Text
{
protected $_rootElement = 'content';
protected $_src = null;
public function __construct($text = null, $type = 'text', $src = null)
{
parent::__construct($text, $type);
$this->_src = $src;
}
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_src !== null) {
$element->setAttribute('src', $this->_src);
}
return $element;
}
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'src':
$this->_src = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/**
* @return string
*/
public function getSrc()
{
return $this->_src;
}
/**
* @param string $value
* @return Zend_Gdata_App_Entry Provides a fluent interface
*/
public function setSrc($value)
{
$this->_src = $value;
return $this;
}
}

View file

@ -0,0 +1,43 @@
<?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 App
* @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: Contributor.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension/Person.php';
/**
* Represents the atom:contributor element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Contributor extends Zend_Gdata_App_Extension_Person
{
protected $_rootElement = 'contributor';
}

View file

@ -0,0 +1,98 @@
<?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 App
* @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: Control.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* @see Zend_Gdata_App_Extension_Draft
*/
require_once 'Zend/Gdata/App/Extension/Draft.php';
/**
* Represents the app:control element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Control extends Zend_Gdata_App_Extension
{
protected $_rootNamespace = 'app';
protected $_rootElement = 'control';
protected $_draft = null;
public function __construct($draft = null)
{
parent::__construct();
$this->_draft = $draft;
}
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_draft != null) {
$element->appendChild($this->_draft->getDOM($element->ownerDocument));
}
return $element;
}
protected function takeChildFromDOM($child)
{
$absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
switch ($absoluteNodeName) {
case $this->lookupNamespace('app') . ':' . 'draft':
$draft = new Zend_Gdata_App_Extension_Draft();
$draft->transferFromDOM($child);
$this->_draft = $draft;
break;
default:
parent::takeChildFromDOM($child);
break;
}
}
/**
* @return Zend_Gdata_App_Extension_Draft
*/
public function getDraft()
{
return $this->_draft;
}
/**
* @param Zend_Gdata_App_Extension_Draft $value
* @return Zend_Gdata_App_Entry Provides a fluent interface
*/
public function setDraft($value)
{
$this->_draft = $value;
return $this;
}
}

View file

@ -0,0 +1,50 @@
<?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 App
* @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: Draft.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Represents the app:draft element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Draft extends Zend_Gdata_App_Extension
{
protected $_rootNamespace = 'app';
protected $_rootElement = 'draft';
public function __construct($text = null)
{
parent::__construct();
$this->_text = $text;
}
}

View file

@ -0,0 +1,49 @@
<?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 App
* @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: Edited.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Represents the app:edited element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Edited extends Zend_Gdata_App_Extension
{
protected $_rootElement = 'edited';
public function __construct($text = null)
{
parent::__construct();
$this->_text = $text;
}
}

View file

@ -0,0 +1,58 @@
<?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 App
* @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: Element.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Class that represents elements which were not handled by other parsing
* code in the library.
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Element extends Zend_Gdata_App_Extension
{
public function __construct($rootElement=null, $rootNamespace=null, $rootNamespaceURI=null, $text=null){
parent::__construct();
$this->_rootElement = $rootElement;
$this->_rootNamespace = $rootNamespace;
$this->_rootNamespaceURI = $rootNamespaceURI;
$this->_text = $text;
}
public function transferFromDOM($node)
{
parent::transferFromDOM($node);
$this->_rootNamespace = null;
$this->_rootNamespaceURI = $node->namespaceURI;
$this->_rootElement = $node->localName;
}
}

View file

@ -0,0 +1,49 @@
<?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 App
* @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: Email.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Represents the atom:email element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Email extends Zend_Gdata_App_Extension
{
protected $_rootElement = 'email';
public function __construct($text = null)
{
parent::__construct();
$this->_text = $text;
}
}

View file

@ -0,0 +1,115 @@
<?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 App
* @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: Generator.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Represents the atom:generator element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Generator extends Zend_Gdata_App_Extension
{
protected $_rootElement = 'generator';
protected $_uri = null;
protected $_version = null;
public function __construct($text = null, $uri = null, $version = null)
{
parent::__construct();
$this->_text = $text;
$this->_uri = $uri;
$this->_version = $version;
}
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_uri !== null) {
$element->setAttribute('uri', $this->_uri);
}
if ($this->_version !== null) {
$element->setAttribute('version', $this->_version);
}
return $element;
}
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'uri':
$this->_uri = $attribute->nodeValue;
break;
case 'version':
$this->_version= $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/**
* @return Zend_Gdata_App_Extension_Uri
*/
public function getUri()
{
return $this->_uri;
}
/**
* @param Zend_Gdata_App_Extension_Uri $value
* @return Zend_Gdata_App_Entry Provides a fluent interface
*/
public function setUri($value)
{
$this->_uri = $value;
return $this;
}
/**
* @return Zend_Gdata_App_Extension_Version
*/
public function getVersion()
{
return $this->_version;
}
/**
* @param Zend_Gdata_App_Extension_Version $value
* @return Zend_Gdata_App_Entry Provides a fluent interface
*/
public function setVersion($value)
{
$this->_version = $value;
return $this;
}
}

View file

@ -0,0 +1,49 @@
<?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 App
* @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: Icon.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Represents the atom:icon element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Icon extends Zend_Gdata_App_Extension
{
protected $_rootElement = 'icon';
public function __construct($text = null)
{
parent::__construct();
$this->_text = $text;
}
}

View file

@ -0,0 +1,49 @@
<?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 App
* @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: Id.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Represents the atom:id element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Id extends Zend_Gdata_App_Extension
{
protected $_rootElement = 'id';
public function __construct($text = null)
{
parent::__construct();
$this->_text = $text;
}
}

View file

@ -0,0 +1,219 @@
<?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 App
* @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_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* Data model for representing an atom:link element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Link extends Zend_Gdata_App_Extension
{
protected $_rootElement = 'link';
protected $_href = null;
protected $_rel = null;
protected $_type = null;
protected $_hrefLang = null;
protected $_title = null;
protected $_length = null;
public function __construct($href = null, $rel = null, $type = null,
$hrefLang = null, $title = null, $length = null)
{
parent::__construct();
$this->_href = $href;
$this->_rel = $rel;
$this->_type = $type;
$this->_hrefLang = $hrefLang;
$this->_title = $title;
$this->_length = $length;
}
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_href !== null) {
$element->setAttribute('href', $this->_href);
}
if ($this->_rel !== null) {
$element->setAttribute('rel', $this->_rel);
}
if ($this->_type !== null) {
$element->setAttribute('type', $this->_type);
}
if ($this->_hrefLang !== null) {
$element->setAttribute('hreflang', $this->_hrefLang);
}
if ($this->_title !== null) {
$element->setAttribute('title', $this->_title);
}
if ($this->_length !== null) {
$element->setAttribute('length', $this->_length);
}
return $element;
}
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'href':
$this->_href = $attribute->nodeValue;
break;
case 'rel':
$this->_rel = $attribute->nodeValue;
break;
case 'type':
$this->_type = $attribute->nodeValue;
break;
case 'hreflang':
$this->_hrefLang = $attribute->nodeValue;
break;
case 'title':
$this->_title = $attribute->nodeValue;
break;
case 'length':
$this->_length = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/**
* @return string|null
*/
public function getHref()
{
return $this->_href;
}
/**
* @param string|null $value
* @return Zend_Gdata_App_Entry Provides a fluent interface
*/
public function setHref($value)
{
$this->_href = $value;
return $this;
}
/**
* @return string|null
*/
public function getRel()
{
return $this->_rel;
}
/**
* @param string|null $value
* @return Zend_Gdata_App_Entry Provides a fluent interface
*/
public function setRel($value)
{
$this->_rel = $value;
return $this;
}
/**
* @return string|null
*/
public function getType()
{
return $this->_type;
}
/**
* @param string|null $value
* @return Zend_Gdata_App_Entry Provides a fluent interface
*/
public function setType($value)
{
$this->_type = $value;
return $this;
}
/**
* @return string|null
*/
public function getHrefLang()
{
return $this->_hrefLang;
}
/**
* @param string|null $value
* @return Zend_Gdata_App_Entry Provides a fluent interface
*/
public function setHrefLang($value)
{
$this->_hrefLang = $value;
return $this;
}
/**
* @return string|null
*/
public function getTitle()
{
return $this->_title;
}
/**
* @param string|null $value
* @return Zend_Gdata_App_Entry Provides a fluent interface
*/
public function setTitle($value)
{
$this->_title = $value;
return $this;
}
/**
* @return string|null
*/
public function getLength()
{
return $this->_length;
}
/**
* @param string|null $value
* @return Zend_Gdata_App_Entry Provides a fluent interface
*/
public function setLength($value)
{
$this->_length = $value;
return $this;
}
}

View file

@ -0,0 +1,49 @@
<?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 App
* @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: Logo.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Represents the atom:logo element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Logo extends Zend_Gdata_App_Extension
{
protected $_rootElement = 'logo';
public function __construct($text = null)
{
parent::__construct();
$this->_text = $text;
}
}

View file

@ -0,0 +1,48 @@
<?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 App
* @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: Name.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Represents the atom:name element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Name extends Zend_Gdata_App_Extension
{
protected $_rootElement = 'name';
public function __construct($text = null)
{
parent::__construct();
$this->_text = $text;
}
}

View file

@ -0,0 +1,163 @@
<?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 App
* @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: Person.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* @see Zend_Gdata_App_Extension_Name
*/
require_once 'Zend/Gdata/App/Extension/Name.php';
/**
* @see Zend_Gdata_App_Extension_Email
*/
require_once 'Zend/Gdata/App/Extension/Email.php';
/**
* @see Zend_Gdata_App_Extension_Uri
*/
require_once 'Zend/Gdata/App/Extension/Uri.php';
/**
* Base class for people (currently used by atom:author, atom:contributor)
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Gdata_App_Extension_Person extends Zend_Gdata_App_Extension
{
protected $_rootElement = null;
protected $_name = null;
protected $_email = null;
protected $_uri = null;
public function __construct($name = null, $email = null, $uri = null)
{
parent::__construct();
$this->_name = $name;
$this->_email = $email;
$this->_uri = $uri;
}
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_name != null) {
$element->appendChild($this->_name->getDOM($element->ownerDocument));
}
if ($this->_email != null) {
$element->appendChild($this->_email->getDOM($element->ownerDocument));
}
if ($this->_uri != null) {
$element->appendChild($this->_uri->getDOM($element->ownerDocument));
}
return $element;
}
protected function takeChildFromDOM($child)
{
$absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
switch ($absoluteNodeName) {
case $this->lookupNamespace('atom') . ':' . 'name':
$name = new Zend_Gdata_App_Extension_Name();
$name->transferFromDOM($child);
$this->_name = $name;
break;
case $this->lookupNamespace('atom') . ':' . 'email':
$email = new Zend_Gdata_App_Extension_Email();
$email->transferFromDOM($child);
$this->_email = $email;
break;
case $this->lookupNamespace('atom') . ':' . 'uri':
$uri = new Zend_Gdata_App_Extension_Uri();
$uri->transferFromDOM($child);
$this->_uri = $uri;
break;
default:
parent::takeChildFromDOM($child);
break;
}
}
/**
* @return Zend_Gdata_App_Extension_Name
*/
public function getName()
{
return $this->_name;
}
/**
* @param Zend_Gdata_App_Extension_Name $value
* @return Zend_Gdata_App_Entry Provides a fluent interface
*/
public function setName($value)
{
$this->_name = $value;
return $this;
}
/**
* @return Zend_Gdata_App_Extension_Email
*/
public function getEmail()
{
return $this->_email;
}
/**
* @param Zend_Gdata_App_Extension_Email $value
* @return Zend_Gdata_App_Extension_Person Provides a fluent interface
*/
public function setEmail($value)
{
$this->_email = $value;
return $this;
}
/**
* @return Zend_Gdata_App_Extension_Uri
*/
public function getUri()
{
return $this->_uri;
}
/**
* @param Zend_Gdata_App_Extension_Uri $value
* @return Zend_Gdata_App_Extension_Person Provides a fluent interface
*/
public function setUri($value)
{
$this->_uri = $value;
return $this;
}
}

View file

@ -0,0 +1,49 @@
<?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 App
* @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: Published.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Represents the atom:published element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Published extends Zend_Gdata_App_Extension
{
protected $_rootElement = 'published';
public function __construct($text = null)
{
parent::__construct();
$this->_text = $text;
}
}

View file

@ -0,0 +1,49 @@
<?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 App
* @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: Rights.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension_Text
*/
require_once 'Zend/Gdata/App/Extension/Text.php';
/**
* Represents the atom:rights element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Rights extends Zend_Gdata_App_Extension_Text
{
protected $_rootElement = 'rights';
public function __construct($text = null)
{
parent::__construct();
$this->_text = $text;
}
}

View file

@ -0,0 +1,46 @@
<?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 App
* @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: Source.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Entry
*/
require_once 'Zend/Gdata/App/Entry.php';
/**
* @see Zend_Gdata_App_FeedSourceParent
*/
require_once 'Zend/Gdata/App/FeedSourceParent.php';
/**
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Source extends Zend_Gdata_App_FeedSourceParent
{
protected $_rootElement = 'source';
}

View file

@ -0,0 +1,43 @@
<?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 App
* @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: Subtitle.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension_Text
*/
require_once 'Zend/Gdata/App/Extension/Text.php';
/**
* Represents the atom:subtitle element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Subtitle extends Zend_Gdata_App_Extension_Text
{
protected $_rootElement = 'subtitle';
}

View file

@ -0,0 +1,43 @@
<?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 App
* @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: Summary.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension_Text
*/
require_once 'Zend/Gdata/App/Extension/Text.php';
/**
* Represents the atom:summary element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Summary extends Zend_Gdata_App_Extension_Text
{
protected $_rootElement = 'summary';
}

View file

@ -0,0 +1,90 @@
<?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 App
* @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: Text.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Abstract class for data models that require only text and type-- such as:
* title, summary, etc.
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Gdata_App_Extension_Text extends Zend_Gdata_App_Extension
{
protected $_rootElement = null;
protected $_type = 'text';
public function __construct($text = null, $type = 'text')
{
parent::__construct();
$this->_text = $text;
$this->_type = $type;
}
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_type !== null) {
$element->setAttribute('type', $this->_type);
}
return $element;
}
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'type':
$this->_type = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
/*
* @return Zend_Gdata_App_Extension_Type
*/
public function getType()
{
return $this->_type;
}
/*
* @param string $value
* @return Zend_Gdata_App_Extension_Text Provides a fluent interface
*/
public function setType($value)
{
$this->_type = $value;
return $this;
}
}

View file

@ -0,0 +1,43 @@
<?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 App
* @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: Title.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension_Text
*/
require_once 'Zend/Gdata/App/Extension/Text.php';
/**
* Represents the atom:title element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Title extends Zend_Gdata_App_Extension_Text
{
protected $_rootElement = 'title';
}

View file

@ -0,0 +1,49 @@
<?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 App
* @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: Updated.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Represents the atom:updated element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Updated extends Zend_Gdata_App_Extension
{
protected $_rootElement = 'updated';
public function __construct($text = null)
{
parent::__construct();
$this->_text = $text;
}
}

View file

@ -0,0 +1,49 @@
<?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 uri
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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: Uri.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @see Zend_Gdata_App_Extension
*/
require_once 'Zend/Gdata/App/Extension.php';
/**
* Represents the atom:uri element
*
* @category Zend
* @package Zend_Gdata
* @subpackage App
* @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_App_Extension_Uri extends Zend_Gdata_App_Extension
{
protected $_rootElement = 'uri';
public function __construct($text = null)
{
parent::__construct();
$this->_text = $text;
}
}