🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# Class Phalcon\\Mvc\\Collection\\Document # Class **Phalcon\\Mvc\\Collection\\Document** *implements*[*Phalcon\\Mvc\\EntityInterface*](#), ArrayAccess This component allows Phalcon\\Mvc\\Collection to return rows without an associated entity. This objects implements the ArrayAccess interface to allow access the object as object->x or array\[x\]. ### Methods public *boolean***offsetExists** (*int* $index) Checks whether an offset exists in the document public **offsetGet** (*unknown* $index) Returns the value of a field using the ArrayAccess interfase public **offsetSet** (*unknown* $index, *unknown* $value) Change a value using the ArrayAccess interface public **offsetUnset** (*string* $offset) Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface public *mixed***readAttribute** (*string* $attribute) Reads an attribute value by its name ``` <pre class="calibre14">``` <?php echo $robot->readAttribute('name'); ``` ``` public **writeAttribute** (*string* $attribute, *mixed* $value) Writes an attribute value by its name ``` <pre class="calibre14">``` <?php $robot->writeAttribute('name', 'Rosey'); ``` ``` public *array***toArray** () Returns the instance as an array representation | - [索引](# "总目录") - [下一页](# "Class Phalcon\Mvc\Collection\Exception") | - [上一页](# "Class Phalcon\Mvc\Collection\Behavior\Timestampable") | - [API Indice](#) »