ArrayModel.php 482 字节
Newer Older
lzc828's avatar
lzc828 已提交
1 2
<?php

lzc828's avatar
lzc828 已提交
3
namespace One\Database\Pgsql;
lzc828's avatar
lzc828 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

class ArrayModel implements \ArrayAccess
{

    public function offsetExists($offset)
    {
        return (property_exists($this, $offset) || method_exists($this, $offset));
    }

    public function offsetSet($offset, $value)
    {
        $this->$offset = $value;
    }

    public function offsetGet($offset)
    {
        return $this->$offset;
    }

    public function offsetUnset($offset)
    {
        unset($this->$offset);
    }

}