[php] Treat an object like an array

 

代码
interface AccessArray
{
function offsetSet($offset, $value);
function offsetGet($offset);
function offsetUnset($offset);
function offsetExists($offset);
}

interface Iterator
{
function current();
function next();
function key();
function rewind();
function valid();
}

 

 

posted @ 2010-06-02 15:54  DavidHHuan  阅读(219)  评论(0编辑  收藏  举报