public function offsetGet($attribute) { if ($attribute == 'name' || $attribute == 'value') { return $this->pop_image[$attribute]; } return parent::offsetGet($attribute); }
/** * Returns the value of a property, * * The value is gotten from the attribute corresponding to the property. * * @param string $property * @param mixed|null $default * * @return mixed */ public function offsetGet($property, $default = null) { return $this->element->offsetGet(self::serialize_property($property), $default); }