Commit 72e614d8 authored by jianghaiming's avatar jianghaiming

update:更新

parent f11a2d63
......@@ -4,7 +4,8 @@
"type": "library",
"require": {
"php": ">=7.2",
"api/php_utils":"dev-master"
"api/php_utils":"dev-master",
"perftools/php-profiler": "^0.18.0"
},
"autoload": {
"psr-4": {
......
......@@ -27,7 +27,7 @@ class DesEncryptor
$this->_iv = $iv;
$this->_encrypt = $encrypt;
$this->_cipher = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, '');
$this->_cipher = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_CBC, '');
mcrypt_generic_init($this->_cipher, $this->_key, $this->_iv);
}
......
......@@ -66,7 +66,7 @@ class IdCertification
$result_posit = $this->getIdCardOcr($posit_image_url);
}
if (!empty($back_image_url)) {
$result_back = $this->getIdCardOcr($posit_image_url);
$result_back = $this->getIdCardOcr($back_image_url);
}
$final['posit'] = self::analysisPositData($result_posit ?? []);
$final['back'] = self::analysisBackData($result_back ?? []);
......
......@@ -79,7 +79,7 @@ class SocialCreditCertification
'databaseImageContent' => $base64_image
];
$result = (new Request())->post(self::ocr_bussiness_url, $post_data, 4000, 'json');
$result = (new Request())->post(self::ocr_bussiness_url, $post_data, 3000, 'json',[],1);
if (isset($result['code'],$result['response']) && $result['code'] === 0 ) {
return $result['response'];
......
......@@ -5,8 +5,8 @@ use Api\PhpUtils\Http\Request;
class Ksyun
{
private const jinshan_ak = 'AKLTTpZx6fNBQsGSKe5chqHdXA'; //AccessKey
private const jinshan_sk = 'OG9Bk93RUHwaH71U9K+OtWkvx44AdMheywjFlifILikvh96jNGgznJm+AyR5l4wPhw=='; //SecretKey
private const jinshan_ak = 'AKLTnATdoXUnR72IDSGgN2WSOQ'; //AccessKey
private const jinshan_sk = 'OMw7UAOkrLVsRevuP44ctAlfzriDzUm9+JvOFoYuiSoLgaLJWi+kjUa+4G3EWXFakQ=='; //SecretKey
private const bp_bucket = 'bp-yidian';
private const get_down_from_ksyun = 'http://10.103.34.109:8007/auth/url-get';
......@@ -68,9 +68,10 @@ class Ksyun
/**
* 返回bucket
* @param $appid
* @param $scenario string 区分业务场景
* @return string
*/
public static function getBucket($appid) :string
public static function getBucket($appid,$scenario) :string
{
if ($appid === 'merchant-b' || $appid === 'merchant-c') {
return self::bp_bucket;
......@@ -81,10 +82,11 @@ class Ksyun
/**
* 生成objectid 和 bucket
* @param $appid
* @param $scenario string 区分业务场景
* @return array
*/
public static function getObjectAndBucket($appid):array
public static function getObjectAndBucket($appid,$scenario):array
{
return ['bucket' => self::getBucket($appid),'objectId' => md5(uniqid(mt_rand(), true))];
return ['bucket' => self::getBucket($appid,$scenario),'objectId' => md5(uniqid(mt_rand(), true))];
}
}
\ No newline at end of file
<?php
/**
* Description of
*
* @author zhiyuan
* Date: 2021/6/12
* Time: 10:32 PM
*/
namespace Api\PhpServices\LifeAccount;
use Api\PhpUtils\Common\TimeOut;
use Api\PhpUtils\Http\Request;
use App\Exception\custom\CodeSpecialException;
class Account
{
/**
* 批量获取生活号角色表数据
*
*@param $params['role_id'] 主键id
*
*/
public static function getRoleList($params)
{
$url = config('interface', 'merchant.account.get_role_list');
if (!$url) {
throw new CodeSpecialException("failed");
}
if (!array_key_exists('role_id', $params) || !array_key_exists('page', $params) || !array_key_exists('page_size', $params)) {
throw new CodeSpecialException("failed");
}
$list = (new TimeOut())->runGet($url, $params);
if (!$list) {
throw new CodeSpecialException("timeout");
}
return $list;
}
/**
* 批量获取生活号表数据
*
*@param $params['user_id'] 主键id
*
*/
public static function getLifeList($params)
{
$url = config('interface', 'merchant.account.get_life_list');
if (!$url) {
throw new CodeSpecialException("failed");
}
$list = (new TimeOut())->runGet($url, $params);
if (!$list) {
throw new CodeSpecialException("timeout");
}
return $list;
}
}
......@@ -6,15 +6,8 @@ use Api\PhpUtils\Mongo\MongoBase;
class XhMongo extends MongoBase
{
private $domian ;
public function __construct($domain)
{
$this->domian = $domain;
}
protected function getConfigIndex()
{
//需要在yaconf 配置 mongo
return 'xhprof';
}
......@@ -25,7 +18,6 @@ class XhMongo extends MongoBase
protected function getCollectionName()
{
// 根据 domain 来生成对应的collection
return $this->domian.'_'.'xhprof';
return 'results';
}
}
\ No newline at end of file
......@@ -9,54 +9,53 @@ class XhProfilerService
{
private $profiler;
public function __construct($domain)
public function __construct()
{
// 根据域名读取 配置
$this->profiler = new Profiler([]);
}
/**
* 开启 xhprofiler 分析
* @param $domain
*/
public function start($domain): void
public function start(): void
{
//根据域名选择开不开启 分析
if ($this->judgeSwitch($domain) === false)
{
return ;
}
//开启 分析器,并且初始化 mongodb 实例
$this->profiler->start();
}
/**
* 结束分析 并且 根据域名存储到不同的 mongodb collection 中
* 结束分析
* @param $domain
*/
public function end($domain): void
{
// 结束分析器,生产性能检测数据
$profiler_data = $this->profiler->disable();
$profiler_data = $this->dealProfile($profiler_data,$domain);
//将数据存储到 指定mongodb中
$mongo = new XhMongo('test');
$mongo = XhMongo::getInstance();
$mongo->insertOne($profiler_data);
// $this->profiler->save($profiler_data);
}
private function dealProfile(array $profile,$domain)
{
$profile['profile'] = $this->encodeProfile($profile['profile']);
$profile['domain'] = str_replace('.', '_',$domain);
return $profile;
}
/**
* 开关决策器
* @param $domain
* @return bool
*/
private function judgeSwitch($domain)
private function encodeProfile(array $profile)
{
// 从 yaconf 获取配置 ,判断当前域名是否要开启
return true;
$results = array();
foreach ($profile as $k => $v) {
if (strpos($k, '.') !== false) {
$k = str_replace('.', '_', $k);
}
$results[$k] = $v;
}
return $results;
}
}
\ No newline at end of file
......@@ -105,6 +105,31 @@ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDatQ6W6EjzO2HsfSmNeFQt7iAT
FHYZ0W5URuWPyPAvKnsMJz/vPpYVi1C1cvE/Sguz24qA6819Jr+HyhMADiyCohia
l/zmTGPztP0rXGEHbU5MuQAHrFcDcOwgWcjtHggOV/XxNbmAJf/AwToSfQKkmsJ2
PE1lYJXINxgETj88uwIDAQAB
-----END PUBLIC KEY-----';
/**
* 商户系统C端-测试 SERVER端私钥与客户端公钥
*/
const TEST_MERCHANT_C_PRIVATE_KEY_STR = '-----BEGIN PRIVATE KEY-----
MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMX9eY3yNnhcRt0I
f//WJvVztaqT7GTkwDDxSeUgtbyXGjOKz9Mgahkk5lWyAlLqKXUpd+5Fksue5YWU
LL6OogoiTBNNNsPWoc9l0Wj0KKVdK3ZjnICZEz1LmjiLa++rAB/7fMYUbs6cRtK8
Nl8n9a6cjReYaW9r7tb/pSdC+T0HAgMBAAECgYEAmxEwn/UhplkXg0yB+909fCaZ
FTVwA4GJ6YtBxfw9eqyZ7957cS9FCdZ1tI6L9WbC+6lz7iF9nI8h0uI/vSu3Snm/
MFYGkcsolDBFYsTPru5GouHh4bW6X5Ge6fmz7JgGaqzOtsbD5oh7zN9SsUUb0jqM
9zR5qbw5i8Krut66zGECQQDo8CmWy5jtSJ7wUGBVECHX4dPO2lwyAC13u4Pat8dg
8YA6VzdzzHdhlWLaGuPICKPjBwxVxP6qKT8bPiAYeIgXAkEA2ZeNYQ8lN5v+hosR
dU3FVwva3d7OmIT7unEMk2Nav1YqUHLektsAYZQW1kOtfUvmtWXlba34a7E8FRow
Wt4YkQJBAJYF/7MoQ8EnUX5TNgfzEOj6gDEsf86QQLhpo91dGeM9ByoL/CHvoT/P
N9BjGys9LVhNtMsUyjQLxqIkHAXGs1cCQQDF4+olkpOjfpC+Ji5Lg95sqxBzZlZ4
KcGSr4vjY6G9kAzNu5qm7tvq4rbeSRC4elYpNbGxzV23+6mL+5Rsn76xAkBmABwk
XXLMgdt6NG4x3cM4WeMPbJPWHOXRLRRMukDGW+HklFkpHFbuGSXv+FkjCWhnE9QX
98wubX4hRtsNX8UH
-----END PRIVATE KEY-----';
const TEST_MERCHANT_C_PUBLIC_KEY_STR = '-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDKTlW0/1dpGK2FeUHvOf1Vus7g
yy4Yx6r0JTtZUfC0u7/Tr/2DaD4xt+OLOW/mY158azfHJO1yBIhSyxi9sKILmiV5
fpbAOKUeRJelNa6tXC+1E8dooh+s1NmZaGXn2F6HK0OtU5Qc/Ebqunm+re8Ek2lN
2ezqViipdMY2tosl2QIDAQAB
-----END PUBLIC KEY-----';
/**
* 商户系统B端 SERVER端私钥与客户端公钥
......@@ -130,6 +155,31 @@ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD2RdTxS2mxmFQUDSeBvUr4wTTX
ugBJw71/jXXo1l5mB4SOhP0fW7UwZSb3myfCMFJZQnCFdxY8LCFvEZYz4f/o8wVA
mDIZoqwIClqMBt2uJvAa4eVwn1Zr1GOnaYs+X8wakZUyIYvQgn98tr2EwN11u4ek
GeBFb3ObYV22i+jziwIDAQAB
-----END PUBLIC KEY-----';
/**
* 商户系统B端-测试 SERVER端私钥与客户端公钥
*/
const TEST_MERCHANT_B_PRIVATE_KEY_STR = '-----BEGIN PRIVATE KEY-----
MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBAKQGB1lqs3dCTGGj
qONSu5gMBucejojaF23073kIBdwfzZYSxZWw0P+YaXU6JkE8JCaaakNhTNuJmntG
3RBBJe1xaeWZo4Jca2SGy0cR0uMM5mAMtBL2AZ/1RU+D2CKbBl9H0uxB4FF+td2g
Q/C/spKDX4CDQGe1wZxr3Cyh11/JAgMBAAECgYEAoO7BWzxT5dmI8+wOEyzjnuV+
CFp041WI03wVUp1KkpYpsuusLZkVFxNFtZ1eV3dYyP+M75uSO30hs37t+7rQKDyD
9H+WzJCqe5KR5J7xvs5DWuXLCzgNYq8KdXYk+Zy8RuwB9eaWcy1F/i2dYxoz3JUw
Xsmu36Mp994bJJsLKAECQQDRA8quM9YzMXoBd/QTTw5pzKFlrNl+7eF2SMNOdCZB
IVjfOh3/d39A1I46HsvMfd1L9DMvcgz8J3/RK0/iNVWBAkEAyOUeJXH/NhbfXHr4
633DpS+jBKywCYkdhqJEh0Q3dRg/qk6q+9I2f2wS1JPmGq4FMeOxrXjpjAK97Djb
k8z+SQJBAM10obXNZJ/b4acx521Xh75+FKSiXQVFBhxEeB9VUwkwo3CCa1xkdWUf
y1LcVM6FZpOzzuCzhooStbTBk3uzm4ECQQCJWMuhgiyfyEdxLMneBp+p4cWsPnwk
KNA86de8OxFHRwrP3vTbMb78ouDE4VDiULNQhoFFPnM9u+opBD5q8C2xAkEAv2W3
fw+LtVaDnpfWWCN5y6W4gzRtfdSdSvsZpS+EY/RG0cpmN+WR+86ft3WdIIr2Bnm4
RcPnfPSsz3dgAaCR2A==
-----END PRIVATE KEY-----';
const TEST_MERCHANT_B_PUBLIC_KEY_STR = '-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+2roRCWyvIl04NtZnNxyYPLAP
nM+7fL+6wGhhc3ilqk4zgr+hxdftUJ30NDkTqjbWe4wvd4ax1xVAS4la5PAK6g5W
BEFar4gu3JgkmyfT3NtwXCd7kZuH98k/7oSVQbxYc9ydwoqwDdXoIVOKtK5YWkoL
+WjPxg37zWCi3Wq5dQIDAQAB
-----END PUBLIC KEY-----';
/**
* TEST SERVER端私钥与客户端公钥
......@@ -174,10 +224,18 @@ mnRjVUtXBgEF0A9xt2QVNMQovtjJ2rkg43gVByDKbOsUqbJYjA12IpALMdECHCMl
'pub_key' => self::MERCHANT_C_PUBLIC_KEY_STR,
'pri_key' => self::MERCHANT_C_PRIVATE_KEY_STR,
],
'test-merchant-c' => [
'pub_key' => self::TEST_MERCHANT_C_PUBLIC_KEY_STR,
'pri_key' => self::TEST_MERCHANT_C_PRIVATE_KEY_STR,
],
'merchant-b' => [
'pub_key' => self::MERCHANT_B_PUBLIC_KEY_STR,
'pri_key' => self::MERCHANT_B_PRIVATE_KEY_STR,
],
'test-merchant-b' => [
'pub_key' => self::TEST_MERCHANT_B_PUBLIC_KEY_STR,
'pri_key' => self::TEST_MERCHANT_B_PRIVATE_KEY_STR,
],
'test' => [
'pub_key' => self::TEST_PUBLIC_KEY_STR,
'pri_key' => self::TEST_PRIVATE_KEY_STR,
......
......@@ -175,6 +175,236 @@ class Request
}
}
/**
* 上传文件
*
*/
public function uploadPut($url, $post = [], $timeout = 0,$content_type = '', $headers = [])
{
$ch = self::CURL($url, $timeout, $headers, $post, false, $has_curl_file=false, "PUT");
if (is_resource($ch) === true)
{
}
$response = curl_exec($ch);
if ($error = curl_error($ch))
{
$this->result['code'] = $this->fail_code;
$this->result['msg'] = $error;
}
else
{
$this->result['code'] = $this->success_code;
$this->result['response'] = $response;
}
curl_close($ch); // 关闭 cURL 释放资源
return $response;
}
static function CURL($url, $timeout, $headers = false, $post = false, $proxy = false, $has_curl_file = null, $method='GET', $curl_opts = array())
{
$ch = curl_init($url);
if (is_resource($ch) === true)
{
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TCP_NODELAY, true);
curl_setopt($ch, CURLOPT_NOSIGNAL, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_BUFFERSIZE, 10240);
curl_setopt($ch, CURLOPT_TIMEOUT_MS, $timeout);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, $timeout);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
if ($headers !== false)
{
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
}
if ($proxy !== false)
{
curl_setopt($ch, CURLOPT_PROXY, $proxy);
}
if (!empty($curl_opts))
{
foreach ($curl_opts as $opt => $val)
{
curl_setopt($ch, $opt, $val);
}
}
switch ($method) {
case 'HEAD':
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'HEAD');
break;
case 'GET':
break;
case 'POST':
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
if($has_curl_file !== null)
{
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, $has_curl_file);
}
break;
case 'DELETE':
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
break;
case 'PUT':
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
break;
default:
die('httpUtil bad method');
break;
}
}
return $ch;
}
public function put($url, $params = [], $timeout = 0,$content_type = '', $headers = [], $retry = 0, $use_mon = true, $proxy = '')
{
try {
//验参
if (empty($url) || !is_array($params)) {
throw new \Exception('params error');
}
$this->log['url'] = $url;
$this->log['params'] = $params;
//构造client
$config = [];
if (!empty($retry) && is_int($retry)) {
$config['retry'] = $retry;
}
$client = (new Base())->initClient($config, $url, $params);
//构造配置
if (!empty($params)) {
if ($content_type == 'json') {
$options['json'] = $params;
} elseif ($content_type == 'multipart') {
$options['multipart'] = $params;
} else {
$options['form_params'] = $params;
}
}
if (!empty($timeout)) {
$options['timeout'] = $timeout / 1000;
}
if (!empty($headers)) {
$options['headers'] = $headers;
}
if (!empty($proxy)) {
$options['proxy'] = $proxy;
}
$options['on_stats'] = function (TransferStats $stats) use ($use_mon, $url) {
$this->result['http_code'] = $stats->getHandlerStat('http_code');
if (!empty($use_mon)) {
//MonUtil::proxyMon($url, $stats->getHandlerStat('http_code'), round($stats->getHandlerStat('total_time'),4) * 1000);
}
};
//put请求
//@method ResponseInterface put(string|UriInterface $uri, array $options = [])
$promise = $client->put($url, $options);
$promise->then(
function (Response $resp) {
//$ret = $this->log['response'] = $resp->getBody()->getContents();
$ret = empty(json_decode($ret, true)) ? $ret : json_decode($ret, true);
$this->result['code'] = $this->success_code;
$this->result['response'] = $ret;
},
function (RequestException $e) {
$this->log['response'] = $e->getMessage();
throw new \Exception($e->getMessage());
}
);
$promise->wait();
} catch (\Exception $e) {
$this->result['code'] = $this->fail_code;
$this->result['msg'] = $e->getMessage();
} finally {
$this->addLog('put');
return $this->result;
}
}
public function head($url, $params = [], $timeout = 0, $content_type = '',$headers = [], $retry = 0, $use_mon = true, $proxy = '')
{
try {
//验参
if (empty($url) || !is_array($params)) {
throw new \Exception('params error');
}
$this->log['url'] = $url;
$this->log['params'] = $params;
//构造client
$config = [];
if (!empty($retry) && is_int($retry)) {
$config['retry'] = $retry;
}
$this->client = (new Base())->initClient($config, $url, $params);
//构造配置
if (!empty($params)) {
if ($content_type == 'json') {
$options['json'] = $params;
} elseif ($content_type == 'multipart') {
$options['multipart'] = $params;
} else {
$options['form_params'] = $params;
}
}
if (!empty($timeout)) {
$options['timeout'] = $timeout / 1000;
}
if (!empty($headers)) {
$options['headers'] = $headers;
}
if (!empty($proxy)) {
$options['proxy'] = $proxy;
}
$options['on_stats'] = function (TransferStats $stats) use ($use_mon, $url) {
$this->result['http_code'] = $stats->getHandlerStat('http_code');
if (!empty($use_mon)) {
//MonUtil::proxyMon($url, $stats->getHandlerStat('http_code'), round($stats->getHandlerStat('total_time'),4) * 1000);
}
};
//异步head请求
// @method ResponseInterface head(string|UriInterface $uri, array $options = [])
$promise = $this->client->head($url, $options);
$promise->then(
function (Response $resp) {
$ret = $this->log['response'] = $resp->getBody()->getContents();
$ret = empty(json_decode($ret, true)) ? $ret : json_decode($ret, true);
$this->result['code'] = $this->success_code;
$this->result['response'] = $ret;
},
function (RequestException $e) {
$this->log['response'] = $e->getMessage();
throw new \Exception($e->getMessage());
}
);
$promise->wait();
} catch (\Exception $e) {
$this->result['code'] = $this->fail_code;
$this->result['msg'] = $e->getMessage();
} finally {
$this->addLog('head');
return $this->result;
}
}
/**
* 并发执行get请求
* @param array $urls [0=>xxx,1=>xxx]
......
......@@ -145,7 +145,7 @@ abstract class MysqlBase
self::$sqlResut = call_user_func_array([self::$dbConnect[$type], $method], $arguments);
if (!self::catchError($method, $arguments)) {
// 如果失败重试一次
self::$dbCurrentConnect = self::$dbConnect[$type] = self::getConnection($type, true);
self::$dbCurrentConnect = self::$dbConnect[$type] = self::getConnection($type);
self::$sqlResut = call_user_func_array([self::$dbConnect[$type], $method], $arguments);
if (!self::catchError($method, $arguments)) {
return false;
......
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: websitelog.proto
namespace GPBMetadata;
class Websitelog
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0a800c0a10776562736974656c6f672e70726f746f121367617465776179" .
"2e646174612e7261776c6f6722f2010a03554944120f0a07757365725f69" .
"64180120012803122b0a047479706518022001280e321d2e676174657761" .
"792e646174612e7261776c6f672e5549442e5479706512110a0964657669" .
"63655f6964180320012809120c0a047775696418052001280912110a0972" .
"656665725f75696418072001280912110a09757365725f6e616d65180820" .
"01280912110a09757365725f7479706518092001280912110a096275636b" .
"65745f6964180a2001280312180a1069735f73757065725f6163636f756e" .
"74180b20012808120b0a03776964180c2001280922190a04547970651208" .
"0a044e4f4e45100012070a034d4435100122b0040a074170704d65746112" .
"0e0a066170705f696418012001280912140a0c6275696c645f6e756d6265" .
"7218022001280912160a0e62756e646c655f76657273696f6e1803200128" .
"09121c0a14646973747269627574696f6e5f6368616e6e656c1804200128" .
"09120c0a04696d6569180620012809120e0a066d61635f69641807200128" .
"0912120a0a616e64726f69645f6964180820012809121e0a16616e64726f" .
"69645f6164766572746973696e675f696418092001280912130a0b646576" .
"6963655f6e616d65180b20012809120d0a056272616e64180c2001280912" .
"160a0e73637265656e5f64656e73697479180e2001280912170a0f70726f" .
"636573736f725f636f756e74180f2001280512170a0f706879736963616c" .
"5f6d656d6f727918102001280912140a0c73637265656e5f776964746818" .
"112001280512160a0e73637265656e745f68656967687418122001280512" .
"2f0a08706c6174666f726d18152001280e321d2e676174657761792e6461" .
"74612e7261776c6f672e506c6174666f726d12180a106f7065726174696e" .
"675f73797374656d18162001280912100a086c616e677561676518172001" .
"2809120f0a07636f756e747279181820012809120f0a07746d5f7a6f6e65" .
"18192001280912150a0d696f735f6a61696c627265616b18332001280812" .
"220a1a696f735f6164766572746973696e675f6964656e74696669657218" .
"382001280912210a19696f735f6964656e7469666965725f666f725f7665" .
"6e646f7218392001280922e5040a0a576562736974654c6f6712170a0f72" .
"6571756573745f74696d655f6d7318012001280312180a10726573706f6e" .
"73655f74696d655f6d73180220012803120e0a06616374696f6e18032001" .
"280912140a0c726563765f74696d655f6d7318062001280312130a0b7265" .
"6d6f74655f686f737418082001280912100a08636865636b73756d180920" .
"012809122e0a086170705f6d65746118652001280b321c2e676174657761" .
"792e646174612e7261776c6f672e4170704d65746112130a0b6170695f76" .
"657273696f6e18662001280912250a0375696418672001280b32182e6761" .
"74657761792e646174612e7261776c6f672e554944120d0a057265716964" .
"186820012809120a0a02697018692001280912100a086e65745f74797065" .
"186a20012809124d0a0f726571756573745f636f6e7465787418c7012003" .
"280b32332e676174657761792e646174612e7261776c6f672e5765627369" .
"74654c6f672e52657175657374436f6e74657874456e747279120f0a0673" .
"746174757318c90120012809120d0a04636f646518ca0120012805120f0a" .
"06726561736f6e18cb0120012809124f0a10726573706f6e73655f636f6e" .
"7465787418ab022003280b32342e676174657761792e646174612e726177" .
"6c6f672e576562736974654c6f672e526573706f6e7365436f6e74657874" .
"456e7472791a350a1352657175657374436f6e74657874456e747279120b" .
"0a036b6579180120012809120d0a0576616c75651802200128093a023801" .
"1a360a14526573706f6e7365436f6e74657874456e747279120b0a036b65" .
"79180120012809120d0a0576616c75651802200128093a0238012a3f0a08" .
"506c6174666f726d12070a03494f531000120b0a07416e64726f69641001" .
"12070a03576562100212140a07556e6b6e6f776e10ffffffffffffffffff" .
"01620670726f746f33"
));
static::$is_initialized = true;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: websitelog.proto
namespace Gateway\Data\Rawlog;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>gateway.data.rawlog.AppMeta</code>
*/
class AppMeta extends \Google\Protobuf\Internal\Message
{
/**
* App相关配置
*
* Generated from protobuf field <code>string app_id = 1;</code>
*/
private $app_id = '';
/**
* 发布号是后台区分版本的唯一id,不同平台,不同版本都需要保证全局的唯一性
*
* Generated from protobuf field <code>string build_number = 2;</code>
*/
private $build_number = '';
/**
* app_version
*
* Generated from protobuf field <code>string bundle_version = 3;</code>
*/
private $bundle_version = '';
/**
* 分发渠道,是否修改为枚举?
*
* Generated from protobuf field <code>string distribution_channel = 4;</code>
*/
private $distribution_channel = '';
/**
* md5后的imei号
*
* Generated from protobuf field <code>string imei = 6;</code>
*/
private $imei = '';
/**
* MacID
*
* Generated from protobuf field <code>string mac_id = 7;</code>
*/
private $mac_id = '';
/**
* 安卓系统用户id
*
* Generated from protobuf field <code>string android_id = 8;</code>
*/
private $android_id = '';
/**
* 安卓系统用户谷歌广告id 201805 安卓4660版本新增
*
* Generated from protobuf field <code>string android_advertising_id = 9;</code>
*/
private $android_advertising_id = '';
/**
* 设备相关的元数据
*
* Generated from protobuf field <code>string device_name = 11;</code>
*/
private $device_name = '';
/**
* 机器的品牌
*
* Generated from protobuf field <code>string brand = 12;</code>
*/
private $brand = '';
/**
*optional string screen_resolution = 13; // 屏幕分辨率
*
* Generated from protobuf field <code>string screen_density = 14;</code>
*/
private $screen_density = '';
/**
* 处理器核数
*
* Generated from protobuf field <code>int32 processor_count = 15;</code>
*/
private $processor_count = 0;
/**
* 机器内存, 单位MB
*
* Generated from protobuf field <code>string physical_memory = 16;</code>
*/
private $physical_memory = '';
/**
* 屏幕的宽度像素点
*
* Generated from protobuf field <code>int32 screen_width = 17;</code>
*/
private $screen_width = 0;
/**
* 屏幕的高度像素点
*
* Generated from protobuf field <code>int32 screent_height = 18;</code>
*/
private $screent_height = 0;
/**
* 操作系统相关配置
*
* Generated from protobuf field <code>.gateway.data.rawlog.Platform platform = 21;</code>
*/
private $platform = 0;
/**
* 操作系统名
*
* Generated from protobuf field <code>string operating_system = 22;</code>
*/
private $operating_system = '';
/**
* 语言
*
* Generated from protobuf field <code>string language = 23;</code>
*/
private $language = '';
/**
* 国家
*
* Generated from protobuf field <code>string country = 24;</code>
*/
private $country = '';
/**
* 时区
*
* Generated from protobuf field <code>string tm_zone = 25;</code>
*/
private $tm_zone = '';
/**
* iOS相关的信息
*
* Generated from protobuf field <code>bool ios_jailbreak = 51;</code>
*/
private $ios_jailbreak = false;
/**
* 唯一区分设备号idfa
*
* Generated from protobuf field <code>string ios_advertising_identifier = 56;</code>
*/
private $ios_advertising_identifier = '';
/**
* idfv
*
* Generated from protobuf field <code>string ios_identifier_for_vendor = 57;</code>
*/
private $ios_identifier_for_vendor = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $app_id
* App相关配置
* @type string $build_number
* 发布号是后台区分版本的唯一id,不同平台,不同版本都需要保证全局的唯一性
* @type string $bundle_version
* app_version
* @type string $distribution_channel
* 分发渠道,是否修改为枚举?
* @type string $imei
* md5后的imei号
* @type string $mac_id
* MacID
* @type string $android_id
* 安卓系统用户id
* @type string $android_advertising_id
* 安卓系统用户谷歌广告id 201805 安卓4660版本新增
* @type string $device_name
* 设备相关的元数据
* @type string $brand
* 机器的品牌
* @type string $screen_density
* optional string screen_resolution = 13; // 屏幕分辨率
* @type int $processor_count
* 处理器核数
* @type string $physical_memory
* 机器内存, 单位MB
* @type int $screen_width
* 屏幕的宽度像素点
* @type int $screent_height
* 屏幕的高度像素点
* @type int $platform
* 操作系统相关配置
* @type string $operating_system
* 操作系统名
* @type string $language
* 语言
* @type string $country
* 国家
* @type string $tm_zone
* 时区
* @type bool $ios_jailbreak
* iOS相关的信息
* @type string $ios_advertising_identifier
* 唯一区分设备号idfa
* @type string $ios_identifier_for_vendor
* idfv
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Websitelog::initOnce();
parent::__construct($data);
}
/**
* App相关配置
*
* Generated from protobuf field <code>string app_id = 1;</code>
* @return string
*/
public function getAppId()
{
return $this->app_id;
}
/**
* App相关配置
*
* Generated from protobuf field <code>string app_id = 1;</code>
* @param string $var
* @return $this
*/
public function setAppId($var)
{
GPBUtil::checkString($var, True);
$this->app_id = $var;
return $this;
}
/**
* 发布号是后台区分版本的唯一id,不同平台,不同版本都需要保证全局的唯一性
*
* Generated from protobuf field <code>string build_number = 2;</code>
* @return string
*/
public function getBuildNumber()
{
return $this->build_number;
}
/**
* 发布号是后台区分版本的唯一id,不同平台,不同版本都需要保证全局的唯一性
*
* Generated from protobuf field <code>string build_number = 2;</code>
* @param string $var
* @return $this
*/
public function setBuildNumber($var)
{
GPBUtil::checkString($var, True);
$this->build_number = $var;
return $this;
}
/**
* app_version
*
* Generated from protobuf field <code>string bundle_version = 3;</code>
* @return string
*/
public function getBundleVersion()
{
return $this->bundle_version;
}
/**
* app_version
*
* Generated from protobuf field <code>string bundle_version = 3;</code>
* @param string $var
* @return $this
*/
public function setBundleVersion($var)
{
GPBUtil::checkString($var, True);
$this->bundle_version = $var;
return $this;
}
/**
* 分发渠道,是否修改为枚举?
*
* Generated from protobuf field <code>string distribution_channel = 4;</code>
* @return string
*/
public function getDistributionChannel()
{
return $this->distribution_channel;
}
/**
* 分发渠道,是否修改为枚举?
*
* Generated from protobuf field <code>string distribution_channel = 4;</code>
* @param string $var
* @return $this
*/
public function setDistributionChannel($var)
{
GPBUtil::checkString($var, True);
$this->distribution_channel = $var;
return $this;
}
/**
* md5后的imei号
*
* Generated from protobuf field <code>string imei = 6;</code>
* @return string
*/
public function getImei()
{
return $this->imei;
}
/**
* md5后的imei号
*
* Generated from protobuf field <code>string imei = 6;</code>
* @param string $var
* @return $this
*/
public function setImei($var)
{
GPBUtil::checkString($var, True);
$this->imei = $var;
return $this;
}
/**
* MacID
*
* Generated from protobuf field <code>string mac_id = 7;</code>
* @return string
*/
public function getMacId()
{
return $this->mac_id;
}
/**
* MacID
*
* Generated from protobuf field <code>string mac_id = 7;</code>
* @param string $var
* @return $this
*/
public function setMacId($var)
{
GPBUtil::checkString($var, True);
$this->mac_id = $var;
return $this;
}
/**
* 安卓系统用户id
*
* Generated from protobuf field <code>string android_id = 8;</code>
* @return string
*/
public function getAndroidId()
{
return $this->android_id;
}
/**
* 安卓系统用户id
*
* Generated from protobuf field <code>string android_id = 8;</code>
* @param string $var
* @return $this
*/
public function setAndroidId($var)
{
GPBUtil::checkString($var, True);
$this->android_id = $var;
return $this;
}
/**
* 安卓系统用户谷歌广告id 201805 安卓4660版本新增
*
* Generated from protobuf field <code>string android_advertising_id = 9;</code>
* @return string
*/
public function getAndroidAdvertisingId()
{
return $this->android_advertising_id;
}
/**
* 安卓系统用户谷歌广告id 201805 安卓4660版本新增
*
* Generated from protobuf field <code>string android_advertising_id = 9;</code>
* @param string $var
* @return $this
*/
public function setAndroidAdvertisingId($var)
{
GPBUtil::checkString($var, True);
$this->android_advertising_id = $var;
return $this;
}
/**
* 设备相关的元数据
*
* Generated from protobuf field <code>string device_name = 11;</code>
* @return string
*/
public function getDeviceName()
{
return $this->device_name;
}
/**
* 设备相关的元数据
*
* Generated from protobuf field <code>string device_name = 11;</code>
* @param string $var
* @return $this
*/
public function setDeviceName($var)
{
GPBUtil::checkString($var, True);
$this->device_name = $var;
return $this;
}
/**
* 机器的品牌
*
* Generated from protobuf field <code>string brand = 12;</code>
* @return string
*/
public function getBrand()
{
return $this->brand;
}
/**
* 机器的品牌
*
* Generated from protobuf field <code>string brand = 12;</code>
* @param string $var
* @return $this
*/
public function setBrand($var)
{
GPBUtil::checkString($var, True);
$this->brand = $var;
return $this;
}
/**
*optional string screen_resolution = 13; // 屏幕分辨率
*
* Generated from protobuf field <code>string screen_density = 14;</code>
* @return string
*/
public function getScreenDensity()
{
return $this->screen_density;
}
/**
*optional string screen_resolution = 13; // 屏幕分辨率
*
* Generated from protobuf field <code>string screen_density = 14;</code>
* @param string $var
* @return $this
*/
public function setScreenDensity($var)
{
GPBUtil::checkString($var, True);
$this->screen_density = $var;
return $this;
}
/**
* 处理器核数
*
* Generated from protobuf field <code>int32 processor_count = 15;</code>
* @return int
*/
public function getProcessorCount()
{
return $this->processor_count;
}
/**
* 处理器核数
*
* Generated from protobuf field <code>int32 processor_count = 15;</code>
* @param int $var
* @return $this
*/
public function setProcessorCount($var)
{
GPBUtil::checkInt32($var);
$this->processor_count = $var;
return $this;
}
/**
* 机器内存, 单位MB
*
* Generated from protobuf field <code>string physical_memory = 16;</code>
* @return string
*/
public function getPhysicalMemory()
{
return $this->physical_memory;
}
/**
* 机器内存, 单位MB
*
* Generated from protobuf field <code>string physical_memory = 16;</code>
* @param string $var
* @return $this
*/
public function setPhysicalMemory($var)
{
GPBUtil::checkString($var, True);
$this->physical_memory = $var;
return $this;
}
/**
* 屏幕的宽度像素点
*
* Generated from protobuf field <code>int32 screen_width = 17;</code>
* @return int
*/
public function getScreenWidth()
{
return $this->screen_width;
}
/**
* 屏幕的宽度像素点
*
* Generated from protobuf field <code>int32 screen_width = 17;</code>
* @param int $var
* @return $this
*/
public function setScreenWidth($var)
{
GPBUtil::checkInt32($var);
$this->screen_width = $var;
return $this;
}
/**
* 屏幕的高度像素点
*
* Generated from protobuf field <code>int32 screent_height = 18;</code>
* @return int
*/
public function getScreentHeight()
{
return $this->screent_height;
}
/**
* 屏幕的高度像素点
*
* Generated from protobuf field <code>int32 screent_height = 18;</code>
* @param int $var
* @return $this
*/
public function setScreentHeight($var)
{
GPBUtil::checkInt32($var);
$this->screent_height = $var;
return $this;
}
/**
* 操作系统相关配置
*
* Generated from protobuf field <code>.gateway.data.rawlog.Platform platform = 21;</code>
* @return int
*/
public function getPlatform()
{
return $this->platform;
}
/**
* 操作系统相关配置
*
* Generated from protobuf field <code>.gateway.data.rawlog.Platform platform = 21;</code>
* @param int $var
* @return $this
*/
public function setPlatform($var)
{
GPBUtil::checkEnum($var, \Gateway\Data\Rawlog\Platform::class);
$this->platform = $var;
return $this;
}
/**
* 操作系统名
*
* Generated from protobuf field <code>string operating_system = 22;</code>
* @return string
*/
public function getOperatingSystem()
{
return $this->operating_system;
}
/**
* 操作系统名
*
* Generated from protobuf field <code>string operating_system = 22;</code>
* @param string $var
* @return $this
*/
public function setOperatingSystem($var)
{
GPBUtil::checkString($var, True);
$this->operating_system = $var;
return $this;
}
/**
* 语言
*
* Generated from protobuf field <code>string language = 23;</code>
* @return string
*/
public function getLanguage()
{
return $this->language;
}
/**
* 语言
*
* Generated from protobuf field <code>string language = 23;</code>
* @param string $var
* @return $this
*/
public function setLanguage($var)
{
GPBUtil::checkString($var, True);
$this->language = $var;
return $this;
}
/**
* 国家
*
* Generated from protobuf field <code>string country = 24;</code>
* @return string
*/
public function getCountry()
{
return $this->country;
}
/**
* 国家
*
* Generated from protobuf field <code>string country = 24;</code>
* @param string $var
* @return $this
*/
public function setCountry($var)
{
GPBUtil::checkString($var, True);
$this->country = $var;
return $this;
}
/**
* 时区
*
* Generated from protobuf field <code>string tm_zone = 25;</code>
* @return string
*/
public function getTmZone()
{
return $this->tm_zone;
}
/**
* 时区
*
* Generated from protobuf field <code>string tm_zone = 25;</code>
* @param string $var
* @return $this
*/
public function setTmZone($var)
{
GPBUtil::checkString($var, True);
$this->tm_zone = $var;
return $this;
}
/**
* iOS相关的信息
*
* Generated from protobuf field <code>bool ios_jailbreak = 51;</code>
* @return bool
*/
public function getIosJailbreak()
{
return $this->ios_jailbreak;
}
/**
* iOS相关的信息
*
* Generated from protobuf field <code>bool ios_jailbreak = 51;</code>
* @param bool $var
* @return $this
*/
public function setIosJailbreak($var)
{
GPBUtil::checkBool($var);
$this->ios_jailbreak = $var;
return $this;
}
/**
* 唯一区分设备号idfa
*
* Generated from protobuf field <code>string ios_advertising_identifier = 56;</code>
* @return string
*/
public function getIosAdvertisingIdentifier()
{
return $this->ios_advertising_identifier;
}
/**
* 唯一区分设备号idfa
*
* Generated from protobuf field <code>string ios_advertising_identifier = 56;</code>
* @param string $var
* @return $this
*/
public function setIosAdvertisingIdentifier($var)
{
GPBUtil::checkString($var, True);
$this->ios_advertising_identifier = $var;
return $this;
}
/**
* idfv
*
* Generated from protobuf field <code>string ios_identifier_for_vendor = 57;</code>
* @return string
*/
public function getIosIdentifierForVendor()
{
return $this->ios_identifier_for_vendor;
}
/**
* idfv
*
* Generated from protobuf field <code>string ios_identifier_for_vendor = 57;</code>
* @param string $var
* @return $this
*/
public function setIosIdentifierForVendor($var)
{
GPBUtil::checkString($var, True);
$this->ios_identifier_for_vendor = $var;
return $this;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: websitelog.proto
namespace Gateway\Data\Rawlog;
/**
* 描述app的平台
*
* Protobuf type <code>gateway.data.rawlog.Platform</code>
*/
class Platform
{
/**
*ios  
*
* Generated from protobuf enum <code>IOS = 0;</code>
*/
const IOS = 0;
/**
* android
*
* Generated from protobuf enum <code>Android = 1;</code>
*/
const Android = 1;
/**
* web
*
* Generated from protobuf enum <code>Web = 2;</code>
*/
const Web = 2;
/**
*unknown
*
* Generated from protobuf enum <code>Unknown = -1;</code>
*/
const Unknown = -1;
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: websitelog.proto
namespace Gateway\Data\Rawlog;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>gateway.data.rawlog.UID</code>
*/
class UID extends \Google\Protobuf\Internal\Message
{
/**
* 用户ID
*
* Generated from protobuf field <code>int64 user_id = 1;</code>
*/
private $user_id = 0;
/**
* 如果是MD5,此时device_id和mac_id都是MD5过的
*
* Generated from protobuf field <code>.gateway.data.rawlog.UID.Type type = 2;</code>
*/
private $type = 0;
/**
* based imei on android or idfa on ios
*
* Generated from protobuf field <code>string device_id = 3;</code>
*/
private $device_id = '';
/**
* Web user id, 只有Web用户才有
*
* Generated from protobuf field <code>string wuid = 5;</code>
*/
private $wuid = '';
/**
* web user, 来源的uid
*
* Generated from protobuf field <code>string refer_uid = 7;</code>
*/
private $refer_uid = '';
/**
* 用户名
*
* Generated from protobuf field <code>string user_name = 8;</code>
*/
private $user_name = '';
/**
* 是否登录(游客)
*
* Generated from protobuf field <code>string user_type = 9;</code>
*/
private $user_type = '';
/**
* 用户bucket id
*
* Generated from protobuf field <code>int64 bucket_id = 10;</code>
*/
private $bucket_id = 0;
/**
* 是否超级公共账号
*
* Generated from protobuf field <code>bool is_super_account = 11;</code>
*/
private $is_super_account = false;
/**
*微信相关的MD5ID
*
* Generated from protobuf field <code>string wid = 12;</code>
*/
private $wid = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int|string $user_id
* 用户ID
* @type int $type
* 如果是MD5,此时device_id和mac_id都是MD5过的
* @type string $device_id
* based imei on android or idfa on ios
* @type string $wuid
* Web user id, 只有Web用户才有
* @type string $refer_uid
* web user, 来源的uid
* @type string $user_name
* 用户名
* @type string $user_type
* 是否登录(游客)
* @type int|string $bucket_id
* 用户bucket id
* @type bool $is_super_account
* 是否超级公共账号
* @type string $wid
* 微信相关的MD5ID
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Websitelog::initOnce();
parent::__construct($data);
}
/**
* 用户ID
*
* Generated from protobuf field <code>int64 user_id = 1;</code>
* @return int|string
*/
public function getUserId()
{
return $this->user_id;
}
/**
* 用户ID
*
* Generated from protobuf field <code>int64 user_id = 1;</code>
* @param int|string $var
* @return $this
*/
public function setUserId($var)
{
GPBUtil::checkInt64($var);
$this->user_id = $var;
return $this;
}
/**
* 如果是MD5,此时device_id和mac_id都是MD5过的
*
* Generated from protobuf field <code>.gateway.data.rawlog.UID.Type type = 2;</code>
* @return int
*/
public function getType()
{
return $this->type;
}
/**
* 如果是MD5,此时device_id和mac_id都是MD5过的
*
* Generated from protobuf field <code>.gateway.data.rawlog.UID.Type type = 2;</code>
* @param int $var
* @return $this
*/
public function setType($var)
{
GPBUtil::checkEnum($var, \Gateway\Data\Rawlog\UID_Type::class);
$this->type = $var;
return $this;
}
/**
* based imei on android or idfa on ios
*
* Generated from protobuf field <code>string device_id = 3;</code>
* @return string
*/
public function getDeviceId()
{
return $this->device_id;
}
/**
* based imei on android or idfa on ios
*
* Generated from protobuf field <code>string device_id = 3;</code>
* @param string $var
* @return $this
*/
public function setDeviceId($var)
{
GPBUtil::checkString($var, True);
$this->device_id = $var;
return $this;
}
/**
* Web user id, 只有Web用户才有
*
* Generated from protobuf field <code>string wuid = 5;</code>
* @return string
*/
public function getWuid()
{
return $this->wuid;
}
/**
* Web user id, 只有Web用户才有
*
* Generated from protobuf field <code>string wuid = 5;</code>
* @param string $var
* @return $this
*/
public function setWuid($var)
{
GPBUtil::checkString($var, True);
$this->wuid = $var;
return $this;
}
/**
* web user, 来源的uid
*
* Generated from protobuf field <code>string refer_uid = 7;</code>
* @return string
*/
public function getReferUid()
{
return $this->refer_uid;
}
/**
* web user, 来源的uid
*
* Generated from protobuf field <code>string refer_uid = 7;</code>
* @param string $var
* @return $this
*/
public function setReferUid($var)
{
GPBUtil::checkString($var, True);
$this->refer_uid = $var;
return $this;
}
/**
* 用户名
*
* Generated from protobuf field <code>string user_name = 8;</code>
* @return string
*/
public function getUserName()
{
return $this->user_name;
}
/**
* 用户名
*
* Generated from protobuf field <code>string user_name = 8;</code>
* @param string $var
* @return $this
*/
public function setUserName($var)
{
GPBUtil::checkString($var, True);
$this->user_name = $var;
return $this;
}
/**
* 是否登录(游客)
*
* Generated from protobuf field <code>string user_type = 9;</code>
* @return string
*/
public function getUserType()
{
return $this->user_type;
}
/**
* 是否登录(游客)
*
* Generated from protobuf field <code>string user_type = 9;</code>
* @param string $var
* @return $this
*/
public function setUserType($var)
{
GPBUtil::checkString($var, True);
$this->user_type = $var;
return $this;
}
/**
* 用户bucket id
*
* Generated from protobuf field <code>int64 bucket_id = 10;</code>
* @return int|string
*/
public function getBucketId()
{
return $this->bucket_id;
}
/**
* 用户bucket id
*
* Generated from protobuf field <code>int64 bucket_id = 10;</code>
* @param int|string $var
* @return $this
*/
public function setBucketId($var)
{
GPBUtil::checkInt64($var);
$this->bucket_id = $var;
return $this;
}
/**
* 是否超级公共账号
*
* Generated from protobuf field <code>bool is_super_account = 11;</code>
* @return bool
*/
public function getIsSuperAccount()
{
return $this->is_super_account;
}
/**
* 是否超级公共账号
*
* Generated from protobuf field <code>bool is_super_account = 11;</code>
* @param bool $var
* @return $this
*/
public function setIsSuperAccount($var)
{
GPBUtil::checkBool($var);
$this->is_super_account = $var;
return $this;
}
/**
*微信相关的MD5ID
*
* Generated from protobuf field <code>string wid = 12;</code>
* @return string
*/
public function getWid()
{
return $this->wid;
}
/**
*微信相关的MD5ID
*
* Generated from protobuf field <code>string wid = 12;</code>
* @param string $var
* @return $this
*/
public function setWid($var)
{
GPBUtil::checkString($var, True);
$this->wid = $var;
return $this;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: websitelog.proto
namespace Gateway\Data\Rawlog\UID;
/**
* 出于安全的考虑,部分手机上使用的是md5过的imei号;
*
* Protobuf type <code>gateway.data.rawlog.UID.Type</code>
*/
class Type
{
/**
* Generated from protobuf enum <code>NONE = 0;</code>
*/
const NONE = 0;
/**
* Generated from protobuf enum <code>MD5 = 1;</code>
*/
const MD5 = 1;
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Type::class, \Gateway\Data\Rawlog\UID_Type::class);
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: websitelog.proto
namespace Gateway\Data\Rawlog;
if (false) {
/**
* This class is deprecated. Use Gateway\Data\Rawlog\UID\Type instead.
* @deprecated
*/
class UID_Type {}
}
class_exists(UID\Type::class);
@trigger_error('Gateway\Data\Rawlog\UID_Type is deprecated and will be removed in the next major release. Use Gateway\Data\Rawlog\UID\Type instead', E_USER_DEPRECATED);
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: websitelog.proto
namespace Gateway\Data\Rawlog;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>gateway.data.rawlog.WebsiteLog</code>
*/
class WebsiteLog extends \Google\Protobuf\Internal\Message
{
/**
* 请求时间,精确到毫秒
*
* Generated from protobuf field <code>int64 request_time_ms = 1;</code>
*/
private $request_time_ms = 0;
/**
* 请求的响应时间,精确到毫秒
*
* Generated from protobuf field <code>int64 response_time_ms = 2;</code>
*/
private $response_time_ms = 0;
/**
* 事件标识
*
* Generated from protobuf field <code>string action = 3;</code>
*/
private $action = '';
/**
* 日志接收时间
*
* Generated from protobuf field <code>int64 recv_time_ms = 6;</code>
*/
private $recv_time_ms = 0;
/**
* 前端ip?
*
* Generated from protobuf field <code>string remote_host = 8;</code>
*/
private $remote_host = '';
/**
* 日志唯一性标识?
*
* Generated from protobuf field <code>string checksum = 9;</code>
*/
private $checksum = '';
/**
* 以下为 request 的内容
*
* Generated from protobuf field <code>.gateway.data.rawlog.AppMeta app_meta = 101;</code>
*/
private $app_meta = null;
/**
* API 版本号
*
* Generated from protobuf field <code>string api_version = 102;</code>
*/
private $api_version = '';
/**
* 用户相关的ID, 唯一标识用户
*
* Generated from protobuf field <code>.gateway.data.rawlog.UID uid = 103;</code>
*/
private $uid = null;
/**
* (来自API组的需求) request_id
*
* Generated from protobuf field <code>string reqid = 104;</code>
*/
private $reqid = '';
/**
*request.ip / request.clientInfo.deviceInfo.ip
*
* Generated from protobuf field <code>string ip = 105;</code>
*/
private $ip = '';
/**
*request.net
*
* Generated from protobuf field <code>string net_type = 106;</code>
*/
private $net_type = '';
/**
* 其它常用 request 参数待补充
*
* Generated from protobuf field <code>map<string, string> request_context = 199;</code>
*/
private $request_context;
/**
* 以下为 response 的内容
*
* Generated from protobuf field <code>string status = 201;</code>
*/
private $status = '';
/**
* 具体状态code
*
* Generated from protobuf field <code>int32 code = 202;</code>
*/
private $code = 0;
/**
* 错误原因
*
* Generated from protobuf field <code>string reason = 203;</code>
*/
private $reason = '';
/**
* 其它常用 response 参数待补充
*
* Generated from protobuf field <code>map<string, string> response_context = 299;</code>
*/
private $response_context;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int|string $request_time_ms
* 请求时间,精确到毫秒
* @type int|string $response_time_ms
* 请求的响应时间,精确到毫秒
* @type string $action
* 事件标识
* @type int|string $recv_time_ms
* 日志接收时间
* @type string $remote_host
* 前端ip?
* @type string $checksum
* 日志唯一性标识?
* @type \Gateway\Data\Rawlog\AppMeta $app_meta
* 以下为 request 的内容
* @type string $api_version
* API 版本号
* @type \Gateway\Data\Rawlog\UID $uid
* 用户相关的ID, 唯一标识用户
* @type string $reqid
* (来自API组的需求) request_id
* @type string $ip
* request.ip / request.clientInfo.deviceInfo.ip
* @type string $net_type
* request.net
* @type array|\Google\Protobuf\Internal\MapField $request_context
* 其它常用 request 参数待补充
* @type string $status
* 以下为 response 的内容
* @type int $code
* 具体状态code
* @type string $reason
* 错误原因
* @type array|\Google\Protobuf\Internal\MapField $response_context
* 其它常用 response 参数待补充
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Websitelog::initOnce();
parent::__construct($data);
}
/**
* 请求时间,精确到毫秒
*
* Generated from protobuf field <code>int64 request_time_ms = 1;</code>
* @return int|string
*/
public function getRequestTimeMs()
{
return $this->request_time_ms;
}
/**
* 请求时间,精确到毫秒
*
* Generated from protobuf field <code>int64 request_time_ms = 1;</code>
* @param int|string $var
* @return $this
*/
public function setRequestTimeMs($var)
{
GPBUtil::checkInt64($var);
$this->request_time_ms = $var;
return $this;
}
/**
* 请求的响应时间,精确到毫秒
*
* Generated from protobuf field <code>int64 response_time_ms = 2;</code>
* @return int|string
*/
public function getResponseTimeMs()
{
return $this->response_time_ms;
}
/**
* 请求的响应时间,精确到毫秒
*
* Generated from protobuf field <code>int64 response_time_ms = 2;</code>
* @param int|string $var
* @return $this
*/
public function setResponseTimeMs($var)
{
GPBUtil::checkInt64($var);
$this->response_time_ms = $var;
return $this;
}
/**
* 事件标识
*
* Generated from protobuf field <code>string action = 3;</code>
* @return string
*/
public function getAction()
{
return $this->action;
}
/**
* 事件标识
*
* Generated from protobuf field <code>string action = 3;</code>
* @param string $var
* @return $this
*/
public function setAction($var)
{
GPBUtil::checkString($var, True);
$this->action = $var;
return $this;
}
/**
* 日志接收时间
*
* Generated from protobuf field <code>int64 recv_time_ms = 6;</code>
* @return int|string
*/
public function getRecvTimeMs()
{
return $this->recv_time_ms;
}
/**
* 日志接收时间
*
* Generated from protobuf field <code>int64 recv_time_ms = 6;</code>
* @param int|string $var
* @return $this
*/
public function setRecvTimeMs($var)
{
GPBUtil::checkInt64($var);
$this->recv_time_ms = $var;
return $this;
}
/**
* 前端ip?
*
* Generated from protobuf field <code>string remote_host = 8;</code>
* @return string
*/
public function getRemoteHost()
{
return $this->remote_host;
}
/**
* 前端ip?
*
* Generated from protobuf field <code>string remote_host = 8;</code>
* @param string $var
* @return $this
*/
public function setRemoteHost($var)
{
GPBUtil::checkString($var, True);
$this->remote_host = $var;
return $this;
}
/**
* 日志唯一性标识?
*
* Generated from protobuf field <code>string checksum = 9;</code>
* @return string
*/
public function getChecksum()
{
return $this->checksum;
}
/**
* 日志唯一性标识?
*
* Generated from protobuf field <code>string checksum = 9;</code>
* @param string $var
* @return $this
*/
public function setChecksum($var)
{
GPBUtil::checkString($var, True);
$this->checksum = $var;
return $this;
}
/**
* 以下为 request 的内容
*
* Generated from protobuf field <code>.gateway.data.rawlog.AppMeta app_meta = 101;</code>
* @return \Gateway\Data\Rawlog\AppMeta
*/
public function getAppMeta()
{
return $this->app_meta;
}
/**
* 以下为 request 的内容
*
* Generated from protobuf field <code>.gateway.data.rawlog.AppMeta app_meta = 101;</code>
* @param \Gateway\Data\Rawlog\AppMeta $var
* @return $this
*/
public function setAppMeta($var)
{
GPBUtil::checkMessage($var, \Gateway\Data\Rawlog\AppMeta::class);
$this->app_meta = $var;
return $this;
}
/**
* API 版本号
*
* Generated from protobuf field <code>string api_version = 102;</code>
* @return string
*/
public function getApiVersion()
{
return $this->api_version;
}
/**
* API 版本号
*
* Generated from protobuf field <code>string api_version = 102;</code>
* @param string $var
* @return $this
*/
public function setApiVersion($var)
{
GPBUtil::checkString($var, True);
$this->api_version = $var;
return $this;
}
/**
* 用户相关的ID, 唯一标识用户
*
* Generated from protobuf field <code>.gateway.data.rawlog.UID uid = 103;</code>
* @return \Gateway\Data\Rawlog\UID
*/
public function getUid()
{
return $this->uid;
}
/**
* 用户相关的ID, 唯一标识用户
*
* Generated from protobuf field <code>.gateway.data.rawlog.UID uid = 103;</code>
* @param \Gateway\Data\Rawlog\UID $var
* @return $this
*/
public function setUid($var)
{
GPBUtil::checkMessage($var, \Gateway\Data\Rawlog\UID::class);
$this->uid = $var;
return $this;
}
/**
* (来自API组的需求) request_id
*
* Generated from protobuf field <code>string reqid = 104;</code>
* @return string
*/
public function getReqid()
{
return $this->reqid;
}
/**
* (来自API组的需求) request_id
*
* Generated from protobuf field <code>string reqid = 104;</code>
* @param string $var
* @return $this
*/
public function setReqid($var)
{
GPBUtil::checkString($var, True);
$this->reqid = $var;
return $this;
}
/**
*request.ip / request.clientInfo.deviceInfo.ip
*
* Generated from protobuf field <code>string ip = 105;</code>
* @return string
*/
public function getIp()
{
return $this->ip;
}
/**
*request.ip / request.clientInfo.deviceInfo.ip
*
* Generated from protobuf field <code>string ip = 105;</code>
* @param string $var
* @return $this
*/
public function setIp($var)
{
GPBUtil::checkString($var, True);
$this->ip = $var;
return $this;
}
/**
*request.net
*
* Generated from protobuf field <code>string net_type = 106;</code>
* @return string
*/
public function getNetType()
{
return $this->net_type;
}
/**
*request.net
*
* Generated from protobuf field <code>string net_type = 106;</code>
* @param string $var
* @return $this
*/
public function setNetType($var)
{
GPBUtil::checkString($var, True);
$this->net_type = $var;
return $this;
}
/**
* 其它常用 request 参数待补充
*
* Generated from protobuf field <code>map<string, string> request_context = 199;</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getRequestContext()
{
return $this->request_context;
}
/**
* 其它常用 request 参数待补充
*
* Generated from protobuf field <code>map<string, string> request_context = 199;</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setRequestContext($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
$this->request_context = $arr;
return $this;
}
/**
* 以下为 response 的内容
*
* Generated from protobuf field <code>string status = 201;</code>
* @return string
*/
public function getStatus()
{
return $this->status;
}
/**
* 以下为 response 的内容
*
* Generated from protobuf field <code>string status = 201;</code>
* @param string $var
* @return $this
*/
public function setStatus($var)
{
GPBUtil::checkString($var, True);
$this->status = $var;
return $this;
}
/**
* 具体状态code
*
* Generated from protobuf field <code>int32 code = 202;</code>
* @return int
*/
public function getCode()
{
return $this->code;
}
/**
* 具体状态code
*
* Generated from protobuf field <code>int32 code = 202;</code>
* @param int $var
* @return $this
*/
public function setCode($var)
{
GPBUtil::checkInt32($var);
$this->code = $var;
return $this;
}
/**
* 错误原因
*
* Generated from protobuf field <code>string reason = 203;</code>
* @return string
*/
public function getReason()
{
return $this->reason;
}
/**
* 错误原因
*
* Generated from protobuf field <code>string reason = 203;</code>
* @param string $var
* @return $this
*/
public function setReason($var)
{
GPBUtil::checkString($var, True);
$this->reason = $var;
return $this;
}
/**
* 其它常用 response 参数待补充
*
* Generated from protobuf field <code>map<string, string> response_context = 299;</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getResponseContext()
{
return $this->response_context;
}
/**
* 其它常用 response 参数待补充
*
* Generated from protobuf field <code>map<string, string> response_context = 299;</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setResponseContext($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
$this->response_context = $arr;
return $this;
}
}
<?php
namespace Api\PhpUtils\Protobuf\WebsiteLog;
use Api\PhpUtils\Http\Request;
use Gateway\Data\Rawlog\AppMeta;
use Gateway\Data\Rawlog\UID;
use Gateway\Data\Rawlog\WebsiteLog;
use http\Exception;
use Api\PhpUtils\Log;
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Gateway/Data/Rawlog/WebsiteLog.php';
//require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Yidian/Data/Rawlog/UID_Type.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Gateway/Data/Rawlog/UID.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Gateway/Data/Rawlog/UID/Type.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Gateway/Data/Rawlog/AppMeta.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Gateway/Data/Rawlog/Platform.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'GPBMetadata/Websitelog.php';
class WebLog
{
private const BP_WEBSITE_PB_LOG_URL = 'http://online-feedback-receiver.ha.in.yidian.com:9088/OnlineFeedbackReceiver/ProtobufStreamHandler?topic=rawlog_bp_api_bp_gateway_prod';
/**
* 日志格式转pb格式
*
* @param array $log
* @return string
*/
public function log2pb(array $log) : string
{
try
{
//message对象
$uid = new UID();
$app_meta = new AppMeta();
$website_log = new WebsiteLog();
$action = $this->formatAction($_SERVER['action']);
$platform_list = array(
"IOS" => 0,
"Android" => 1,
"Web" => 2,
"Unknown" => -1
); //平台列表
//app_meta属性赋值
//App相关配置
$app_meta->setAppId($log['request']['appid'] ?? ''); //appid
$app_meta->setBundleVersion($log['request']['clientInfo']['userInfo']['appVersion'] ?? $log['request']['log']['bundle_version'] ?? '');
$app_meta->setDistributionChannel($log['request']['distribution'] ?? '');
$app_meta->setImei($log['request']['clientInfo']['userInfo']['imei'] ?? $log['request']['imei'] ?? '');
$app_meta->setMacId($log['request']['clientInfo']['userInfo']['mac'] ?? $log['request']['mac'] ?? '');
$app_meta->setAndroidId($log['request']['clientInfo']['userInfo']['androidId'] ?? $log['request']['androidId'] ?? '');
//设备相关的元数据
$app_meta->setDeviceName($log['request']['clientInfo']['deviceInfo']['deviceName'] ?? $log['request']['deviceName'] ?? $log['request']['clientInfo']['deviceInfo']['model'] ?? '');
$app_meta->setBrand($log['request']['clientInfo']['deviceInfo']['brand'] ?? $log['request']['deviceBrand'] ?? '');
$app_meta->setScreenDensity($log['request']['clientInfo']['deviceInfo']['screenDensity'] ?? '');
if (isset($log['request']['clientInfo']['deviceInfo']['screenWidth']) && is_numeric($log['request']['clientInfo']['deviceInfo']['screenWidth']))
{
$app_meta->setScreenWidth((int)$log['request']['clientInfo']['deviceInfo']['screenWidth']);
}
if (isset($log['request']['clientInfo']['deviceInfo']['screenHeight']) && is_numeric($log['request']['clientInfo']['deviceInfo']['screenHeight']))
{
$app_meta->setScreentHeight((int)$log['request']['clientInfo']['deviceInfo']['screenHeight']);
}
//操作系统相关配置
if (isset($log['request']['platform']) && is_numeric($log['request']['platform']) && in_array($log['request']['platform'], $platform_list))
{
$app_meta->setPlatform((int)$log['request']['platform']);
}
else
{
$app_meta->setPlatform(-1);
}
$app_meta->setOperatingSystem($log['request']['clientInfo']['deviceInfo']['androidVersion'] ?? $log['request']['clientInfo']['deviceInfo']['iosVersion'] ?? '');
$app_meta->setLanguage($log['request']['clientInfo']['userInfo']['language'] ?? '');
$app_meta->setCountry($log['request']['clientInfo']['userInfo']['country'] ?? '');
//iOS相关的信息
$app_meta->setIosAdvertisingIdentifier($log['request']['clientInfo']['userInfo']['ifa'] ?? $log['request']['clientInfo']['app_info']['ifa'] ?? '');
$app_meta->setIosIdentifierForVendor($log['request']['clientInfo']['app_info']['idfv'] ?? '');
//uid属性赋值
if (isset($log['request']['userid']) && is_numeric($log['request']['userid']))
{
$uid->setUserId((int)$log['request']['userid']); //userid
}
$uid->setDeviceId($log['request']['deviceid'] ?? $log['request']['clientInfo']['app_info']['device_id'] ?? '');
$uid->setUserName($log['request']['username'] ?? '');
$uid->setUserType($log['request']['usertype'] ?? '');
if (isset($log['request']['log']['bucket_id']) && is_numeric($log['request']['bucket_id']))
{
$uid->setBucketId($log['request']['log']['bucket_id']);
}
$uid->setIsSuperAccount($log['request']['is_super_account'] ?? false);
$uid->setWid($log['request']['wid'] ?? '');
//website_log属性赋值
$website_log->setRequestTimeMs(isset($log['request_time']) ? floor($log['request_time'] * 1000) : 0);
$website_log->setResponseTimeMs(isset($log['response_time']) ? floor($log['response_time'] * 1000) : 0);
$website_log->setAction($action);
$website_log->setRecvTimeMs(isset($log['recv_time']) ? floor($log['recv_time'] * 1000) : 0);
$website_log->setRemoteHost($log['request']['clientInfo']['userInfo']['ip'] ?? '');
$website_log->setChecksum($log['request']['checksum'] ?? '');
//request内容
$website_log->setAppMeta($app_meta);
$website_log->setApiVersion($log['request']['version'] ?? '');
$website_log->setUid($uid);
$website_log->setReqid($log['request']['requestId'] ?? $log['request']['reqid'] ?? '');
//response内容
$website_log->setStatus($log['response']['status'] ?? 'success');
$website_log->setCode($log['response']['code'] ?? 0);
$website_log->setReason($log['response']['reason'] ?? '');
return $website_log->serializeToString(); //序列化
} catch (Exception $e)
{
return '';
}
}
/**
* 格式化action: (1)将 // 替换成 /; (2)去掉开头的/; (3)/ 和 - 替换为 _; (4)转换为小写
*
* @param $action
* @return mixed
*/
private function formatAction($action)
{
$tmp1 = str_replace('//', '/', $action);
$tmp2 = strtolower(substr($tmp1, 1, strlen($tmp1) - 1));
return str_replace(array('/', '-'), '_', $tmp2);
}
/**
* 发送pb 日志
* @param $result
* @param int $percentage
* @param bool $send_request
* @param string $action
*/
public function sendPbLog($result,$percentage = 100, $send_request = true, $action = '')
{
if ($percentage >= 100 || $_SERVER['REQUEST_TIME'] % 100 < $percentage)
{
$log = array(
'request_time' => $_SERVER['REQUEST_TIME_FLOAT'],
'response_time' => microtime(true)
);
$log['action'] = $action ?? explode('?', $_SERVER['REQUEST_URI'])[0];
if ($send_request === true)
{
$log['request'] = array_merge( $_GET, $_POST );
} else if ($send_request !== false) {
$log['request'] = $send_request;
}
$log['response']['status'] = $result['status']??'';
$log['response']['code'] = $result['code']??'';
$log['response']['reason'] = $result['reason']??'';
if( !empty($GLOBALS['related_url']) )
{
$log['response']['related_url'] = $GLOBALS['related_url'];
}
if (extension_loaded('protobuf'))
{
$data = $this->log2pb($log);
if (!empty($data))
{
$bp_website_pb_log_url = self::BP_WEBSITE_PB_LOG_URL;
$res = (new Request())->post($bp_website_pb_log_url, $data, 50, ['Content-Type: binary/octet-stream'], [], 1);
}
}
}
}
}
\ No newline at end of file
syntax = "proto3";
package gateway.data.rawlog;
// 描述app的平台
enum Platform {
IOS = 0; //ios  
Android = 1; // android
Web = 2; // web
Unknown = -1; //unknown
};
message UID {
enum Type { // 出于安全的考虑,部分手机上使用的是md5过的imei号;
NONE = 0;
MD5 = 1;
};
int64 user_id = 1; // 用户ID
Type type = 2; // 如果是MD5,此时device_id和mac_id都是MD5过的
string device_id = 3; // based imei on android or idfa on ios
string wuid = 5; // Web user id, 只有Web用户才有
string refer_uid = 7; // web user, 来源的uid
string user_name = 8; // 用户名
string user_type = 9; // 是否登录(游客)
int64 bucket_id = 10; // 用户bucket id
bool is_super_account = 11; // 是否超级公共账号
string wid = 12; //微信相关的MD5ID
};
message AppMeta {
// App相关配置
string app_id = 1;
string build_number = 2; // 发布号是后台区分版本的唯一id,不同平台,不同版本都需要保证全局的唯一性
string bundle_version = 3; // app_version
string distribution_channel = 4; // 分发渠道,是否修改为枚举?
string imei = 6; // md5后的imei号
string mac_id = 7; // MacID
string android_id = 8; // 安卓系统用户id
string android_advertising_id = 9; // 安卓系统用户谷歌广告id 201805 安卓4660版本新增
// 设备相关的元数据
string device_name = 11; // 设备名
string brand = 12; // 机器的品牌
//optional string screen_resolution = 13; // 屏幕分辨率
string screen_density = 14; // 屏幕密度,每英寸有多少个显示点
int32 processor_count = 15; // 处理器核数
string physical_memory = 16; // 机器内存, 单位MB
int32 screen_width = 17; // 屏幕的宽度像素点
int32 screent_height = 18; // 屏幕的高度像素点
// 操作系统相关配置
Platform platform = 21; // 平台
string operating_system = 22; // 操作系统名
string language = 23; // 语言
string country = 24; // 国家
string tm_zone = 25; // 时区
// iOS相关的信息
bool ios_jailbreak = 51; // 是否越狱
string ios_advertising_identifier = 56; // 唯一区分设备号idfa
string ios_identifier_for_vendor = 57; // idfv
};
message WebsiteLog {
int64 request_time_ms = 1; // 请求时间,精确到毫秒
int64 response_time_ms = 2; // 请求的响应时间,精确到毫秒
string action = 3; // 事件标识
int64 recv_time_ms = 6; // 日志接收时间
string remote_host = 8; // 前端ip?
string checksum = 9; // 日志唯一性标识?
// 以下为 request 的内容
AppMeta app_meta = 101; // app客户端的meta信息
string api_version = 102; // API 版本号
UID uid = 103; // 用户相关的ID, 唯一标识用户
string reqid = 104; // (来自API组的需求) request_id
string ip = 105; //request.ip / request.clientInfo.deviceInfo.ip
string net_type = 106; //request.net
// 其它常用 request 参数待补充
map<string, string> request_context = 199; // 其它不常用的来自请求的输入参数
// 以下为 response 的内容
string status = 201; // 请求是否成功的状态标识
int32 code = 202; // 具体状态code
string reason = 203; // 错误原因
// 其它常用 response 参数待补充
map<string, string> response_context = 299; // 其它不常用的来自响应的输入参数
};
\ No newline at end of file
......@@ -32,7 +32,7 @@ private static $installed = array (
'aliases' =>
array (
),
'reference' => 'edf34efd699a9adb743ae22e7e4d1afe0e44a01a',
'reference' => 'f11a2d63267c34c4aa7f78db52452a05ebbe7ebc',
'name' => 'yidian/yaf_demo',
),
'versions' =>
......@@ -45,7 +45,7 @@ private static $installed = array (
array (
0 => '9999999-dev',
),
'reference' => '1a73d985fc0743343751d4aad8e34cc3bc7f12bc',
'reference' => 'ba2b0ec550925883c2eed5c041f059d1cf19081c',
),
'api/php_utils' =>
array (
......@@ -55,7 +55,7 @@ private static $installed = array (
array (
0 => '9999999-dev',
),
'reference' => '8ea0f5ec5e1c909fa76ec171e8698a4622aaec5a',
'reference' => 'b4e73dd1535e9eece30e3a4fc5519c0f3d685e26',
),
'catfan/medoo' =>
array (
......@@ -132,6 +132,15 @@ private static $installed = array (
),
'reference' => '18fca8cc8d0c2cc07f76605760d20632bb3dab96',
),
'perftools/php-profiler' =>
array (
'pretty_version' => '0.18.0',
'version' => '0.18.0.0',
'aliases' =>
array (
),
'reference' => '794c435f615ab9ca4347e386b4d8c6524fe9e3ae',
),
'psr/http-message' =>
array (
'pretty_version' => 'dev-master',
......@@ -184,7 +193,7 @@ private static $installed = array (
'aliases' =>
array (
),
'reference' => 'edf34efd699a9adb743ae22e7e4d1afe0e44a01a',
'reference' => 'f11a2d63267c34c4aa7f78db52452a05ebbe7ebc',
),
),
);
......
......@@ -24,6 +24,7 @@ return array(
'Api\\PhpServices\\InfoFlow\\InfoFlow' => $vendorDir . '/api/php_services/src/InfoFlow/InfoFlow.php',
'Api\\PhpServices\\JwUser\\JwUser' => $vendorDir . '/api/php_services/src/JwUser/JwUser.php',
'Api\\PhpServices\\Ksy\\Ksyun' => $vendorDir . '/api/php_services/src/Ksy/Ksyun.php',
'Api\\PhpServices\\LifeAccount\\Account' => $vendorDir . '/api/php_services/src/LifeAccount/Account.php',
'Api\\PhpServices\\Login\\Login' => $vendorDir . '/api/php_services/src/Login/Login.php',
'Api\\PhpServices\\PushToken\\Android' => $vendorDir . '/api/php_services/src/PushToken/Android.php',
'Api\\PhpServices\\PushToken\\Base' => $vendorDir . '/api/php_services/src/PushToken/Base.php',
......@@ -41,6 +42,8 @@ return array(
'Api\\PhpServices\\Tuffy\\TuffyService' => $vendorDir . '/api/php_services/src/Tuffy/TuffyService.php',
'Api\\PhpServices\\UserInfo\\User' => $vendorDir . '/api/php_services/src/UserInfo/User.php',
'Api\\PhpServices\\WeMedia\\WeMediaService' => $vendorDir . '/api/php_services/src/WeMedia/WeMediaService.php',
'Api\\PhpServices\\XhProfiler\\XhMongo' => $vendorDir . '/api/php_services/src/XhProfiler/XhMongo.php',
'Api\\PhpServices\\XhProfiler\\XhProfilerService' => $vendorDir . '/api/php_services/src/XhProfiler/XhProfilerService.php',
'Api\\PhpUtils\\Cache\\ApcuUtil' => $vendorDir . '/api/php_utils/src/Cache/ApcuUtil.php',
'Api\\PhpUtils\\Cache\\CacheUtil' => $vendorDir . '/api/php_utils/src/Cache/CacheUtil.php',
'Api\\PhpUtils\\Common\\BaseConvert' => $vendorDir . '/api/php_utils/src/Common/BaseConvert.php',
......@@ -60,6 +63,7 @@ return array(
'Api\\PhpUtils\\Kafka\\KafkaProducer' => $vendorDir . '/api/php_utils/src/Kafka/KafkaProducer.php',
'Api\\PhpUtils\\Kafka\\KafkaUtil' => $vendorDir . '/api/php_utils/src/Kafka/KafkaUtil.php',
'Api\\PhpUtils\\Kafka\\Singleton' => $vendorDir . '/api/php_utils/src/Kafka/Singleton.php',
'Api\\PhpUtils\\Ksy\\Ks3Util' => $vendorDir . '/api/php_utils/src/Ksy/Ks3Util.php',
'Api\\PhpUtils\\Log\\DaemoLog' => $vendorDir . '/api/php_utils/src/Log/DaemoLog.php',
'Api\\PhpUtils\\Log\\FileLog' => $vendorDir . '/api/php_utils/src/Log/FileLog.php',
'Api\\PhpUtils\\Message\\Email' => $vendorDir . '/api/php_utils/src/Message/Email.php',
......@@ -72,6 +76,7 @@ return array(
'Api\\PhpUtils\\Mysql\\MysqlClusterBase' => $vendorDir . '/api/php_utils/src/Mysql/MysqlClusterBase.php',
'Api\\PhpUtils\\Mysql\\ReadDB' => $vendorDir . '/api/php_utils/src/Mysql/ReadDB.php',
'Api\\PhpUtils\\Mysql\\WriteDB' => $vendorDir . '/api/php_utils/src/Mysql/WriteDB.php',
'Api\\PhpUtils\\Protobuf\\WebsiteLog\\WebLog' => $vendorDir . '/api/php_utils/src/Protobuf/WebsiteLog/WebLog.php',
'Api\\PhpUtils\\RabbitMq\\DelayRabbitMq' => $vendorDir . '/api/php_utils/src/RabbitMq/DelayRabbitMq.php',
'Api\\PhpUtils\\Redis\\Base' => $vendorDir . '/api/php_utils/src/Redis/Base.php',
'Api\\PhpUtils\\Redis\\Codis' => $vendorDir . '/api/php_utils/src/Redis/Codis.php',
......@@ -86,16 +91,31 @@ return array(
'App\\Exception\\ExceptionHandler' => $baseDir . '/application/exception/ExceptionHandler.php',
'App\\Exception\\custom\\Code' => $baseDir . '/application/exception/custom/Code.php',
'App\\Exception\\custom\\CodeSpecialException' => $baseDir . '/application/exception/custom/CodeSpecialException.php',
'App\\Exception\\custom\\GoodsException' => $baseDir . '/application/exception/custom/GoodsException.php',
'App\\Exception\\custom\\ParamException' => $baseDir . '/application/exception/custom/ParamException.php',
'App\\Exception\\custom\\ShopException' => $baseDir . '/application/exception/custom/ShopException.php',
'App\\Exception\\custom\\SignException' => $baseDir . '/application/exception/custom/SignException.php',
'App\\Exception\\custom\\TestException' => $baseDir . '/application/exception/custom/TestException.php',
'App\\Models\\demo\\mongo\\Test' => $baseDir . '/application/models/demo/mongo/Test.php',
'App\\Models\\demo\\mongo\\User' => $baseDir . '/application/models/demo/mongo/User.php',
'App\\Models\\demo\\mysql\\User' => $baseDir . '/application/models/demo/mysql/User.php',
'App\\Models\\goods\\mysql\\Category' => $baseDir . '/application/models/goods/mysql/Category.php',
'App\\Models\\goods\\mysql\\GoodsOperationRecord' => $baseDir . '/application/models/goods/mysql/GoodsOperationRecord.php',
'App\\Models\\goods\\mysql\\GoodsSku' => $baseDir . '/application/models/goods/mysql/GoodsSku.php',
'App\\Models\\goods\\mysql\\GoodsSkuStores' => $baseDir . '/application/models/goods/mysql/GoodsSkuStores.php',
'App\\Models\\goods\\mysql\\GoodsSnapshot' => $baseDir . '/application/models/goods/mysql/GoodsSnapshot.php',
'App\\Models\\goods\\mysql\\GoodsSpu' => $baseDir . '/application/models/goods/mysql/GoodsSpu.php',
'App\\Models\\goods\\mysql\\InventoryOperationRecord' => $baseDir . '/application/models/goods/mysql/InventoryOperationRecord.php',
'App\\Models\\goods\\mysql\\Shop' => $baseDir . '/application/models/goods/mysql/Shop.php',
'App\\Models\\shop\\mysql\\Shop' => $baseDir . '/application/models/shop/mysql/Shop.php',
'App\\Models\\shop\\mysql\\SubShop' => $baseDir . '/application/models/shop/mysql/SubShop.php',
'App\\Plugins\\Hook' => $baseDir . '/application/plugins/Hook.php',
'App\\Services\\demo\\ElasticService' => $baseDir . '/application/services/demo/ElasticService.php',
'App\\Services\\demo\\MongoService' => $baseDir . '/application/services/demo/MongoService.php',
'App\\Services\\demo\\MysqlService' => $baseDir . '/application/services/demo/MysqlService.php',
'App\\Services\\goods\\CategoryService' => $baseDir . '/application/services/goods/CategoryService.php',
'App\\Services\\goods\\GoodsService' => $baseDir . '/application/services/goods/GoodsService.php',
'App\\Services\\shop\\ShopService' => $baseDir . '/application/services/shop/ShopService.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Daemon\\Test' => $baseDir . '/daemon/Test.php',
'Elasticsearch\\Client' => $vendorDir . '/elasticsearch/elasticsearch/src/Elasticsearch/Client.php',
......@@ -761,4 +781,23 @@ return array(
'React\\Promise\\PromisorInterface' => $vendorDir . '/react/promise/src/PromisorInterface.php',
'React\\Promise\\RejectedPromise' => $vendorDir . '/react/promise/src/RejectedPromise.php',
'React\\Promise\\UnhandledRejectionException' => $vendorDir . '/react/promise/src/UnhandledRejectionException.php',
'Xhgui\\Profiler\\Exception\\ProfilerException' => $vendorDir . '/perftools/php-profiler/src/Exception/ProfilerException.php',
'Xhgui\\Profiler\\Profiler' => $vendorDir . '/perftools/php-profiler/src/Profiler.php',
'Xhgui\\Profiler\\ProfilerFactory' => $vendorDir . '/perftools/php-profiler/src/ProfilerFactory.php',
'Xhgui\\Profiler\\Profilers\\AbstractProfiler' => $vendorDir . '/perftools/php-profiler/src/Profilers/AbstractProfiler.php',
'Xhgui\\Profiler\\Profilers\\ProfilerInterface' => $vendorDir . '/perftools/php-profiler/src/Profilers/ProfilerInterface.php',
'Xhgui\\Profiler\\Profilers\\Tideways' => $vendorDir . '/perftools/php-profiler/src/Profilers/Tideways.php',
'Xhgui\\Profiler\\Profilers\\TidewaysXHProf' => $vendorDir . '/perftools/php-profiler/src/Profilers/TidewaysXHProf.php',
'Xhgui\\Profiler\\Profilers\\UProfiler' => $vendorDir . '/perftools/php-profiler/src/Profilers/UProfiler.php',
'Xhgui\\Profiler\\Profilers\\XHProf' => $vendorDir . '/perftools/php-profiler/src/Profilers/XHProf.php',
'Xhgui\\Profiler\\ProfilingData' => $vendorDir . '/perftools/php-profiler/src/ProfilingData.php',
'Xhgui\\Profiler\\ProfilingFlags' => $vendorDir . '/perftools/php-profiler/src/ProfilingFlags.php',
'Xhgui\\Profiler\\SaverFactory' => $vendorDir . '/perftools/php-profiler/src/SaverFactory.php',
'Xhgui\\Profiler\\Saver\\AbstractSaver' => $vendorDir . '/perftools/php-profiler/src/Saver/AbstractSaver.php',
'Xhgui\\Profiler\\Saver\\FileSaver' => $vendorDir . '/perftools/php-profiler/src/Saver/FileSaver.php',
'Xhgui\\Profiler\\Saver\\MongoSaver' => $vendorDir . '/perftools/php-profiler/src/Saver/MongoSaver.php',
'Xhgui\\Profiler\\Saver\\PdoSaver' => $vendorDir . '/perftools/php-profiler/src/Saver/PdoSaver.php',
'Xhgui\\Profiler\\Saver\\SaverInterface' => $vendorDir . '/perftools/php-profiler/src/Saver/SaverInterface.php',
'Xhgui\\Profiler\\Saver\\StackSaver' => $vendorDir . '/perftools/php-profiler/src/Saver/StackSaver.php',
'Xhgui\\Profiler\\Saver\\UploadSaver' => $vendorDir . '/perftools/php-profiler/src/Saver/UploadSaver.php',
);
......@@ -6,6 +6,7 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Xhgui\\Profiler\\' => array($vendorDir . '/perftools/php-profiler/src'),
'React\\Promise\\' => array($vendorDir . '/react/promise/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
......
......@@ -17,6 +17,10 @@ class ComposerStaticInited946ede6e68f25941b9b85608fbe09a
);
public static $prefixLengthsPsr4 = array (
'X' =>
array (
'Xhgui\\Profiler\\' => 15,
),
'R' =>
array (
'React\\Promise\\' => 14,
......@@ -60,6 +64,10 @@ class ComposerStaticInited946ede6e68f25941b9b85608fbe09a
);
public static $prefixDirsPsr4 = array (
'Xhgui\\Profiler\\' =>
array (
0 => __DIR__ . '/..' . '/perftools/php-profiler/src',
),
'React\\Promise\\' =>
array (
0 => __DIR__ . '/..' . '/react/promise/src',
......@@ -157,6 +165,7 @@ class ComposerStaticInited946ede6e68f25941b9b85608fbe09a
'Api\\PhpServices\\InfoFlow\\InfoFlow' => __DIR__ . '/..' . '/api/php_services/src/InfoFlow/InfoFlow.php',
'Api\\PhpServices\\JwUser\\JwUser' => __DIR__ . '/..' . '/api/php_services/src/JwUser/JwUser.php',
'Api\\PhpServices\\Ksy\\Ksyun' => __DIR__ . '/..' . '/api/php_services/src/Ksy/Ksyun.php',
'Api\\PhpServices\\LifeAccount\\Account' => __DIR__ . '/..' . '/api/php_services/src/LifeAccount/Account.php',
'Api\\PhpServices\\Login\\Login' => __DIR__ . '/..' . '/api/php_services/src/Login/Login.php',
'Api\\PhpServices\\PushToken\\Android' => __DIR__ . '/..' . '/api/php_services/src/PushToken/Android.php',
'Api\\PhpServices\\PushToken\\Base' => __DIR__ . '/..' . '/api/php_services/src/PushToken/Base.php',
......@@ -174,6 +183,8 @@ class ComposerStaticInited946ede6e68f25941b9b85608fbe09a
'Api\\PhpServices\\Tuffy\\TuffyService' => __DIR__ . '/..' . '/api/php_services/src/Tuffy/TuffyService.php',
'Api\\PhpServices\\UserInfo\\User' => __DIR__ . '/..' . '/api/php_services/src/UserInfo/User.php',
'Api\\PhpServices\\WeMedia\\WeMediaService' => __DIR__ . '/..' . '/api/php_services/src/WeMedia/WeMediaService.php',
'Api\\PhpServices\\XhProfiler\\XhMongo' => __DIR__ . '/..' . '/api/php_services/src/XhProfiler/XhMongo.php',
'Api\\PhpServices\\XhProfiler\\XhProfilerService' => __DIR__ . '/..' . '/api/php_services/src/XhProfiler/XhProfilerService.php',
'Api\\PhpUtils\\Cache\\ApcuUtil' => __DIR__ . '/..' . '/api/php_utils/src/Cache/ApcuUtil.php',
'Api\\PhpUtils\\Cache\\CacheUtil' => __DIR__ . '/..' . '/api/php_utils/src/Cache/CacheUtil.php',
'Api\\PhpUtils\\Common\\BaseConvert' => __DIR__ . '/..' . '/api/php_utils/src/Common/BaseConvert.php',
......@@ -193,6 +204,7 @@ class ComposerStaticInited946ede6e68f25941b9b85608fbe09a
'Api\\PhpUtils\\Kafka\\KafkaProducer' => __DIR__ . '/..' . '/api/php_utils/src/Kafka/KafkaProducer.php',
'Api\\PhpUtils\\Kafka\\KafkaUtil' => __DIR__ . '/..' . '/api/php_utils/src/Kafka/KafkaUtil.php',
'Api\\PhpUtils\\Kafka\\Singleton' => __DIR__ . '/..' . '/api/php_utils/src/Kafka/Singleton.php',
'Api\\PhpUtils\\Ksy\\Ks3Util' => __DIR__ . '/..' . '/api/php_utils/src/Ksy/Ks3Util.php',
'Api\\PhpUtils\\Log\\DaemoLog' => __DIR__ . '/..' . '/api/php_utils/src/Log/DaemoLog.php',
'Api\\PhpUtils\\Log\\FileLog' => __DIR__ . '/..' . '/api/php_utils/src/Log/FileLog.php',
'Api\\PhpUtils\\Message\\Email' => __DIR__ . '/..' . '/api/php_utils/src/Message/Email.php',
......@@ -205,6 +217,7 @@ class ComposerStaticInited946ede6e68f25941b9b85608fbe09a
'Api\\PhpUtils\\Mysql\\MysqlClusterBase' => __DIR__ . '/..' . '/api/php_utils/src/Mysql/MysqlClusterBase.php',
'Api\\PhpUtils\\Mysql\\ReadDB' => __DIR__ . '/..' . '/api/php_utils/src/Mysql/ReadDB.php',
'Api\\PhpUtils\\Mysql\\WriteDB' => __DIR__ . '/..' . '/api/php_utils/src/Mysql/WriteDB.php',
'Api\\PhpUtils\\Protobuf\\WebsiteLog\\WebLog' => __DIR__ . '/..' . '/api/php_utils/src/Protobuf/WebsiteLog/WebLog.php',
'Api\\PhpUtils\\RabbitMq\\DelayRabbitMq' => __DIR__ . '/..' . '/api/php_utils/src/RabbitMq/DelayRabbitMq.php',
'Api\\PhpUtils\\Redis\\Base' => __DIR__ . '/..' . '/api/php_utils/src/Redis/Base.php',
'Api\\PhpUtils\\Redis\\Codis' => __DIR__ . '/..' . '/api/php_utils/src/Redis/Codis.php',
......@@ -219,16 +232,31 @@ class ComposerStaticInited946ede6e68f25941b9b85608fbe09a
'App\\Exception\\ExceptionHandler' => __DIR__ . '/../..' . '/application/exception/ExceptionHandler.php',
'App\\Exception\\custom\\Code' => __DIR__ . '/../..' . '/application/exception/custom/Code.php',
'App\\Exception\\custom\\CodeSpecialException' => __DIR__ . '/../..' . '/application/exception/custom/CodeSpecialException.php',
'App\\Exception\\custom\\GoodsException' => __DIR__ . '/../..' . '/application/exception/custom/GoodsException.php',
'App\\Exception\\custom\\ParamException' => __DIR__ . '/../..' . '/application/exception/custom/ParamException.php',
'App\\Exception\\custom\\ShopException' => __DIR__ . '/../..' . '/application/exception/custom/ShopException.php',
'App\\Exception\\custom\\SignException' => __DIR__ . '/../..' . '/application/exception/custom/SignException.php',
'App\\Exception\\custom\\TestException' => __DIR__ . '/../..' . '/application/exception/custom/TestException.php',
'App\\Models\\demo\\mongo\\Test' => __DIR__ . '/../..' . '/application/models/demo/mongo/Test.php',
'App\\Models\\demo\\mongo\\User' => __DIR__ . '/../..' . '/application/models/demo/mongo/User.php',
'App\\Models\\demo\\mysql\\User' => __DIR__ . '/../..' . '/application/models/demo/mysql/User.php',
'App\\Models\\goods\\mysql\\Category' => __DIR__ . '/../..' . '/application/models/goods/mysql/Category.php',
'App\\Models\\goods\\mysql\\GoodsOperationRecord' => __DIR__ . '/../..' . '/application/models/goods/mysql/GoodsOperationRecord.php',
'App\\Models\\goods\\mysql\\GoodsSku' => __DIR__ . '/../..' . '/application/models/goods/mysql/GoodsSku.php',
'App\\Models\\goods\\mysql\\GoodsSkuStores' => __DIR__ . '/../..' . '/application/models/goods/mysql/GoodsSkuStores.php',
'App\\Models\\goods\\mysql\\GoodsSnapshot' => __DIR__ . '/../..' . '/application/models/goods/mysql/GoodsSnapshot.php',
'App\\Models\\goods\\mysql\\GoodsSpu' => __DIR__ . '/../..' . '/application/models/goods/mysql/GoodsSpu.php',
'App\\Models\\goods\\mysql\\InventoryOperationRecord' => __DIR__ . '/../..' . '/application/models/goods/mysql/InventoryOperationRecord.php',
'App\\Models\\goods\\mysql\\Shop' => __DIR__ . '/../..' . '/application/models/goods/mysql/Shop.php',
'App\\Models\\shop\\mysql\\Shop' => __DIR__ . '/../..' . '/application/models/shop/mysql/Shop.php',
'App\\Models\\shop\\mysql\\SubShop' => __DIR__ . '/../..' . '/application/models/shop/mysql/SubShop.php',
'App\\Plugins\\Hook' => __DIR__ . '/../..' . '/application/plugins/Hook.php',
'App\\Services\\demo\\ElasticService' => __DIR__ . '/../..' . '/application/services/demo/ElasticService.php',
'App\\Services\\demo\\MongoService' => __DIR__ . '/../..' . '/application/services/demo/MongoService.php',
'App\\Services\\demo\\MysqlService' => __DIR__ . '/../..' . '/application/services/demo/MysqlService.php',
'App\\Services\\goods\\CategoryService' => __DIR__ . '/../..' . '/application/services/goods/CategoryService.php',
'App\\Services\\goods\\GoodsService' => __DIR__ . '/../..' . '/application/services/goods/GoodsService.php',
'App\\Services\\shop\\ShopService' => __DIR__ . '/../..' . '/application/services/shop/ShopService.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Daemon\\Test' => __DIR__ . '/../..' . '/daemon/Test.php',
'Elasticsearch\\Client' => __DIR__ . '/..' . '/elasticsearch/elasticsearch/src/Elasticsearch/Client.php',
......@@ -894,6 +922,25 @@ class ComposerStaticInited946ede6e68f25941b9b85608fbe09a
'React\\Promise\\PromisorInterface' => __DIR__ . '/..' . '/react/promise/src/PromisorInterface.php',
'React\\Promise\\RejectedPromise' => __DIR__ . '/..' . '/react/promise/src/RejectedPromise.php',
'React\\Promise\\UnhandledRejectionException' => __DIR__ . '/..' . '/react/promise/src/UnhandledRejectionException.php',
'Xhgui\\Profiler\\Exception\\ProfilerException' => __DIR__ . '/..' . '/perftools/php-profiler/src/Exception/ProfilerException.php',
'Xhgui\\Profiler\\Profiler' => __DIR__ . '/..' . '/perftools/php-profiler/src/Profiler.php',
'Xhgui\\Profiler\\ProfilerFactory' => __DIR__ . '/..' . '/perftools/php-profiler/src/ProfilerFactory.php',
'Xhgui\\Profiler\\Profilers\\AbstractProfiler' => __DIR__ . '/..' . '/perftools/php-profiler/src/Profilers/AbstractProfiler.php',
'Xhgui\\Profiler\\Profilers\\ProfilerInterface' => __DIR__ . '/..' . '/perftools/php-profiler/src/Profilers/ProfilerInterface.php',
'Xhgui\\Profiler\\Profilers\\Tideways' => __DIR__ . '/..' . '/perftools/php-profiler/src/Profilers/Tideways.php',
'Xhgui\\Profiler\\Profilers\\TidewaysXHProf' => __DIR__ . '/..' . '/perftools/php-profiler/src/Profilers/TidewaysXHProf.php',
'Xhgui\\Profiler\\Profilers\\UProfiler' => __DIR__ . '/..' . '/perftools/php-profiler/src/Profilers/UProfiler.php',
'Xhgui\\Profiler\\Profilers\\XHProf' => __DIR__ . '/..' . '/perftools/php-profiler/src/Profilers/XHProf.php',
'Xhgui\\Profiler\\ProfilingData' => __DIR__ . '/..' . '/perftools/php-profiler/src/ProfilingData.php',
'Xhgui\\Profiler\\ProfilingFlags' => __DIR__ . '/..' . '/perftools/php-profiler/src/ProfilingFlags.php',
'Xhgui\\Profiler\\SaverFactory' => __DIR__ . '/..' . '/perftools/php-profiler/src/SaverFactory.php',
'Xhgui\\Profiler\\Saver\\AbstractSaver' => __DIR__ . '/..' . '/perftools/php-profiler/src/Saver/AbstractSaver.php',
'Xhgui\\Profiler\\Saver\\FileSaver' => __DIR__ . '/..' . '/perftools/php-profiler/src/Saver/FileSaver.php',
'Xhgui\\Profiler\\Saver\\MongoSaver' => __DIR__ . '/..' . '/perftools/php-profiler/src/Saver/MongoSaver.php',
'Xhgui\\Profiler\\Saver\\PdoSaver' => __DIR__ . '/..' . '/perftools/php-profiler/src/Saver/PdoSaver.php',
'Xhgui\\Profiler\\Saver\\SaverInterface' => __DIR__ . '/..' . '/perftools/php-profiler/src/Saver/SaverInterface.php',
'Xhgui\\Profiler\\Saver\\StackSaver' => __DIR__ . '/..' . '/perftools/php-profiler/src/Saver/StackSaver.php',
'Xhgui\\Profiler\\Saver\\UploadSaver' => __DIR__ . '/..' . '/perftools/php-profiler/src/Saver/UploadSaver.php',
);
public static function getInitializer(ClassLoader $loader)
......
......@@ -7,13 +7,14 @@
"source": {
"type": "git",
"url": "https://git.yidian-inc.com:8021/api0/php_services.git",
"reference": "1a73d985fc0743343751d4aad8e34cc3bc7f12bc"
"reference": "ba2b0ec550925883c2eed5c041f059d1cf19081c"
},
"require": {
"api/php_utils": "dev-master",
"perftools/php-profiler": "^0.18.0",
"php": ">=7.2"
},
"time": "2021-06-04T02:02:53+00:00",
"time": "2021-06-15T14:05:00+00:00",
"default-branch": true,
"type": "library",
"installation-source": "source",
......@@ -32,7 +33,7 @@
"source": {
"type": "git",
"url": "https://git.yidian-inc.com:8021/api0/php_utils.git",
"reference": "8ea0f5ec5e1c909fa76ec171e8698a4622aaec5a"
"reference": "b4e73dd1535e9eece30e3a4fc5519c0f3d685e26"
},
"require": {
"catfan/medoo": "1.7.10",
......@@ -45,7 +46,7 @@
"mongodb/mongodb": "1.4.3",
"php": ">=7.2"
},
"time": "2021-06-03T09:25:37+00:00",
"time": "2021-06-16T09:52:13+00:00",
"default-branch": true,
"type": "library",
"installation-source": "source",
......@@ -617,6 +618,71 @@
},
"install-path": "../mongodb/mongodb"
},
{
"name": "perftools/php-profiler",
"version": "0.18.0",
"version_normalized": "0.18.0.0",
"source": {
"type": "git",
"url": "https://github.com/perftools/php-profiler.git",
"reference": "794c435f615ab9ca4347e386b4d8c6524fe9e3ae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/perftools/php-profiler/zipball/794c435f615ab9ca4347e386b4d8c6524fe9e3ae",
"reference": "794c435f615ab9ca4347e386b4d8c6524fe9e3ae",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": "^5.3.0 || ^7.0 || ^8.0"
},
"conflict": {
"perftools/xhgui-collector": "<1.8"
},
"require-dev": {
"alcaeus/mongo-php-adapter": "^1.1",
"perftools/xhgui-collector": "^1.8"
},
"suggest": {
"alcaeus/mongo-php-adapter": "Adapter to provide ext-mongo interface on top of mongo-php-library (PHP>=5.6)",
"ext-curl": "cURL extension for upload saver",
"ext-mongo": "mongo extension (PHP>=5.3,<7.0)",
"ext-mongodb": "mongodb extension (PHP>=5.4)",
"ext-tideways": "Use tideways to profile",
"ext-uprofiler": "Use uprofiler to profile",
"ext-xhprof": "Use xhprof to profile",
"perftools/xhgui-collector": "For mongodb or pdo savers"
},
"time": "2021-01-21T17:55:51+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Xhgui\\Profiler\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Lauri Piisang",
"email": "lauri.piisang@eesti.ee"
},
{
"name": "Elan Ruusamäe",
"email": "glen@pld-linux.org"
}
],
"description": "PHP Profiling based on XHGUI",
"support": {
"issues": "https://github.com/perftools/php-profiler/issues",
"source": "https://github.com/perftools/php-profiler/tree/0.18.0"
},
"install-path": "../perftools/php-profiler"
},
{
"name": "psr/http-message",
"version": "dev-master",
......
......@@ -6,7 +6,7 @@
'aliases' =>
array (
),
'reference' => 'edf34efd699a9adb743ae22e7e4d1afe0e44a01a',
'reference' => 'f11a2d63267c34c4aa7f78db52452a05ebbe7ebc',
'name' => 'yidian/yaf_demo',
),
'versions' =>
......@@ -19,7 +19,7 @@
array (
0 => '9999999-dev',
),
'reference' => '1a73d985fc0743343751d4aad8e34cc3bc7f12bc',
'reference' => 'ba2b0ec550925883c2eed5c041f059d1cf19081c',
),
'api/php_utils' =>
array (
......@@ -29,7 +29,7 @@
array (
0 => '9999999-dev',
),
'reference' => '8ea0f5ec5e1c909fa76ec171e8698a4622aaec5a',
'reference' => 'b4e73dd1535e9eece30e3a4fc5519c0f3d685e26',
),
'catfan/medoo' =>
array (
......@@ -106,6 +106,15 @@
),
'reference' => '18fca8cc8d0c2cc07f76605760d20632bb3dab96',
),
'perftools/php-profiler' =>
array (
'pretty_version' => '0.18.0',
'version' => '0.18.0.0',
'aliases' =>
array (
),
'reference' => '794c435f615ab9ca4347e386b4d8c6524fe9e3ae',
),
'psr/http-message' =>
array (
'pretty_version' => 'dev-master',
......@@ -158,7 +167,7 @@
'aliases' =>
array (
),
'reference' => 'edf34efd699a9adb743ae22e7e4d1afe0e44a01a',
'reference' => 'f11a2d63267c34c4aa7f78db52452a05ebbe7ebc',
),
),
);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment