21 parent::__construct();
45 if (is_array($this->data))
47 $this->data = $this->data + $data;
55 public function get($offset)
57 if (isset($this->data[$offset]) || array_key_exists($offset, $this->data))
59 return $this->data[$offset];
65 public function set($offset, $value)
69 $this->data[] = $value;
73 $this->data[$offset] = $value;
82 public function addWarnings(array $errors)
85 foreach ($errors as $error)
98 $this->warnings[] = $error;
111 static::addWarning($error);
115 $this->isSuccess =
false;
116 $this->errors[] = $error;
129 return $this->warnings->toArray();
142 $messages[] = $warning->getMessage();
153 return (count($this->warnings));
160 extends Entity\EntityError
static create(Error $error)