public function trigger() { if (empty($this->type)) { return null; } if (empty($this->event)) { return null; } $obj = null; switch ($this->type) { case 'mi': $obj = new microIntegration(); $obj->load($this->appid); break; } if (!empty($obj)) { $return = $obj->aecEventHook($this); if (!is_array($return)) { $this->status = 'done'; } else { if (isset($return['reset_due_date'])) { $this->status = 'waiting'; $this->due_date = $return['reset_due_date']; } } return $this->storeload(); } return true; }