Trait yii\base\ArrayAccessTrait
Implemented by | yii\test\ActiveFixture, yii\test\ArrayFixture, yii\test\BaseActiveFixture |
---|---|
Available since version | 2.0 |
Source Code | https://github.com/yiisoft/yii2/blob/master/framework/base/ArrayAccessTrait.php |
ArrayAccessTrait provides the implementation for IteratorAggregate, ArrayAccess and Countable.
Note that ArrayAccessTrait requires the class using it contain a property named data
which should be an array.
The data will be exposed by ArrayAccessTrait to support accessing the class object like an array.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$data | array | yii\base\ArrayAccessTrait |
Public Methods
Property Details
Method Details
public void count ( ) |
public void getIterator ( ) |
public void offsetExists ( $offset ) | ||
$offset |
public void offsetGet ( $offset ) | ||
$offset |
public void offsetSet ( $offset, $item ) | ||
$offset | ||
$item |
public void offsetUnset ( $offset ) | ||
$offset |