Beispiel #1
0
 /**
  * Creates a new log entry
  *
  * @param   int     $userId     User's ID
  * @param   string  $action     Action that was logged
  * @param   string  $comment    Extra information
  * @param   string  $ipAddress  IP address associated with action
  *
  * @return  Log
  *
  * @throws  Exception
  */
 public static function createLog($userId, $action, $comment, $ipAddress)
 {
     self::validateAction($action);
     $comment = \PHPAuth\Util::sanitizeString($comment);
     self::validateComment($comment);
     return new self(null, $userId, $action, $comment, $ipAddress, time());
 }