/** * @return mixed */ public function getValue() { if ($this->isUnloaded()) { return null; } return parent::getValue(); }
/** * Set metadata * * @param mixed $key Data key * @param mixed $value Data value * * @return $this */ public function setMetadata($key, $value) { $data = $this->metadata->getValue(); $metadata = $this->encoder->decode($data); $metadata[$key] = $value; $data = $this->encoder->encode($metadata); $this->metadata->setValue($data); return $this; }