public function notify() { $mapper = new Syj_Model_PendingMapper(); if (!$this->_hash) { $mapper->save($this); } if ($this->_notify() === false) { return false; } $this->_notifications_number++; if ($this->_notifications_number >= count(self::$rules[$this->_action])) { $this->cancel(); } else { $mapper->save($this); } return true; }