ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# Class Phalcon\\Mvc\\Model\\Row # Class **Phalcon\\Mvc\\Model\\Row** *implements*[*Phalcon\\Mvc\\EntityInterface*](#), [*Phalcon\\Mvc\\Model\\ResultInterface*](#), ArrayAccess This component allows Phalcon\\Mvc\\Model 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 **setDirtyState** (*unknown* $dirtyState) Set the current object's state public *boolean***offsetExists** (*string|int* $index) Checks whether offset exists in the row public *string|PhalconMvcModelInterface***offsetGet** (*string|int* $index) Gets a record in a specific position of the row public **offsetSet** (*string|int* $index, [*Phalcon\\Mvc\\ModelInterface*](#) $value) Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface public **offsetUnset** (*string|int* $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\Model\Transaction") | - [上一页](# "Class Phalcon\Mvc\Model\Resultset\Simple") | - [API Indice](#) »