public function offsetExists($offset) { $setter = 'get' . ucfirst($offset); return is_callable(array($this, $setter)) || is_callable(array($this, $setter . 'Array')); }