- Phalcon\Collection
- Phalcon\Collection\CollectionInterface
- Phalcon\Collection\Exception
- Phalcon\Collection\ReadOnly
Class Phalcon\Collection
| Namespace | Phalcon | | Uses | ArrayAccess, ArrayIterator, Countable, IteratorAggregate, JsonSerializable, Phalcon\Collection\CollectionInterface, Phalcon\Helper\Json, Serializable, Traversable | | Implements | ArrayAccess, CollectionInterface, Countable, IteratorAggregate, JsonSerializable, Serializable |
Phalcon\Collection
is a supercharged object oriented array. It implements: - ArrayAccess - Countable - IteratorAggregate - JsonSerializable - Serializable
It can be used in any part of the application that needs collection of data Such implementations are for instance accessing globals $_GET
, $_POST
etc.
Properties¶
/**
* @var array
*/
protected data;
/**
* @var bool
*/
protected insensitive = true;
/**
* @var array
*/
protected lowerKeys;
Methods¶
Collection constructor. Magic getter to get an element from the collection Magic isset to check whether an element exists or not Magic setter to assign values to an element Magic unset to remove an element from the collection Clears the internal collection Count elements of an object. See count Get the element from the collection Returns the iterator of the class Determines whether an element is present in the collection. Initialize internal array Specify data which should be serialized to JSON See jsonSerialize Whether a offset exists See offsetExists Offset to retrieve See offsetGet Offset to set See offsetSet Offset to unset See offsetUnset Delete the element from the collection String representation of object See serialize Set an element in the collection Returns the object in an array format Returns the object in a JSON formatThe default string uses the following options for json_encode
JSON_HEX_TAG
, JSON_HEX_APOS
, JSON_HEX_AMP
, JSON_HEX_QUOT
, JSON_UNESCAPED_SLASHES
See rfc4627
Constructs the object See unserialize Internal method to set dataInterface Phalcon\Collection\CollectionInterface
| Namespace | Phalcon\Collection |
Phalcon\Collection\CollectionInterface
Interface for Phalcon\Collection class
Methods¶
Class Phalcon\Collection\Exception
| Namespace | Phalcon\Collection | | Uses | Throwable | | Extends | \Phalcon\Exception | | Implements | Throwable |
Exceptions for the Collection object
Class Phalcon\Collection\ReadOnly
| Namespace | Phalcon\Collection | | Uses | Phalcon\Collection | | Extends | Collection |
Phalcon\Collection\ReadOnly is a read only Collection object