/** * Get an item from the array by offset * * Required by interface ArrayAccess * * @param int $offset * @return mixed The item from the array */ public function offsetGet($offset) { return ObjectArray::offsetGet($offset); }
/** * Get a property * * Method provides support for computed properties by calling an getProperty[CamelizedName] if it exists. The getter * should return the computed value to get. * * @param string $name The property name * @return mixed The property value. */ public function getProperty($name) { //Handle computed properties if (!parent::offsetExists($name) && $this->hasProperty($name)) { $getter = 'getProperty' . StringInflector::camelize($name); $methods = $this->getMethods(); if (isset($methods[$getter])) { parent::offsetSet($name, $this->{$getter}()); } } return parent::offsetGet($name); }