Dojo/Data.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-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Dojo
- Version
- $Id$
Package: Zend_Dojodojo.data support for Zend Framework
- Implements
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Uses
-
- Uses
-
- Uses
-
Properties
Methods



_normalizeItem(array | object $item, string | int | null $id) : arrayNormalize an item to attach to the collection
Parameters| Name | Type | Description |
|---|
| $item | array | object | |
|---|
| $id | string | int | null | |
|---|
Returns 


addItem(array | object $item, string | null $id = null) : \Zend_Dojo_DataAdd an individual item, optionally by identifier
Parameters| Name | Type | Description |
|---|
| $item | array | object | |
|---|
| $id | string | null | |
|---|
Returns 


clearMetadata(null | string $key = null) : \Zend_Dojo_DataClear individual or all metadata item(s)
Parameters| Name | Type | Description |
|---|
| $key | null | string | |
|---|
Returns 


getIdentifier() : string | int | nullRetrieve current item identifier
Returns| Type | Description |
|---|
| string | int | null | |



getItem(string $id) : arrayRetrieve an item by identifier
Item retrieved will be flattened to an array.
Parameters| Name | Type | Description |
|---|
| $id | string | |
|---|
Returns


getItems() : arrayGet all items as an array
Serializes items to arrays.
Returns


getLabel() : string | nullRetrieve item association label
Returns| Type | Description |
|---|
| string | null | |



getMetadata(null | string $key = null) : mixedGet metadata item or all metadata
Parameters| Name | Type | Description |
|---|
| $key | null | string | Metadata key when pulling single metadata item |
|---|
Returns 


hasItem(string | int $id) : boolDoes an item with the given identifier exist?
Parameters| Name | Type | Description |
|---|
| $id | string | int | |
|---|
Returns 


key() : string | intIterator: get current key
Returns| Type | Description |
|---|
| string | int | |



offsetExists(string | int $offset) : boolArrayAccess: does offset exist?
Parameters| Name | Type | Description |
|---|
| $offset | string | int | |
|---|
Returns 


offsetGet(string | int $offset) : arrayArrayAccess: retrieve by offset
Parameters| Name | Type | Description |
|---|
| $offset | string | int | |
|---|
Returns 


offsetSet(string $offset, array | object | null $value) : voidArrayAccess: set value by offset
Parameters| Name | Type | Description |
|---|
| $offset | string | |
|---|
| $value | array | object | null | |
|---|



offsetUnset(string $offset) : voidArrayAccess: unset value by offset
Parameters| Name | Type | Description |
|---|
| $offset | string | |
|---|



removeItem(string $id) : \Zend_Dojo_DataRemove item by identifier
Parameters| Name | Type | Description |
|---|
| $id | string | |
|---|
Returns 


setIdentifier(string | int | null $identifier) : \Zend_Dojo_DataSet identifier for item lookups
Parameters| Name | Type | Description |
|---|
| $identifier | string | int | null | |
|---|
Returns 


setItem(array | object $item, $id = null) : \Zend_Dojo_DataSet an individual item, optionally by identifier (overwrites)
Parameters| Name | Type | Description |
|---|
| $item | array | object | |
|---|
| $id | | |
|---|
Returns 


setLabel(string | null $label) : \Zend_Dojo_DataSet label to use for displaying item associations
Parameters| Name | Type | Description |
|---|
| $label | string | null | |
|---|
Returns 


setMetadata(string | array $spec, mixed $value = null) : \Zend_Dojo_DataSet metadata by key or en masse
Parameters| Name | Type | Description |
|---|
| $spec | string | array | |
|---|
| $value | mixed | |
|---|
Returns