Plop
A simple logging library for PHP
ArrayAccess Interface Reference

Interface to provide accessing objects as arrays. More...

+ Inheritance diagram for ArrayAccess:

Public Member Functions

 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 

Detailed Description

Interface to provide accessing objects as arrays.

See also
http://php.net/class.arrayaccess.php

Definition at line 10 of file iface_ArrayAccess.php.

Member Function Documentation

ArrayAccess::offsetExists (   $offset)

Whether or not an offset exists.

This method is executed when using isset() or empty() on objects implementing ArrayAccess.

Parameters
mixed$offsetAn offset to check for.
Return values
boolTRUE is returned when the offset exists, FALSE when it doesn't.
See also
http://php.net/arrayaccess.offsetexists.php
Note
When using empty() ArrayAccess::offsetGet() will be called and checked for emptyness only if ArrayAccess::offsetExists() returns TRUE.

Implemented in Plop\Plop, Plop\Record, and Plop\Collection.

ArrayAccess::offsetGet (   $offset)

Returns the value at the specified offset.

This method is executed when checking if offset is empty().

Parameters
mixed$offsetThe offset to retrieve.
Return values
mixedValue at the specified offset.
See also
http://php.net/arrayaccess.offsetget.php

Implemented in Plop\Plop, Plop\Record, and Plop\Collection.

ArrayAccess::offsetSet (   $offset,
  $value 
)

Assigns a value to the specified offset.

Parameters
mixed$offsetThe offset to assign the value to.
mixed$valueThe value to set.
See also
http://php.net/arrayaccess.offsetset.php

Implemented in Plop\Plop, Plop\Record, and Plop\Collection.

ArrayAccess::offsetUnset (   $offset)

Unsets an offset.

Parameters
mixed$offsetThe offset to unset.
See also
http://php.net/arrayaccess.offsetunset.php
Note
This method will not be called when type-casting to (unset).

Implemented in Plop\Plop, Plop\Record, and Plop\Collection.


The documentation for this interface was generated from the following file: