Inheritance: extends Art4\JsonApiClient\AccessInterface
Exemplo n.º 1
0
 /**
  * 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]));
     }
 }
Exemplo n.º 2
0
 public function add($error)
 {
     $this->container->set('', $this->manager->getFactory()->make('Error', [$error, $this->manager]));
 }
Exemplo n.º 3
0
 /**
  * Set a value to this object
  * @param $key
  * @param $value
  */
 public function set($key, $value)
 {
     $this->container->set($key, $value);
 }