$ 0 0 Implement ArrayAccess in your class. See the documentation here: http://www.php.net/arrayaccess