array( 'desc' => '访问', 'kw' => 'LOG_TYPE_PASS', ), self::LOG_TYPE_PARTICIPATION => array( 'desc' => '参与', 'kw' => 'LOG_TYPE_PARTICIPATION', ), self::LOG_TYPE_RECEIVE => array( 'desc' => '获得', 'kw' => 'LOG_TYPE_RECEIVE', ), self::LOG_TYPE_PARTICIPATION_TRUE => array( 'desc' => '参与成功', 'kw' => 'LOG_TYPE_PARTICIPATION_TRUE', ), ); /** * 获取TYPE 行为 * @return array */ public static function getType() { return self::$type; } /** * 添加记录 */ public function addOne($info){ $info['ip'] = Request::ip(); $info['user_agent'] = $_SERVER['HTTP_USER_AGENT']; return $this->add($info); } }