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) : mixed
Overloading: retrieve and set fields by name
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string | |
$args | mixed |
Type | Description |
---|---|
mixed |
__construct(array $fields, mixed $id = null) : void
Construct 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.
ParametersName | Type | Description |
---|---|---|
$fields | array | |
$id | mixed | Document identifier |
__get(string $name) : mixed
Overloading: get value
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
mixed |
__set(string $name, mixed $value) : void
Overloading: set field
Parameters
Name | Type | Description |
---|---|---|
$name | string | |
$value | mixed |
getField(string $name) : mixed
Get field by name.
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
mixed |
getIterator() : \Iterator
IteratorAggregate: return iterator for iterating over fields
Returns
Type | Description |
---|---|
\Iterator |
offsetExists(string $name) : bool
ArrayAccess: does field exist?
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
bool |
offsetGet(string $name) : mixed
ArrayAccess: get field by name
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
mixed |
offsetSet(string $name, mixed $value) : void
ArrayAccess: set field to value
Parameters
Name | Type | Description |
---|---|---|
$name | string | |
$value | mixed |
offsetUnset(string $name) : void
ArrayAccess: remove field from document
Parameters
Name | Type | Description |
---|---|---|
$name | string |
setField(string $name, mixed $value) : \Zend_Cloud_DocumentService_Document
Set field by name.
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string | |
$value | mixed |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Document |
setId(mixed $id) : \Zend_Cloud_DocumentService_Document
Set document identifier
Parameters
Returns
Name | Type | Description |
---|---|---|
$id | mixed |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Document |