Gdata/Books/Extension/BooksLink.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
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Gdata
- subpackage
- Books
- version
- $Id: BooksLink.php 23775 2011-03-01 17:25:24Z ralph $
\Zend_Gdata_Books_Extension_BooksLink
Extends the base Link class with Books extensions
- Extends from
- \Zend_Gdata_App_Extension_Link
- category
- Zend
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Gdata
- subpackage
- Books
Methods



__construct(
string|null $href
=
null, string|null $rel
=
null, string|null $type
=
null, string|null $hrefLang
=
null, string|null $title
=
null, string|null $length
=
null
)
:
void
Constructor for Zend_Gdata_Books_Extension_BooksLink which
Extends the base Link class with Books extensions
Parameters
Name |
Type |
Description |
$href |
string|null |
Linked resource URI |
$rel |
string|null |
Forward relationship |
$type |
string|null |
Resource MIME type |
$hrefLang |
string|null |
Resource language |
$title |
string|null |
Human-readable resource title
|
$length |
string|null |
Resource length in octets |



__get(
string $name
)
:
void
Magic getter to allow access like $entry->foo to call $entry->getFoo()
Alternatively, if no getFoo() is defined, but a $_foo protected variable
is defined, this is returned.
Inherited from:
\Zend_Gdata_App_Base::__get()
TODO Remove ability to bypass getFoo() methods??
Parameters
Name |
Type |
Description |
$name |
string |
The variable name sought |



getDOM(
\DOMDocument $doc
=
null, $majorVersion
=
1, $minorVersion
=
null
)
:
\DOMElement
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.
Inherited from:
\Zend_Gdata_App_Extension_Link::getDOM()
Parameters
Name |
Type |
Description |
$doc |
\DOMDocument |
The DOMDocument used to construct DOMElements |
$majorVersion |
|
|
$minorVersion |
|
|
Returns
Type |
Description |
\DOMElement |
The DOMElement representing this element and all child properties. |



getExtensionAttributes(
)
:
array
Returns an array of all extension attributes not transformed into data
model properties during parsing of the XML. Each element of the array
is a hashed array of the format:
array('namespaceUri' => string, 'name' => string, 'value' => string);
Inherited from:
\Zend_Gdata_App_Base::getExtensionAttributes()
Returns
Type |
Description |
array |
All extension attributes |



lookupNamespace(
string $prefix, integer $majorVersion
=
1, integer $minorVersion
=
null
)
:
string
Looks up a prefix (atom:, etc.) in the list of registered
namespaces and returns the full namespace URI if
available. Returns the prefix, unmodified, if it's not
registered.
Parameters
Name |
Type |
Description |
$prefix |
string |
The namespace prefix to lookup. |
$majorVersion |
integer |
The major protocol version in effect. Defaults to '1'.
|
$minorVersion |
integer |
The minor protocol version in effect. Defaults to null (use latest).
|
Returns



registerNamespace(
string $prefix, string $namespaceUri, integer $majorVersion
=
1, integer $minorVersion
=
0
)
:
void
Takes a prefix and a full namespace URI and adds them to the
list of registered namespaces for use by
$this->lookupNamespace().
WARNING: Currently, registering a namespace will NOT invalidate any
memoized data stored in $_namespaceLookupCache. Under normal
use, this behavior is acceptable. If you are adding
contradictory data to the namespace lookup table, you must
call flushNamespaceLookupCache().
Parameters
Name |
Type |
Description |
$prefix |
string |
The namespace prefix |
$namespaceUri |
string |
The full namespace URI |
$majorVersion |
integer |
The major protocol version in effect. Defaults to '1'.
|
$minorVersion |
integer |
The minor protocol version in effect. Defaults to null (use latest).
|



setExtensionAttributes(
array $value
)
:
\Zend_Gdata_App_Base
Sets an array of all extension attributes not transformed into data
model properties during parsing of the XML. Each element of the array
is a hashed array of the format:
array('namespaceUri' => string, 'name' => string, 'value' => string);
This can be used to add arbitrary attributes to any data model element
Inherited from:
\Zend_Gdata_App_Base::setExtensionAttributes()
Parameters
Name |
Type |
Description |
$value |
array |
All extension attributes |
Returns
Type |
Description |
\Zend_Gdata_App_Base |
Returns an object of the same type as 'this' to provide a fluent interface. |



setExtensionElements(
array $value
)
:
\Zend_Gdata_App_Base
Sets an array of all elements not matched to data model classes
during the parsing of the XML. This method can be used to add arbitrary
child XML elements to any data model class.
Inherited from:
\Zend_Gdata_App_Base::setExtensionElements()
Parameters
Name |
Type |
Description |
$value |
array |
All extension elements |
Returns
Type |
Description |
\Zend_Gdata_App_Base |
Returns an object of the same type as 'this' to provide a fluent interface. |



takeChildFromDOM(
\DOMNode $child
)
:
void
Given a child DOMNode, tries to determine how to map the data into
object instance members. If no mapping is defined, Extension_Element
objects are created and stored in an array.
Inherited from:
\Zend_Gdata_App_Base::takeChildFromDOM()
Parameters
Name |
Type |
Description |
$child |
\DOMNode |
The DOMNode needed to be handled |



transferFromDOM(
\DOMNode $node
)
:
void
This is called when XML is received over the wire and the data
model needs to be built to represent this XML.
Parameters
Name |
Type |
Description |
$node |
\DOMNode |
The DOMNode that represents this object's data
|



transferFromXML(
string $xml
)
:
void
Parses the provided XML text and generates data model classes for
each know element by turning the XML text into a DOM tree and calling
transferFromDOM($element). The first data model element with the same
name as $this->_rootElement is used and the child elements are
recursively parsed.
Inherited from:
\Zend_Gdata_App_Base::transferFromXML()
Parameters
Name |
Type |
Description |
$xml |
string |
The XML text to parse |