/** * Add a new value to the meta element and creates it if not exists * @param $key * @param $value */ public function addMetaData($key, $value) { if ($this->has('meta')) { $this->get('meta')->set($key, $value); } else { $this->container->set('meta', $this->manager->getFactory()->make('Meta', [(object) [$key => $value], $this->manager])); } }
public function add($error) { $this->container->set('', $this->manager->getFactory()->make('Error', [$error, $this->manager])); }
/** * Set a value to this object * @param $key * @param $value */ public function set($key, $value) { $this->container->set($key, $value); }