/** * @param string|integer $key */ public function offsetUnset($key) { $unwrapper = new Unwrapper(); $subject = $this->caller->getWrappedObject(); $key = $unwrapper->unwrapOne($key); $this->checkIfSubjectImplementsArrayAccess($subject); unset($subject[$key]); }
/** * @param string $property * * @return string|Subject */ public function __get($property) { return $this->caller->get($property); }
/** * @param string $property * @param mixed $value * * @return mixed */ public function __set($property, $value = null) { return $this->caller->set($property, $value); }
/** * @return InterfaceNotImplementedException */ private function interfaceNotImplemented() { return new InterfaceNotImplementedException(sprintf('%s does not implement %s interface, but should.', $this->presenter->presentValue($this->caller->getWrappedObject()), $this->presenter->presentString('ArrayAccess')), $this->caller->getWrappedObject(), 'ArrayAccess'); }