Exemplo n.º 1
0
 public static function logAction($user, $key, $details = null)
 {
     $action = new Action();
     $action->setUser($user);
     $action->setKey($key);
     if (!empty($details)) {
         $action->setDetails($details);
     }
     $action->setActionTime(time());
     $action->save();
 }
Exemplo n.º 2
0
 public static function logAction($user, $key, $details = null)
 {
     $action = new Action();
     $action->setUser($user);
     $action->setKey($key);
     if (!empty($details)) {
         if (!is_numeric($details) && !is_string($details)) {
             $details = json_encode($details);
         }
         $action->setDetails($details);
     }
     $action->setActionTime(time());
     $action->save();
 }
Exemplo n.º 3
0
 /**
  * @param	Action $action The action object to add.
  */
 protected function doAddAction($action)
 {
     $this->collActions[] = $action;
     $action->setUser($this);
 }