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) : array
Normalize an item to attach to the collection
ParametersName | Type | Description |
---|
$item | array | object | |
---|
$id | string | int | null | |
---|
Returns 


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


clearMetadata(null | string $key = null) : \Zend_Dojo_Data
Clear individual or all metadata item(s)
ParametersName | Type | Description |
---|
$key | null | string | |
---|
Returns 


getIdentifier() : string | int | null
Retrieve current item identifier
ReturnsType | Description |
---|
string | int | null | |



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


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


getLabel() : string | null
Retrieve item association label
ReturnsType | Description |
---|
string | null | |



getMetadata(null | string $key = null) : mixed
Get metadata item or all metadata
ParametersName | Type | Description |
---|
$key | null | string | Metadata key when pulling single metadata item |
---|
Returns 


hasItem(string | int $id) : bool
Does an item with the given identifier exist?
ParametersName | Type | Description |
---|
$id | string | int | |
---|
Returns 


key() : string | int
Iterator: get current key
ReturnsType | Description |
---|
string | int | |



offsetExists(string | int $offset) : bool
ArrayAccess: does offset exist?
ParametersName | Type | Description |
---|
$offset | string | int | |
---|
Returns 


offsetGet(string | int $offset) : array
ArrayAccess: retrieve by offset
ParametersName | Type | Description |
---|
$offset | string | int | |
---|
Returns 


offsetSet(string $offset, array | object | null $value) : void
ArrayAccess: set value by offset
ParametersName | Type | Description |
---|
$offset | string | |
---|
$value | array | object | null | |
---|



offsetUnset(string $offset) : void
ArrayAccess: unset value by offset
ParametersName | Type | Description |
---|
$offset | string | |
---|



removeItem(string $id) : \Zend_Dojo_Data
Remove item by identifier
ParametersName | Type | Description |
---|
$id | string | |
---|
Returns 


setIdentifier(string | int | null $identifier) : \Zend_Dojo_Data
Set identifier for item lookups
ParametersName | Type | Description |
---|
$identifier | string | int | null | |
---|
Returns 


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


setLabel(string | null $label) : \Zend_Dojo_Data
Set label to use for displaying item associations
ParametersName | Type | Description |
---|
$label | string | null | |
---|
Returns 


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