Example #1
0
 /**
  * 编辑钩子
  *
  * @param PwHookDm $hook
  * @return boolean
  */
 public function update($hook)
 {
     $r = $hook->beforeUpdate();
     if ($r !== true) {
         return new PwError($r[0], $r[1]);
     }
     return $this->_load()->update($hook->getField('name'), $hook->getData());
 }