date_create = new DateTime(); $this->errors = new ArrayCollection(); $this->all_data = []; $this->action = ''; $this->source = ''; } public function getID() { return $this->id; } public function setDateCreate(DateTime $date_create) { $this->date_create = $date_create; return $this; } public function getDateCreate() { return $this->date_create; } public function setApiUser($api_user) { $this->api_user = $api_user; return $this; } public function getApiUser() { return $this->api_user; } public function addAllData($id, $value) { $this->all_data[$id] = $value; return $this; } public function setAllData($all_data) { $this->all_data = $all_data; return $this; } public function getAllData($id) { // return null if we don't have it if (!isset($this->all_data[$id])) return null; return $this->all_data[$id]; } public function getErrors() { return $this->errors; } public function setErrors(array $errors) { $this->errors = new ArrayCollection(); foreach ($errors as $error) { $this->errors->add($error); } return $this; } public function clearErrors() { $this->errors = new ArrayCollection(); return $this; } public function setAction($action) { $this->action = $action; return $this; } public function getAction() { return $this->action; } public function setSource($source) { $this->source = $source; return $this; } public function getSource() { return $this->source; } }