Cloud/DocumentService/Document.php
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-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Cloud
- Subpackage
- DocumentService
\Zend_Cloud_DocumentService_Document
Package: Zend_Cloud\DocumentService











Class encapsulating documents. Fields are stored in a name/value
array. Data are represented as strings.
TODO Can fields be large enough to warrant support for streams?
- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties
Methods

__call(string $name, mixed $args) : mixedOverloading: retrieve and set fields by name
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $args | mixed |
| Type | Description |
|---|---|
| mixed |

__construct(array $fields, mixed $id = null) : voidConstruct an instance of Zend_Cloud_DocumentService_Document.
If no identifier is provided, but a field matching KEY_FIELD is present,
then that field's value will be used as the document identifier.
Parameters| Name | Type | Description |
|---|---|---|
| $fields | array | |
| $id | mixed | Document identifier |

__get(string $name) : mixedOverloading: get value
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| mixed |

__set(string $name, mixed $value) : voidOverloading: set field
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | mixed |

getField(string $name) : mixedGet field by name.
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| mixed |

getIterator() : \IteratorIteratorAggregate: return iterator for iterating over fields
Returns
| Type | Description |
|---|---|
| \Iterator |

offsetExists(string $name) : boolArrayAccess: does field exist?
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| bool |

offsetGet(string $name) : mixedArrayAccess: get field by name
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| mixed |

offsetSet(string $name, mixed $value) : voidArrayAccess: set field to value
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | mixed |

offsetUnset(string $name) : voidArrayAccess: remove field from document
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string |

setField(string $name, mixed $value) : \Zend_Cloud_DocumentService_DocumentSet field by name.
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | mixed |
| Type | Description |
|---|---|
| \Zend_Cloud_DocumentService_Document |

setId(mixed $id) : \Zend_Cloud_DocumentService_DocumentSet document identifier
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $id | mixed |
| Type | Description |
|---|---|
| \Zend_Cloud_DocumentService_Document |