Authored by 姜枫

准备灰度测试

... ... @@ -11,7 +11,9 @@
namespace Api;
use Plugin\Cache;
use WebPlugin\Cache;
use WebPlugin\UdpLog;
class Yohobuy
{
... ... @@ -153,13 +155,20 @@ class Yohobuy
$urlBack = $url;
if (USE_INTER_FACE_SHUNT) {
if (strpos($url, 'api.')) {
if (strpos($url, 'api')) {
$isApi = true;
$url = self::_getUrl($url, $data);
} else if (strpos($url, 'service.')) {
} else if (strpos($url, 'service')) {
$isService = true;
$url = self::_getUrl($url, $data);
}
//$url 返回为空,走原先的url
if (empty($url)) {
$isApi = false;
$isService = false;
$url = $urlBack;
}
}
// 销毁私钥参数
... ... @@ -171,6 +180,8 @@ class Yohobuy
$url = self::httpBuildQuery($url, $data);
} //echo $url;
UdpLog::debug('get shut api', $url);
/* 开启缓存的情况 */
if ($cache && USE_CACHE) {
// 先尝试获取一级缓存(master), 有数据则直接返回.
... ... @@ -265,6 +276,8 @@ class Yohobuy
curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
}
UdpLog::debug('call api: ', $url);
$result = curl_exec($ch);
$httpCode = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if (!$returnJson && !empty($result)) {
... ... @@ -306,13 +319,20 @@ class Yohobuy
$urlBack = $url;
if (USE_INTER_FACE_SHUNT) {
if (strpos($url, 'api.')) {
if (strpos($url, 'api')) {
$isApi = true;
$url = self::_getUrl($url, $data);
} else if (strpos($url, 'service.')) {
} else if (strpos($url, 'service')) {
$isService = true;
$url = self::_getUrl($url, $data);
}
//$url 返回为空,走原先的url
if (empty($url)) {
$isApi = false;
$isService = false;
$url = $urlBack;
}
}
$ch = curl_init($url);
... ... @@ -353,6 +373,9 @@ class Yohobuy
$result = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
UdpLog::debug('post api', array('url' => $url, 'httpCode' => $httpCode));
//如果分流执行失败,则走原来的逻辑
if (USE_INTER_FACE_SHUNT && $httpCode !== 200) {
curl_close($ch);
... ... @@ -399,6 +422,9 @@ class Yohobuy
//curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_POSTFIELDS, $str);
}
UdpLog::debug('post fail api', $url);
$result = curl_exec($ch);
if (!$returnJson && !empty($result)) {
$result = json_decode($result, true);
... ... @@ -678,34 +704,90 @@ class Yohobuy
*/
private static function _getUrl($url, $param)
{
if (USE_INTER_FACE_SHUNT === false) {
return $url;
if (USE_CACHE === false || USE_INTER_FACE_SHUNT === false) {
return false;
}
UdpLog::debug('read memcache');
$interfaceShunt = Cache::getBy('INTERFACE_SHUT_KEY', 'master');
UdpLog::debug('read memcahe: ', $interfaceShunt);
if (empty($interfaceShunt)) {
return false;
}
$uid = 0;
$interfaceShunt = json_decode($interfaceShunt, true);
if (empty($interfaceShunt['cloud'])) {
return false;
}
$uid = isset($param['uid']) ? intval($param['uid']) : 0;
$mod = 0;
$cloud = intval($interfaceShunt['cloud']);
$ips = '';
if (isset($param['uid'])) {
$uid = intval($param['uid']);
$mod = $uid % 1024;
switch ($cloud) {
case 1:
$ips = $interfaceShunt['aws'];
break;
case 2:
$ips = $interfaceShunt['tencent'];
break;
case 3:
if (empty($uid) || empty($interfaceShunt['strategy']) ||
empty($interfaceShunt['strategy']['model']) ||
empty($interfaceShunt['strategy']['tencentMax'])) {
break;
} else {
$ips = $uid % $interfaceShunt['strategy']['model'] > $interfaceShunt['strategy']['tencentMax'] ?
$interfaceShunt['aws'] : $interfaceShunt['tencent'];
}
break;
default:
$ips = '';
break;
}
//未登录情况下
if (empty($uid) && empty($ips) && !empty($interfaceShunt['strategy']) &&
!empty($interfaceShunt['strategy']['notLogin'])) {
$ips = $interfaceShunt[$interfaceShunt['strategy']['notLogin']];
}
if ($mod > 128 || $uid === 0) {
$paseUrl = parse_url($url);
if (strpos($url, 'api.')) {
$url = 'http://' . self::$interfaceShunt['awsServers']['api'] . rtrim($paseUrl['path'], '/') . '/';
} else if (strpos($url, 'service.')) {
$url = 'http://' . self::$interfaceShunt['awsServers']['service'] . rtrim($paseUrl['path'], '/') . '/';
if (empty($ips)) {
return false;
}
$paseUrl = parse_url($url);
if (strpos($url, 'api')) {
if (empty($ips['api.yoho.cn'])) {
return false;
}
} else {
$paseUrl = parse_url($url);
if (strpos($url, 'api.')) {
$num = array_rand(self::$interfaceShunt['tencentServers']['api']);
$url = 'http://' . self::$interfaceShunt['tencentServers']['api'][$num] . rtrim($paseUrl['path'], '/') . '/';
} else if (strpos($url, 'service.')) {
$num = array_rand(self::$interfaceShunt['tencentServers']['service']);
$url = 'http://' . self::$interfaceShunt['tencentServers']['service'][$num] . rtrim($paseUrl['path'], '/') . '/';
$num = array_rand($ips['api.yoho.cn']);
if (empty($ips['api.yoho.cn'][$num]['ip'])) {
return false;
}
$url = 'http://' . $ips['api.yoho.cn'][$num]['ip'] . rtrim($paseUrl['path'], '/') . '/';
} else if (strpos($url, 'service')) {
if (empty($ips['service.yoho.cn'])) {
return false;
}
$num = array_rand($ips['service.yoho.cn']);
if (empty($ips['service.yoho.cn'][$num]['ip'])) {
return false;
}
$url = 'http://' . $ips['service.yoho.cn'][$num]['ip'] . rtrim($paseUrl['path'], '/') . '/';
}
return $url;
... ...
<?php
namespace Plugin;
use Hood\Cache as HoodCache;
/**
* 数据缓存的操作类
*
* @name Cache
* @package Plugin
* @copyright yoho.inc
* @version 1.0 (2015-10-10 11:23:47)
* @author fei.hong <fei.hong@yoho.cn>
*/
class Cache
{
/**
* 设置缓存
*
* 备注:
* 采用主从分布式缓存
* master 代表主缓存服务器
* slave 代表从缓存服务器
*
* 作用:
* 在后端的服务异常挂掉了并且主服务器缓存(master)的数据时间到期后,
* 能获取从服务器缓存(slave)的数据,不影响前端页面的正常访问.
*
* @param string $key 键名
* @param mixed $value 需要缓存的数据
* @param int $expire 缓存有效期(单位秒, 0表示永久)
* @return void
*/
public static function set($key, $value, $expire = 300)
{
try {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
HoodCache::Memcache('master')->set(self::makeKey($key, 'master'), $value, $expire);
HoodCache::Memcache('slave')->set(self::makeKey($key, 'slave'), $value, 86400); // 二级缓存1天
}
// LINUX
else {
HoodCache::Memcached('master')->set(self::makeKey($key, 'master'), $value, $expire);
HoodCache::Memcached('slave')->set(self::makeKey($key, 'slave'), $value, 86400); // 二级缓存1天
}
} catch (Exception $e) {
// do nothing
}
}
/**
* 获取缓存
*
* @param string $key 键名
* @param string $node master代表主服务器, slave代表从服务器
* @return mixed
*/
public static function get($key, $node = 'master')
{
$result = array();
try {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
$result = HoodCache::Memcache($node)->get(self::makeKey($key, $node));
}
// LINUX
else {
$result = HoodCache::Memcached($node)->get(self::makeKey($key, $node));
}
// 当接口异常,一级缓存没取到数据的情况
if ($node === 'slave') {
$incrementKey = self::makeKey('_increment_' . $key, 'slave');
$incrementValue = HoodCache::Memcached('slave')->get($incrementKey);
// 接口调用失败累计5次之后,回填二级缓存数据到一级缓存, 重置计数值为0
if (is_int($incrementValue) && $incrementValue > 5) {
HoodCache::Memcached('master')->set(self::makeKey($key, 'master'), $result, 300);
HoodCache::Memcached('slave')->set($incrementKey, 0, 3600);
}
// 接口调用失败次数累加
else {
HoodCache::Memcached('slave')->increment($incrementKey, 1, 0, 3600);
}
}
} catch (Exception $e) {
$result = array();
}
return $result;
}
/**
* 清除缓存
*
* @param string $key 键名
* @return void
*/
public static function delete($key)
{
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
HoodCache::Memcache('master')->delete(self::makeKey($key, 'master'));
HoodCache::Memcache('slave')->delete(self::makeKey($key, 'slave'));
}
// LINUX
else {
HoodCache::Memcached('master')->delete(self::makeKey($key, 'master'));
HoodCache::Memcached('slave')->delete(self::makeKey($key, 'slave'));
}
}
/**
* 累加
*
* @param string $key
* @param int $offset
* @param int $initialValue
* @param int $expiry
* @return boolean
*/
public static function increment($key, $offset = 1, $initialValue = 0, $expiry = 0)
{
return HoodCache::Memcached('master')->increment(self::makeKey($key, 'master'), $offset, $initialValue, $expiry);
}
/**
* 递减
*
* @param string $key
* @param int $offset
* @return boolean
*/
public static function decrement($key, $offset = 1)
{
return HoodCache::Memcached('master')->decrement(self::makeKey($key, 'master'), $offset);
}
/**
* 生成键名
*
* @param string $key 键名
* @param string $prefix 前缀标识
* @return string
*/
public static function makeKey($key, $prefix)
{
return md5($prefix . '_' . $key);
}
}
<?php
namespace Plugin;
use Hood\Cache as HoodCache;
/**
* 数据缓存的操作类
*
* @name Cache
* @package Plugin
* @copyright yoho.inc
* @version 1.0 (2015-10-10 11:23:47)
* @author fei.hong <fei.hong@yoho.cn>
*/
class Cache
{
/**
* 设置缓存
*
* 备注:
* 采用主从分布式缓存
* master 代表主缓存服务器
* slave 代表从缓存服务器
*
* 作用:
* 在后端的服务异常挂掉了并且主服务器缓存(master)的数据时间到期后,
* 能获取从服务器缓存(slave)的数据,不影响前端页面的正常访问.
*
* @param string $key 键名
* @param mixed $value 需要缓存的数据
* @param int $expire 缓存有效期(单位秒, 0表示永久)
* @return void
*/
public static function set($key, $value, $expire = 300)
{
try {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
HoodCache::Memcache('master')->set(self::makeKey($key, 'master'), $value, $expire);
HoodCache::Memcache('slave')->set(self::makeKey($key, 'slave'), $value, 86400); // 二级缓存1天
}
// LINUX
else {
HoodCache::Memcached('master')->set(self::makeKey($key, 'master'), $value, $expire);
HoodCache::Memcached('slave')->set(self::makeKey($key, 'slave'), $value, 86400); // 二级缓存1天
}
} catch (Exception $e) {
// do nothing
}
}
/**
* 获取缓存
*
* @param string $key 键名
* @param string $node master代表主服务器, slave代表从服务器
* @return mixed
*/
public static function get($key, $node = 'master')
{
$result = array();
try {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
$result = HoodCache::Memcache($node)->get(self::makeKey($key, $node));
}
// LINUX
else {
$result = HoodCache::Memcached($node)->get(self::makeKey($key, $node));
}
// 当接口异常,一级缓存没取到数据的情况
if ($node === 'slave') {
$incrementKey = self::makeKey('_increment_' . $key, 'slave');
$incrementValue = HoodCache::Memcached('slave')->get($incrementKey);
// 接口调用失败累计5次之后,回填二级缓存数据到一级缓存, 重置计数值为0
if (is_int($incrementValue) && $incrementValue > 5) {
HoodCache::Memcached('master')->set(self::makeKey($key, 'master'), $result, 300);
HoodCache::Memcached('slave')->set($incrementKey, 0, 3600);
}
// 接口调用失败次数累加
else {
HoodCache::Memcached('slave')->increment($incrementKey, 1, 0, 3600);
}
}
} catch (Exception $e) {
$result = array();
}
return $result;
}
/**
* 直接查询缓存,不对key做任何处理
*/
public static function getBy($key, $node = 'master')
{
$result = array();
try {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
$result = HoodCache::Memcache($node)->getBy($key);
}
// LINUX
else {
$result = HoodCache::Memcached($node)->getBy($key);
}
} catch (Exception $e) {
$result = array();
}
return $result;
}
/**
* 清除缓存
*
* @param string $key 键名
* @return void
*/
public static function delete($key)
{
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
HoodCache::Memcache('master')->delete(self::makeKey($key, 'master'));
HoodCache::Memcache('slave')->delete(self::makeKey($key, 'slave'));
}
// LINUX
else {
HoodCache::Memcached('master')->delete(self::makeKey($key, 'master'));
HoodCache::Memcached('slave')->delete(self::makeKey($key, 'slave'));
}
}
/**
* 累加
*
* @param string $key
* @param int $offset
* @param int $initialValue
* @param int $expiry
* @return boolean
*/
public static function increment($key, $offset = 1, $initialValue = 0, $expiry = 0)
{
return HoodCache::Memcached('master')->increment(self::makeKey($key, 'master'), $offset, $initialValue, $expiry);
}
/**
* 递减
*
* @param string $key
* @param int $offset
* @return boolean
*/
public static function decrement($key, $offset = 1)
{
return HoodCache::Memcached('master')->decrement(self::makeKey($key, 'master'), $offset);
}
/**
* 生成键名
*
* @param string $key 键名
* @param string $prefix 前缀标识
* @return string
*/
public static function makeKey($key, $prefix)
{
return md5($prefix . '_' . $key);
}
}
... ...
<?php
namespace WebPlugin;
use Hood\Cache as HoodCache;
/**
* 数据缓存的操作类
*
* @name Cache
* @package Plugin
* @copyright yoho.inc
* @version 1.0 (2015-10-10 11:23:47)
* @author fei.hong <fei.hong@yoho.cn>
*/
class Cache
{
/**
* 设置缓存
*
* 备注:
* 采用主从分布式缓存
* master 代表主缓存服务器
* slave 代表从缓存服务器
*
* 作用:
* 在后端的服务异常挂掉了并且主服务器缓存(master)的数据时间到期后,
* 能获取从服务器缓存(slave)的数据,不影响前端页面的正常访问.
*
* @param string $key 键名
* @param mixed $value 需要缓存的数据
* @param int $expire 缓存有效期(单位秒, 0表示永久)
* @return void
*/
public static function set($key, $value, $expire = 300)
{
if (USE_CACHE) {
try {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
HoodCache::Memcache('master')->set(self::makeKey($key, 'master'), $value, $expire);
HoodCache::Memcache('slave')->set(self::makeKey($key, 'slave'), $value, 86400); // 二级缓存1天
}
// LINUX
else {
HoodCache::Memcached('master')->set(self::makeKey($key, 'master'), $value, $expire);
HoodCache::Memcached('slave')->set(self::makeKey($key, 'slave'), $value, 86400); // 二级缓存1天
}
} catch (Exception $e) {
// do nothing
}
}
}
/**
* 获取缓存
*
* @param string $key 键名
* @param string $node master代表主服务器, slave代表从服务器
* @return mixed
*/
public static function get($key, $node = 'master')
{
$result = array();
if (USE_CACHE) {
try {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
$result = HoodCache::Memcache($node)->get(self::makeKey($key, $node));
}
// LINUX
else {
$result = HoodCache::Memcached($node)->get(self::makeKey($key, $node));
}
} catch (Exception $e) {
$result = array();
}
}
return $result;
}
/**
* 清除缓存
*
* @param string $key 键名
* @return void
*/
public static function delete($key)
{
if (USE_CACHE) {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
HoodCache::Memcache('master')->delete(self::makeKey($key, 'master'));
HoodCache::Memcache('slave')->delete(self::makeKey($key, 'slave'));
}
// LINUX
else {
HoodCache::Memcached('master')->delete(self::makeKey($key, 'master'));
HoodCache::Memcached('slave')->delete(self::makeKey($key, 'slave'));
}
}
}
/**
* 生成键名
*
* @param string $key 键名
* @param string $prefix 前缀标识
* @return string
*/
public static function makeKey($key, $prefix)
{
return md5($prefix . '_' . $key);
}
/**
* 累加
*
* @param string $key
* @param int $offset
* @param int $initialValue
* @param int $expiry
* @return boolean
*/
public static function increment($key, $offset = 1, $initialValue = 0, $expiry = 0)
{
return HoodCache::Memcached('master')->increment(self::makeKey($key, 'master'), $offset, $initialValue, $expiry);
}
/**
* 递减
*
* @param string $key
* @param int $offset
* @return boolean
*/
public static function decrement($key, $offset = 1)
{
return HoodCache::Memcached('master')->decrement(self::makeKey($key, 'master'), $offset);
}
}
<?php
namespace WebPlugin;
use Hood\Cache as HoodCache;
/**
* 数据缓存的操作类
*
* @name Cache
* @package Plugin
* @copyright yoho.inc
* @version 1.0 (2015-10-10 11:23:47)
* @author fei.hong <fei.hong@yoho.cn>
*/
class Cache
{
/**
* 设置缓存
*
* 备注:
* 采用主从分布式缓存
* master 代表主缓存服务器
* slave 代表从缓存服务器
*
* 作用:
* 在后端的服务异常挂掉了并且主服务器缓存(master)的数据时间到期后,
* 能获取从服务器缓存(slave)的数据,不影响前端页面的正常访问.
*
* @param string $key 键名
* @param mixed $value 需要缓存的数据
* @param int $expire 缓存有效期(单位秒, 0表示永久)
* @return void
*/
public static function set($key, $value, $expire = 300)
{
if (USE_CACHE) {
try {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
HoodCache::Memcache('master')->set(self::makeKey($key, 'master'), $value, $expire);
HoodCache::Memcache('slave')->set(self::makeKey($key, 'slave'), $value, 86400); // 二级缓存1天
}
// LINUX
else {
HoodCache::Memcached('master')->set(self::makeKey($key, 'master'), $value, $expire);
HoodCache::Memcached('slave')->set(self::makeKey($key, 'slave'), $value, 86400); // 二级缓存1天
}
} catch (Exception $e) {
// do nothing
}
}
}
/**
* 获取缓存
*
* @param string $key 键名
* @param string $node master代表主服务器, slave代表从服务器
* @return mixed
*/
public static function get($key, $node = 'master')
{
$result = array();
if (USE_CACHE) {
try {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
$result = HoodCache::Memcache($node)->get(self::makeKey($key, $node));
}
// LINUX
else {
$result = HoodCache::Memcached($node)->get(self::makeKey($key, $node));
}
} catch (Exception $e) {
$result = array();
}
}
return $result;
}
/**
* 直接查询缓存,不对key做任何处理
*/
public static function getBy($key, $node = 'master')
{
$result = array();
try {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
$result = HoodCache::Memcache($node)->getBy($key);
}
// LINUX
else {
$result = HoodCache::Memcached($node)->getBy($key);
}
} catch (Exception $e) {
$result = array();
}
return $result;
}
/**
* 清除缓存
*
* @param string $key 键名
* @return void
*/
public static function delete($key)
{
if (USE_CACHE) {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
HoodCache::Memcache('master')->delete(self::makeKey($key, 'master'));
HoodCache::Memcache('slave')->delete(self::makeKey($key, 'slave'));
}
// LINUX
else {
HoodCache::Memcached('master')->delete(self::makeKey($key, 'master'));
HoodCache::Memcached('slave')->delete(self::makeKey($key, 'slave'));
}
}
}
/**
* 生成键名
*
* @param string $key 键名
* @param string $prefix 前缀标识
* @return string
*/
public static function makeKey($key, $prefix)
{
return md5($prefix . '_' . $key);
}
/**
* 累加
*
* @param string $key
* @param int $offset
* @param int $initialValue
* @param int $expiry
* @return boolean
*/
public static function increment($key, $offset = 1, $initialValue = 0, $expiry = 0)
{
return HoodCache::Memcached('master')->increment(self::makeKey($key, 'master'), $offset, $initialValue, $expiry);
}
/**
* 递减
*
* @param string $key
* @param int $offset
* @return boolean
*/
public static function decrement($key, $offset = 1)
{
return HoodCache::Memcached('master')->decrement(self::makeKey($key, 'master'), $offset);
}
}
... ...
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Thu Jul 14 10:27:46 2016
By admin
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
panose-1="2 0 6 3 0 0 0 0 0 0"
ascent="896"
descent="-128"
x-height="792"
bbox="-0.75 -212 1160 896.75"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E63E"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
<glyph glyph-name=".notdef" horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
<glyph glyph-name=".null" horiz-adv-x="0"
/>
<glyph glyph-name="nonmarkingreturn" horiz-adv-x="341"
/>
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
<glyph glyph-name="uniE600" unicode="&#xe600;"
d="M286 509l-46 -45l272 -272l272 272l-46 45l-226 -226z" />
<glyph glyph-name="uniE601" unicode="&#xe601;"
d="M387 158l45 -46l272 272l-272 272l-45 -46l226 -226z" />
<glyph glyph-name="uniE602" unicode="&#xe602;"
d="M766 193l-196 192l196 192l-61 60l-196 -193l-196 193l-60 -60l196 -192l-196 -192l60 -59l196 192l196 -192z" />
<glyph glyph-name="uniE603" unicode="&#xe603;"
d="M951 77h-878l439 614z" />
<glyph glyph-name="uniE604" unicode="&#xe604;"
d="M512 77l-439 614h878z" />
<glyph glyph-name="uniE605" unicode="&#xe605;"
d="M819 823v-878l-614 439z" />
<glyph glyph-name="uniE606" unicode="&#xe606;"
d="M205 -55v878l614 -439z" />
<glyph glyph-name="uniE607" unicode="&#xe607;"
d="M786 789l-415 -405l415 -404q19 -18 19 -44t-19 -44.5t-46 -18.5t-46 18l-461 449q-19 18 -19 44.5t19 44.5l461 449q19 18 46 18t46 -18.5t19 -44.5t-19 -44zM786 789z" />
<glyph glyph-name="uniE608" unicode="&#xe608;"
d="M233 789q-19 18 -19 44t19 44.5t46 18.5t46 -18l461 -449q19 -18 19 -44.5t-19 -44.5l-461 -449q-19 -18 -46 -18t-46 18.5t-19 44.5t19 44l416 404zM233 789z" />
<glyph glyph-name="uniE609" unicode="&#xe609;"
d="M577 -118q-17 0 -30 11q-16 12 -18 31.5t11 35.5l357 443l-350 404q-13 15 -11.5 34.5t16.5 32.5t34.5 11.5t32.5 -16.5l376 -433q12 -13 12 -30.5t-11 -30.5l-382 -475q-14 -18 -37 -18z" />
<glyph glyph-name="uniE60A" unicode="&#xe60a;"
d="M447 -118q-23 0 -37 18l-382 475q-11 13 -11 30.5t12 30.5l376 433q13 15 32.5 16.5t34.5 -11.5t16.5 -32.5t-11.5 -34.5l-350 -404l357 -443q13 -16 11 -35.5t-18 -31.5q-13 -11 -30 -11z" />
<glyph glyph-name="uniE60B" unicode="&#xe60b;"
d="M284 15q-14 -14 -14 -33t13.5 -32.5t32.5 -13.5t32 14l397 401q13 14 13 33t-13 33l-397 401q-13 14 -32 14t-32.5 -13.5t-13.5 -32.5t13 -33l351 -369l-350 -369v0zM284 15z" />
<glyph glyph-name="uniE60C" unicode="&#xe60c;"
d="M745 753q13 14 13 33t-13.5 32.5t-32.5 13.5t-32 -14l-396 -401q-14 -14 -14 -33t14 -33l396 -401q14 -14 32.5 -14t32 13.5t13.5 32.5t-13 33l-351 369l351 369v0zM745 753z" />
<glyph glyph-name="uniE60D" unicode="&#xe60d;"
d="M512.5 750q-12.5 0 -21.5 -9t-9 -22v-311h-249q-12 0 -21.5 -9t-9.5 -22t9.5 -22t21.5 -9h280q12 0 21.5 9t9.5 22v342q0 13 -9.5 22t-22 9zM513 874q-101 0 -193 -39.5t-158.5 -105.5t-106 -158t-39.5 -193t39.5 -193t106 -158.5t158.5 -105.5t193 -39t192.5 39
t158 105.5t106 158.5t39.5 193t-39.5 193t-106 158t-158 105.5t-192.5 39.5zM513 -56q-118 0 -218 58t-158.5 158t-58.5 218t58.5 218t158.5 158t218 58t218 -58t158 -158t58 -218t-58 -218t-158 -158t-218 -58z" />
<glyph glyph-name="uniE60E" unicode="&#xe60e;"
d="M710 384l-473 474l38 38l512 -512l-512 -512l-38 38z" />
<glyph glyph-name="uniE60F" unicode="&#xe60f;"
d="M314 384l473 -474l-38 -38l-512 512l512 512l38 -38z" />
<glyph glyph-name="uniE610" unicode="&#xe610;"
d="M797 219.5q0 -7.5 -5 -13.5l-29 -28q-6 -6 -13.5 -6t-12.5 6l-225 224l-224 -224q-6 -6 -13.5 -6t-13.5 6l-28 28q-6 6 -6 13.5t6 13.5l266 266q6 6 13.5 6t12.5 -6l267 -266q5 -6 5 -13.5z" />
<glyph glyph-name="uniE611" unicode="&#xe611;"
d="M892 125l-236 236q54 77 54 172q0 124 -87 211t-210.5 87t-211 -87t-87.5 -211t87.5 -211t210.5 -87q95 0 173 55l236 -236q16 -17 38 -18t37 14t14 37t-18 38zM213 533q0 82 58.5 140.5t140.5 58.5t140.5 -58.5t58.5 -140.5t-58.5 -140.5t-140.5 -58.5t-140.5 58.5
t-58.5 140.5z" />
<glyph glyph-name="uniE612" unicode="&#xe612;"
d="M939 -128h-854q-35 0 -60 25t-25 60v854q0 35 25 60t60 25h854q35 0 60 -25t25 -60v-854q0 -35 -25 -60t-60 -25zM939 789q0 10 -6 16t-16 6h-810q-10 0 -16 -6t-6 -16v-810q0 -10 6 -16t16 -6h810q10 0 16 6t6 16v810zM457 183q-10 -12 -30.5 -12t-29.5 12l-171 171
q-13 10 -13 30q0 18 12.5 30.5t30.5 12.5q20 0 30 -13l141 -141l311 312q13 12 30 12q18 0 30.5 -12.5t12.5 -29.5q0 -21 -13 -30z" />
<glyph glyph-name="uniE613" unicode="&#xe613;"
d="M877 896h-730q-61 0 -104 -43t-43 -104v-730q0 -61 43 -104t104 -43h730q61 0 104 43t43 104v730q0 61 -43 104t-104 43zM939 19q0 -26 -18 -44t-44 -18h-730q-26 0 -44 18t-18 44v730q0 26 18 44t44 18h730q26 0 44 -18t18 -44v-730z" />
<glyph glyph-name="uniE614" unicode="&#xe614;"
d="M160 996zM865 247q0 -18 -13 -31l-308 -308q-13 -13 -31 -13t-31 13l-309 308q-13 13 -13 31t13.5 31t30.5 13h617q18 0 31 -13t13 -31zM865 511q0 -18 -13 -31t-31 -13h-617q-18 0 -31 13t-13 31t13 31l309 309q13 13 31 13t31 -13l308 -309q13 -13 13 -31z" />
<glyph glyph-name="uniE615" unicode="&#xe615;"
d="M704 665l-41 39l-343 -320l343 -320l41 39l-301 281z" />
<glyph glyph-name="uniE616" unicode="&#xe616;" horiz-adv-x="1173"
d="M569 607q-28 66 -74 108.5t-95 56.5t-100 2.5t-91.5 -45t-66 -94t-26.5 -137.5q0 -36 8.5 -67.5t26 -58t35.5 -47t46.5 -41t49 -34t52.5 -32.5t48 -30q71 -47 124.5 -106.5t63.5 -93.5q7 31 62.5 92t124.5 110q19 14 55.5 36.5t61 38.5t55 42.5t49 52t31.5 62.5t13 79
q0 76 -26.5 136t-67 92t-92 42.5t-101 -4t-94.5 -56t-72 -104.5z" />
<glyph glyph-name="uniE617" unicode="&#xe617;"
d="M500 775l-348 -298q-16 -14 -16 -35v-386q0 -25 17.5 -42.5t42.5 -17.5h197v257h238v-257h197q25 0 42.5 17.5t17.5 42.5v386q0 21 -16 35l-348 298q-12 10 -24 0z" />
<glyph glyph-name="uniE618" unicode="&#xe618;" horiz-adv-x="1000"
d="M751 766q21 -20 34 -33t19.5 -22.5t8.5 -16t2 -10.5v-13h-119q-8 0 -14 6t-10 14t-6 16.5t-2 12.5v100h3q6 0 13 -2t15.5 -8t22 -16t33.5 -28zM614 720q0 -16 5 -33.5t15 -32t26 -24t38 -9.5h117v-451q0 -24 -9.5 -42t-24.5 -31t-33.5 -20t-35.5 -7h-394q-15 0 -33 8.5
t-33.5 23t-26 33t-10.5 38.5v543q0 17 7.5 35t21 33.5t30 25.5t35.5 10h305v-100zM664 221q21 0 35.5 14.5t14.5 35.5t-14.5 35.5t-35.5 14.5h-299q-21 0 -35.5 -14.5t-14.5 -35.5t14.5 -35.5t35.5 -14.5h299zM714 470q0 21 -14.5 36t-35.5 15h-299q-21 0 -35.5 -15
t-14.5 -36t14.5 -35t35.5 -14h299q21 0 35.5 14t14.5 35zM714 470z" />
<glyph glyph-name="uniE619" unicode="&#xe619;"
d="M512 599q47 0 88 -18t72 -49t49 -72t18 -89q0 -46 -18 -87t-49 -72t-72 -49t-88 -18t-88 18t-72 49t-49 72t-18 87q0 48 18 89t49 72t72 49t88 18v0zM512 599z" />
<glyph glyph-name="uniE61A" unicode="&#xe61a;"
d="M903 577l-68 69l-388 -388l-231 230l-68 -68l299 -298l65 65z" />
<glyph glyph-name="uniE61B" unicode="&#xe61b;"
d="M505 337l2 -2q2 -1 3.5 -1t3.5 1l430 364q2 2 1 5.5t-5 3.5h-435h-424q-4 0 -5 -3.5t1 -5.5zM72 669q-3 2 -6 0.5t-3 -4.5v-584q0 -4 3.5 -5t5.5 1l288 346zM953 669.5q-3 1.5 -5 -0.5l-288 -246l287 -346q3 -2 6 -1t3 5v584q0 3 -3 4.5zM641 406l-131 -111l-5 5
l-125 103l-275 -328q-2 -3 -1 -6t5 -3h396h407q4 0 5 3t-1 6z" />
<glyph glyph-name="uniE61C" unicode="&#xe61c;"
d="M982 137l-4 6l-10 12q-12 13 -42 38q-43 36 -79 59l-48 31l-21 11q-17 8 -36 1q-16 -5 -23 -18l-17 -25q-4 -6 -8 -13l-12 -24q-9 -18 -15 -28q-7 -14 -21 -24t-32 -13.5t-36 7.5q-102 57 -171 123q-101 95 -135 172q-8 13 -1.5 37t26.5 34q13 7 34.5 15.5t31.5 14.5
q7 4 14.5 8.5t18.5 11.5l4 3l4 3l3 3q19 18 9 43l-3 8q-14 32 -36 69q-17 30 -41 62q-16 21 -32.5 36t-25.5 20l-9 5q-9 5 -13 7q-23 10 -50 -1q-15 -6 -30.5 -15.5t-22 -14.5t-26.5 -21q-44 -37 -69.5 -82.5t-19.5 -86.5q10 -72 88 -198.5t182.5 -225.5t237.5 -173t209 -84
q79 -10 169 73q38 36 56 73q6 14 7.5 30t-5.5 31zM982 137z" />
<glyph glyph-name="uniE61D" unicode="&#xe61d;"
d="M888 620q12 12 28.5 12t28.5 -12t12 -28.5t-12 -28.5l-406 -405q-12 -12 -28.5 -12t-27.5 12q-12 11 -12 27.5t12 28.5zM539 214q11 -12 11 -28.5t-11 -27.5q-12 -12 -28.5 -12t-28.5 12l-406 405q-11 12 -11 28.5t11 28.5q12 12 28.5 12t28.5 -12zM539 214z" />
<glyph glyph-name="uniE61E" unicode="&#xe61e;"
d="M127 769v-770h770v770h-770zM555 170h-86v86h86v-86zM555 298h-86v257h86v-257z" />
<glyph glyph-name="uniE61F" unicode="&#xe61f;"
d="M511.5 831q-90.5 0 -173.5 -35.5t-143 -95t-95 -142.5t-35 -174t35 -173.5t95 -142.5t143 -95.5t173.5 -35.5t173.5 35.5t143 95.5t95 142.5t35.5 173.5t-35 174t-95.5 142.5t-143 95t-173.5 35.5zM452 184h-1v0l-38 38l-179 180l38 37l179 -179l318 318l38 -38zM512 -63
q-91 0 -175 35q-80 34 -142 96t-96 142q-35 83 -35 174t35 174q34 81 96 142.5t142 95.5q84 36 175 36t174 -36q80 -34 142 -95.5t96 -142.5q35 -83 35 -174t-35 -174q-34 -80 -96 -142t-142 -96q-83 -35 -174 -35zM511.5 831q-90.5 0 -173 -35.5t-142.5 -95.5t-95.5 -142.5
t-35.5 -173.5t35.5 -173.5t95.5 -142.5t142.5 -95t173 -35t173.5 35t142.5 95t95 142.5t35.5 173.5t-35.5 173.5t-95 142.5t-142.5 95.5t-173.5 35.5zM451 183l-38 39l-180 180l39 38l179 -180l318 318l39 -38zM414 222l37 -37l355 355l-37 37l-318 -318l-179 180l-38 -37z
" />
<glyph glyph-name="uniE620" unicode="&#xe620;"
d="M958 758q0 30 -21 51.5t-51 21.5h-749q-30 0 -51 -21.5t-21 -51.5v-748q0 -30 21 -51t51 -21h749q30 0 51 21t21 51v748zM778 454l-267 -267q-14 -14 -34 -14t-34 14l-168 168q-14 14 -14 34t14 34.5t34 14.5t34 -15l134 -133l233 232q14 14 34 14t34 -14t14 -34t-14 -34
z" />
<glyph glyph-name="uniE621" unicode="&#xe621;"
d="M384 640v-513l321 257z" />
<glyph glyph-name="uniE622" unicode="&#xe622;" horiz-adv-x="1000"
d="M662 662v-499l-299 250zM662 662z" />
<glyph glyph-name="uniE623" unicode="&#xe623;" horiz-adv-x="1000"
d="M744 598h-488q-38 0 -64.5 -26.5t-26.5 -64.5v-290q0 -38 26.5 -64.5t64.5 -26.5h227l200 -138v138h61q38 0 64.5 26.5t26.5 64.5v290q0 38 -26.5 64.5t-64.5 26.5zM744 358z" />
<glyph glyph-name="uniE624" unicode="&#xe624;" horiz-adv-x="1025"
d="M1024 480v338q0 32 -23 55t-55 23h-331h-14q-55 0 -76 -21l-506 -506q-19 -19 -19 -46t19 -45l387 -387q18 -19 45 -19t46 19l506 506q10 10 15 25.5t5.5 26.5t0.5 31zM764 549q-36 0 -61.5 25.5t-25.5 61.5t25.5 61t61.5 25t61 -25t25 -61t-25 -61.5t-61 -25.5z" />
<glyph glyph-name="uniE625" unicode="&#xe625;"
d="M511 832q-91 0 -173.5 -35.5t-142 -95t-95 -142t-35.5 -173.5t35.5 -173.5t95 -142t142 -95t173.5 -35.5t173.5 35.5t142.5 95t95 142t35 173.5t-35 173.5t-95 142t-142.5 95t-173.5 35.5zM734 337h-237q-7 0 -14 3q-22 9 -22 33v237q0 15 10.5 26t26 11t26 -11t10.5 -26
v-200h200q15 0 26 -10.5t11 -26t-11 -26t-26 -10.5zM734 337z" />
<glyph glyph-name="uniE626" unicode="&#xe626;" horiz-adv-x="1025"
d="M994 163q-18 9 -16 30.5t27 46.5q24 27 17.5 54.5t-33.5 40.5q-17 8 -24.5 17.5t-2 20t26.5 19.5q30 11 29.5 55.5t-31.5 80.5q-34 39 -278 23l-23 -1q3 2 3 145q0 101 -28 139t-84 36q-18 0 -28.5 -5t-17 -13t-11 -26.5t-7.5 -38t-10 -56.5t-16 -74q-12 -47 -38 -94
t-54 -80t-55 -59t-44 -39l-18 -13v-386q10 -14 27 -25.5t31 -17t31 -11.5t21 -8q9 -4 65 -10.5t105.5 -11t51.5 -4.5q4 0 11 0.5t30 2.5t45 4.5t52 6.5t56.5 8t53.5 9.5t47 11t33.5 13t15.5 14.5q8 24 3 39t-2 27t23 20q27 10 34.5 34.5t0.5 46t-19 28.5zM0 379v-380
q0 -28 20 -48.5t49 -20.5h137v518h-137q-29 0 -49 -20.5t-20 -48.5zM0 379z" />
<glyph glyph-name="uniE627" unicode="&#xe627;" horiz-adv-x="1025"
d="M512 719q-167 0 -304.5 -89.5t-205.5 -236.5q-4 -9 0 -18q68 -147 205.5 -236.5t304.5 -89.5t304.5 89.5t205.5 236.5q4 9 0 18q-68 147 -205.5 236.5t-304.5 89.5zM512 153q-96 0 -163.5 67.5t-67.5 163.5t67.5 163.5t163.5 67.5t163.5 -67.5t67.5 -163.5t-67.5 -163.5
t-163.5 -67.5zM512 384zM364 384q0 61 43.5 104.5t104.5 43.5t104.5 -43.5t43.5 -104.5t-43.5 -104.5t-104.5 -43.5t-104.5 43.5t-43.5 104.5z" />
<glyph glyph-name="uniE628" unicode="&#xe628;"
d="M482.5 167q-24.5 0 -42 -17.5t-17.5 -42.5t17.5 -42.5t42 -17.5t42 17.5t17.5 42.5t-17.5 42.5t-42 17.5zM769 167q-25 0 -42.5 -17.5t-17.5 -42.5t17.5 -42.5t42.5 -17.5t42.5 17.5t17.5 42.5t-17.5 42.5t-42.5 17.5zM839 277h-417l-143 425q-7 18 -29 18h-127
q-13 0 -22 -8t-9 -20.5t9 -20.5t22 -8h105l143 -424q7 -19 29 -19h439q13 0 21.5 8t8.5 20.5t-8.5 20.5t-21.5 8zM904 608l-516 45q-12 1 -18.5 -7t-1.5 -20l90 -270q4 -12 16 -21.5t24 -9.5h377q12 0 22 10t11 23l23 216q2 12 -6 22t-21 12z" />
<glyph glyph-name="uniE629" unicode="&#xe629;"
d="M154 770v-646h146l-14 -208l240 208h344v646h-716zM752 260h-134v159h-192v-159h-134v382h134v-148h192v148h134v-382z" />
<glyph glyph-name="uniE62A" unicode="&#xe62a;"
d="M328 18q-6 0 -11 3q-14 6 -14 22v128h-193q-10 0 -17.5 7t-7.5 18v549q0 10 7.5 17.5t17.5 7.5h804q11 0 18 -7.5t7 -17.5v-549q0 -11 -7 -18t-18 -7h-401l-169 -146q-7 -7 -16 -7zM171 256h188q10 0 17.5 -7.5t7.5 -17.5v-73l103 92q7 6 17 6h350v426h-683v-426z
M739 569h-454q-10 0 -17.5 7t-7.5 17.5t7.5 18t17.5 7.5h454q10 0 17.5 -7.5t7.5 -18t-7 -17.5t-18 -7zM739 446h-454q-10 0 -17.5 7t-7.5 17.5t7.5 18t17.5 7.5h454q10 0 17.5 -7.5t7.5 -18t-7 -17.5t-18 -7zM549 323h-264q-10 0 -17.5 7t-7.5 17.5t7.5 18t17.5 7.5h264
q10 0 17.5 -7.5t7.5 -17.5t-7.5 -17.5t-17.5 -7.5z" />
<glyph glyph-name="uniE62B" unicode="&#xe62b;"
d="M510.5 -60q-90.5 0 -173 35.5t-142.5 95.5t-95.5 142.5t-35.5 173t35.5 173t95.5 142.5t142.5 95.5t173 35.5t173.5 -35.5t142.5 -95.5t95 -142.5t35.5 -173t-35.5 -173t-95 -142.5t-142.5 -95.5t-173.5 -35.5zM510.5 787q-108.5 0 -200.5 -53.5t-146 -146t-54 -201
t54 -201t146 -146t200.5 -53.5t201 53.5t146 146t53.5 201t-53.5 201t-146 146t-201 53.5zM465 248v29q0 19 3 33q3 15 9 28q5 14 15 26t24 26l35 33q15 13 25.5 29.5t10.5 39.5q0 30 -19 50.5t-54 20.5q-18 0 -32 -6.5t-24.5 -17.5t-16.5 -26q-5 -15 -6 -30l-95 8
q5 37 20 66t39 49t55 31q31 10 66 10q33 0 63 -9.5t53 -28.5t36 -46.5t13 -64.5q0 -25 -5.5 -43t-15.5 -34t-24 -30q-15 -15 -32 -30q-16 -13 -25.5 -23t-15.5 -20t-8 -21.5t-2 -28.5v-20h-92zM450 140q0 25 18 43t44 18q24 0 43 -17t19 -42t-18.5 -42.5t-43.5 -17.5
q-12 0 -23.5 4.5t-20.5 12.5q-8 7 -13 18t-5 23z" />
<glyph glyph-name="uniE62C" unicode="&#xe62c;"
d="M505 860q95 0 182 -37t150 -100t100.5 -150t37.5 -182t-37.5 -182t-100.5 -150t-150 -100.5t-182 -37.5t-182 37.5t-150 100.5t-100 150t-37 182t37 182t100 150t150 100t182 37zM505 -20q112 0 206.5 55t149.5 149.5t55 206t-55 206t-149.5 149.5t-206 55t-206 -55
t-149.5 -149.5t-55 -206t55 -206t149.5 -149.5t205.5 -55zM528 222v-59h-58v59h58zM470 648h58v-349h-58v349z" />
<glyph glyph-name="uniE62D" unicode="&#xe62d;"
d="M828 702q65 -65 98 -148t33 -169t-33 -169t-98 -148q-66 -66 -149 -98.5t-169 -32.5t-168.5 32.5t-148.5 97.5q-66 66 -98.5 149t-32.5 169t32.5 169t98.5 149q66 65 148.5 97.5t168.5 32.5t169 -32.5t149 -98.5v0zM258 133q53 -53 118.5 -79t134.5 -26t134.5 26
t118 78.5t78.5 118t26 134.5t-26 134.5t-78 118.5q-53 53 -119 79t-134.5 26t-134.5 -26t-118 -78.5t-78.5 -118t-26.5 -134.5t26.5 -134.5t78.5 -118.5v0zM748 686l69 -72l-531 -530l-70 70zM748 686z" />
<glyph glyph-name="uniE62E" unicode="&#xe62e;" horiz-adv-x="1025"
d="M491 6q9 -10 21.5 -10t21.5 10l357 407q9 10 5.5 17.5t-17.5 7.5h-133q-14 0 -23.5 9.5t-9.5 22.5v261q0 13 -10 22.5t-24 9.5h-333q-14 0 -24 -9.5t-10 -22.5v-261q0 -13 -9.5 -22.5t-23.5 -9.5h-133q-14 0 -17.5 -7.5t5.5 -17.5z" />
<glyph glyph-name="uniE62F" unicode="&#xe62f;"
d="M512 809v0q-58 0 -112.5 -12t-105.5 -38t-80.5 -44t-77.5 -51v-450q0 -57 19.5 -110.5t49 -93.5t69 -76t75.5 -59.5t73.5 -43t57 -28t32.5 -12.5q13 4 32.5 12.5t57 28t73.5 43t75.5 59.5t69 76t49 93.5t19.5 110.5v450q-48 33 -77.5 51t-80.5 44t-105.5 38t-112.5 12z
M808 214q0 -76 -36.5 -138t-112.5 -117q-73 -53 -147 -82q-74 29 -147 82q-76 55 -112.5 117t-36.5 138v421q87 53 146.5 75t149.5 23q90 -1 149.5 -23t146.5 -75v-421zM512 671q-67 0 -112.5 -12.5t-119.5 -49.5v-399q0 -35 12.5 -68.5t30 -57.5t44 -46t47 -35.5t46 -26
t34 -16t18.5 -6.5q10 3 18.5 6.5t34 16t46 26t47 35.5t44 46t30 57.5t12.5 68.5v399q-74 37 -119.5 49.5t-112.5 12.5v0zM667 515v-47h-105v-67h92v-61h-92v-77h116v-57h-332v57h42v168h64v-168h46v205h-138v61h307v-14z" />
<glyph glyph-name="uniE630" unicode="&#xe630;" horiz-adv-x="1163"
d="M295 196q67 0 114 -47t47 -113.5t-47 -114t-114 -47.5t-114 47.5t-47 114t47 113.5t114 47zM917.5 196q66.5 0 113.5 -47t47 -113.5t-47 -114t-113.5 -47.5t-114 47.5t-47.5 114t47.5 113.5t114 47zM400 894v-99h-210v0l-187 -294v-372h95q27 56 80 90.5t117 34.5
t117 -34.5t80 -90.5h228q27 56 80 90.5t117.5 34.5t117.5 -34.5t79 -90.5h46v765h-760zM400 452h-283l159 250l124 1v-251v0zM893 701l-131 -276l-63 31l101 206h-105v68h198v-29v0z" />
<glyph glyph-name="uniE631" unicode="&#xe631;"
d="M799 456l127 127v313h-830v-609l421 -413l409 404v181l-414 -401l-288 284v426h575v-312zM671 518l-107 22l-53 100l-52 -100l-108 -22l75 -83l-14 -114l99 49l99 -49l-14 114z" />
<glyph glyph-name="uniE632" unicode="&#xe632;"
d="M512 769q-104 0 -192.5 -51.5t-140 -140t-51.5 -193t51.5 -193t140 -140t192.5 -51.5t192.5 51.5t140 140t51.5 193t-51.5 193t-140 140t-192.5 51.5zM660 181h-50v175h-196v-175h-50v395h50v-179h196v179h50v-395z" />
<glyph glyph-name="uniE633" unicode="&#xe633;"
d="M1020 810q0 34 -24 58t-59 24h-851q-34 0 -58.5 -24t-24.5 -58v-852q0 -34 24.5 -58t58.5 -24h851q35 0 59 24t24 58v852zM815 464l-304 -304q-16 -16 -38.5 -16t-38.5 16l-191 191q-17 16 -17 39t16.5 39t39 16t38.5 -16l153 -152l264 264q16 16 39 16t39 -16t16 -38.5
t-16 -38.5z" />
<glyph glyph-name="uniE634" unicode="&#xe634;"
d="M637 610l-45 46l-272 -272l272 -272l45 46l-226 226z" />
<glyph glyph-name="uniE635" unicode="&#xe635;"
d="M0 896h1024v-1024h-1024v1024zM85 -43h854v854h-854v-854z" />
<glyph glyph-name="uniE636" unicode="&#xe636;"
d="M1024 -128h-1024v1024h1024v-1024zM947 674l-34 34q-13 13 -30 13t-30 -13l-486 -495l-196 205q-13 13 -30 13t-30 -13l-34 -34q-13 -13 -13 -30t13 -30l256 -256q23 -22 51 -8q9 0 9 8l546 546q18 13 20 30.5t-12 29.5z" />
<glyph glyph-name="uniE637" unicode="&#xe637;"
d="M0 812v-1024h1024v1024h-1024zM983 -171h-942v942h942v-942zM288 280h448q9 0 15 6t6 14t-6 14t-15 6h-448q-9 0 -15 -6t-6 -14t6 -14t15 -6z" />
<glyph glyph-name="uniE638" unicode="&#xe638;"
d="M0 812v-1024h1024v1024h-1024zM983 -171h-942v942h942v-942zM288 280h204v-204q0 -9 6 -15t14 -6t14 6t6 15v204h204q9 0 15 6t6 14t-6 14t-15 6h-204v204q0 9 -6 15t-14 6t-14 -6t-6 -15v-204h-204q-9 0 -15 -6t-6 -14t6 -14t15 -6z" />
<glyph glyph-name="uniE639" unicode="&#xe639;"
d="M774 201h-524l262 366z" />
<glyph glyph-name="uniE63A" unicode="&#xe63a;"
d="M512 188l-280 392h560z" />
<glyph glyph-name="uniE63B" unicode="&#xe63b;" horiz-adv-x="1048"
d="M297.5 528q-20.5 0 -35 -14.5t-14.5 -35t14.5 -35.5t35 -15t35.5 15t15 35.5t-15 35t-35.5 14.5zM381 251q0 96 84 164t202 68t202 -68t84 -163.5t-84 -163.5t-202 -68t-202 68t-84 163zM286 251q0 -17 2 -35v1q-88 42 -140.5 114t-52.5 157t51.5 157t139.5 114t192 42
q142 0 249.5 -76.5t128.5 -189.5q-88 43 -189 43q-104 0 -191.5 -43.5t-138.5 -119t-51 -164.5zM953 36q95 93 95 215t-94 214q2 20 2 23q0 111 -64 205t-174.5 148.5t-240 54.5t-239.5 -54.5t-174 -148.5t-64 -205q0 -78 33 -148.5t93 -125.5l-77 -123q-8 -12 -6.5 -26
t10.5 -25q13 -15 32 -15q9 0 18 4l180 80q4 2 7 4q20 -7 39 -12q48 -80 138.5 -128t199.5 -48q75 0 145 25q1 -1 2 -1l140 -62q8 -4 17 -4q20 0 32 15q10 10 11 24t-7 26zM527 282q-16 0 -27.5 -11t-11.5 -27t11.5 -27.5t27.5 -11.5t27.5 11.5t11.5 27.5t-11.5 27t-27.5 11z
M667 282q-16 0 -27.5 -11t-11.5 -27t11.5 -27.5t27.5 -11.5t27.5 11.5t11.5 27.5t-11.5 27t-27.5 11zM806 282q-16 0 -27 -11t-11 -27t11 -27.5t27 -11.5t27.5 11.5t11.5 27.5t-11.5 27t-27.5 11z" />
<glyph glyph-name="uniE63C" unicode="&#xe63c;" horiz-adv-x="1158"
d="M1069 181h-245v378h132l113 -169v-209zM1158 417l-155 231h-268v-467h-45v508q0 20 -14 34t-34 14h-63l-67 -89h89v-467h-512v467h45l22 89h-108q-20 0 -34 -14t-14 -34v-549q0 -20 14 -34t34 -14h139q-33 -37 -33 -87q0 -53 37.5 -91t91 -38t91.5 38t38 91q0 50 -34 87
h264h191q-34 -37 -34 -87q0 -53 38 -91t91.5 -38t91 38t37.5 91q0 50 -33 87h134v325zM326 668q-89 -153 -94 -296v-12h129v12q0 43 17 112q17 68 39 116q27 61 67.5 118t62.5 79l4 3v96h-390l-2 -114h245q-33 -40 -78 -114z" />
<glyph glyph-name="uniE63D" unicode="&#xe63d;"
d="M875 126l-363 -164l-363 164v610q247 75 363 75t363 -75v-610zM930 808q-34 11 -84.5 26t-159.5 38.5t-174 23.5t-174 -23.5t-159.5 -38.5t-84.5 -26q-14 -4 -22 -15.5t-8 -25.5v-669q0 -27 25 -39l405 -183q9 -3 18 -3t18 3l405 183q25 12 25 39v669q0 14 -8 25.5
t-22 15.5zM751 552v83h-473v-83h206v-298h-72v237h-87v-237h-66v-84h506v84h-193v119h151v83h-151v96h179z" />
<glyph glyph-name="uniE63E" unicode="&#xe63e;"
d="M866.5 747.5q-97.5 97.5 -228 132t-261.5 0t-228.5 -132t-132 -228.5t0 -261.5t132 -228t228.5 -132t261.5 0t228 132t132 228t0 261.5t-132 228.5zM798 199l-101 -101l-187 186l-186 -186l-101 101l186 186l-186 187l101 101l186 -186l187 186l101 -101l-186 -187z" />
</font>
</defs></svg>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Thu Jul 14 10:27:46 2016
By admin
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
panose-1="2 0 6 3 0 0 0 0 0 0"
ascent="896"
descent="-128"
x-height="792"
bbox="-0.75 -212 1160 896.75"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E63E"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
<glyph glyph-name=".notdef" horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
<glyph glyph-name=".null" horiz-adv-x="0"
/>
<glyph glyph-name="nonmarkingreturn" horiz-adv-x="341"
/>
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
<glyph glyph-name="uniE600" unicode="&#xe600;"
d="M286 509l-46 -45l272 -272l272 272l-46 45l-226 -226z" />
<glyph glyph-name="uniE601" unicode="&#xe601;"
d="M387 158l45 -46l272 272l-272 272l-45 -46l226 -226z" />
<glyph glyph-name="uniE602" unicode="&#xe602;"
d="M766 193l-196 192l196 192l-61 60l-196 -193l-196 193l-60 -60l196 -192l-196 -192l60 -59l196 192l196 -192z" />
<glyph glyph-name="uniE603" unicode="&#xe603;"
d="M951 77h-878l439 614z" />
<glyph glyph-name="uniE604" unicode="&#xe604;"
d="M512 77l-439 614h878z" />
<glyph glyph-name="uniE605" unicode="&#xe605;"
d="M819 823v-878l-614 439z" />
<glyph glyph-name="uniE606" unicode="&#xe606;"
d="M205 -55v878l614 -439z" />
<glyph glyph-name="uniE607" unicode="&#xe607;"
d="M786 789l-415 -405l415 -404q19 -18 19 -44t-19 -44.5t-46 -18.5t-46 18l-461 449q-19 18 -19 44.5t19 44.5l461 449q19 18 46 18t46 -18.5t19 -44.5t-19 -44zM786 789z" />
<glyph glyph-name="uniE608" unicode="&#xe608;"
d="M233 789q-19 18 -19 44t19 44.5t46 18.5t46 -18l461 -449q19 -18 19 -44.5t-19 -44.5l-461 -449q-19 -18 -46 -18t-46 18.5t-19 44.5t19 44l416 404zM233 789z" />
<glyph glyph-name="uniE609" unicode="&#xe609;"
d="M577 -118q-17 0 -30 11q-16 12 -18 31.5t11 35.5l357 443l-350 404q-13 15 -11.5 34.5t16.5 32.5t34.5 11.5t32.5 -16.5l376 -433q12 -13 12 -30.5t-11 -30.5l-382 -475q-14 -18 -37 -18z" />
<glyph glyph-name="uniE60A" unicode="&#xe60a;"
d="M447 -118q-23 0 -37 18l-382 475q-11 13 -11 30.5t12 30.5l376 433q13 15 32.5 16.5t34.5 -11.5t16.5 -32.5t-11.5 -34.5l-350 -404l357 -443q13 -16 11 -35.5t-18 -31.5q-13 -11 -30 -11z" />
<glyph glyph-name="uniE60B" unicode="&#xe60b;"
d="M284 15q-14 -14 -14 -33t13.5 -32.5t32.5 -13.5t32 14l397 401q13 14 13 33t-13 33l-397 401q-13 14 -32 14t-32.5 -13.5t-13.5 -32.5t13 -33l351 -369l-350 -369v0zM284 15z" />
<glyph glyph-name="uniE60C" unicode="&#xe60c;"
d="M745 753q13 14 13 33t-13.5 32.5t-32.5 13.5t-32 -14l-396 -401q-14 -14 -14 -33t14 -33l396 -401q14 -14 32.5 -14t32 13.5t13.5 32.5t-13 33l-351 369l351 369v0zM745 753z" />
<glyph glyph-name="uniE60D" unicode="&#xe60d;"
d="M512.5 750q-12.5 0 -21.5 -9t-9 -22v-311h-249q-12 0 -21.5 -9t-9.5 -22t9.5 -22t21.5 -9h280q12 0 21.5 9t9.5 22v342q0 13 -9.5 22t-22 9zM513 874q-101 0 -193 -39.5t-158.5 -105.5t-106 -158t-39.5 -193t39.5 -193t106 -158.5t158.5 -105.5t193 -39t192.5 39
t158 105.5t106 158.5t39.5 193t-39.5 193t-106 158t-158 105.5t-192.5 39.5zM513 -56q-118 0 -218 58t-158.5 158t-58.5 218t58.5 218t158.5 158t218 58t218 -58t158 -158t58 -218t-58 -218t-158 -158t-218 -58z" />
<glyph glyph-name="uniE60E" unicode="&#xe60e;"
d="M710 384l-473 474l38 38l512 -512l-512 -512l-38 38z" />
<glyph glyph-name="uniE60F" unicode="&#xe60f;"
d="M314 384l473 -474l-38 -38l-512 512l512 512l38 -38z" />
<glyph glyph-name="uniE610" unicode="&#xe610;"
d="M797 219.5q0 -7.5 -5 -13.5l-29 -28q-6 -6 -13.5 -6t-12.5 6l-225 224l-224 -224q-6 -6 -13.5 -6t-13.5 6l-28 28q-6 6 -6 13.5t6 13.5l266 266q6 6 13.5 6t12.5 -6l267 -266q5 -6 5 -13.5z" />
<glyph glyph-name="uniE611" unicode="&#xe611;"
d="M892 125l-236 236q54 77 54 172q0 124 -87 211t-210.5 87t-211 -87t-87.5 -211t87.5 -211t210.5 -87q95 0 173 55l236 -236q16 -17 38 -18t37 14t14 37t-18 38zM213 533q0 82 58.5 140.5t140.5 58.5t140.5 -58.5t58.5 -140.5t-58.5 -140.5t-140.5 -58.5t-140.5 58.5
t-58.5 140.5z" />
<glyph glyph-name="uniE612" unicode="&#xe612;"
d="M939 -128h-854q-35 0 -60 25t-25 60v854q0 35 25 60t60 25h854q35 0 60 -25t25 -60v-854q0 -35 -25 -60t-60 -25zM939 789q0 10 -6 16t-16 6h-810q-10 0 -16 -6t-6 -16v-810q0 -10 6 -16t16 -6h810q10 0 16 6t6 16v810zM457 183q-10 -12 -30.5 -12t-29.5 12l-171 171
q-13 10 -13 30q0 18 12.5 30.5t30.5 12.5q20 0 30 -13l141 -141l311 312q13 12 30 12q18 0 30.5 -12.5t12.5 -29.5q0 -21 -13 -30z" />
<glyph glyph-name="uniE613" unicode="&#xe613;"
d="M877 896h-730q-61 0 -104 -43t-43 -104v-730q0 -61 43 -104t104 -43h730q61 0 104 43t43 104v730q0 61 -43 104t-104 43zM939 19q0 -26 -18 -44t-44 -18h-730q-26 0 -44 18t-18 44v730q0 26 18 44t44 18h730q26 0 44 -18t18 -44v-730z" />
<glyph glyph-name="uniE614" unicode="&#xe614;"
d="M160 996zM865 247q0 -18 -13 -31l-308 -308q-13 -13 -31 -13t-31 13l-309 308q-13 13 -13 31t13.5 31t30.5 13h617q18 0 31 -13t13 -31zM865 511q0 -18 -13 -31t-31 -13h-617q-18 0 -31 13t-13 31t13 31l309 309q13 13 31 13t31 -13l308 -309q13 -13 13 -31z" />
<glyph glyph-name="uniE615" unicode="&#xe615;"
d="M704 665l-41 39l-343 -320l343 -320l41 39l-301 281z" />
<glyph glyph-name="uniE616" unicode="&#xe616;" horiz-adv-x="1173"
d="M569 607q-28 66 -74 108.5t-95 56.5t-100 2.5t-91.5 -45t-66 -94t-26.5 -137.5q0 -36 8.5 -67.5t26 -58t35.5 -47t46.5 -41t49 -34t52.5 -32.5t48 -30q71 -47 124.5 -106.5t63.5 -93.5q7 31 62.5 92t124.5 110q19 14 55.5 36.5t61 38.5t55 42.5t49 52t31.5 62.5t13 79
q0 76 -26.5 136t-67 92t-92 42.5t-101 -4t-94.5 -56t-72 -104.5z" />
<glyph glyph-name="uniE617" unicode="&#xe617;"
d="M500 775l-348 -298q-16 -14 -16 -35v-386q0 -25 17.5 -42.5t42.5 -17.5h197v257h238v-257h197q25 0 42.5 17.5t17.5 42.5v386q0 21 -16 35l-348 298q-12 10 -24 0z" />
<glyph glyph-name="uniE618" unicode="&#xe618;" horiz-adv-x="1000"
d="M751 766q21 -20 34 -33t19.5 -22.5t8.5 -16t2 -10.5v-13h-119q-8 0 -14 6t-10 14t-6 16.5t-2 12.5v100h3q6 0 13 -2t15.5 -8t22 -16t33.5 -28zM614 720q0 -16 5 -33.5t15 -32t26 -24t38 -9.5h117v-451q0 -24 -9.5 -42t-24.5 -31t-33.5 -20t-35.5 -7h-394q-15 0 -33 8.5
t-33.5 23t-26 33t-10.5 38.5v543q0 17 7.5 35t21 33.5t30 25.5t35.5 10h305v-100zM664 221q21 0 35.5 14.5t14.5 35.5t-14.5 35.5t-35.5 14.5h-299q-21 0 -35.5 -14.5t-14.5 -35.5t14.5 -35.5t35.5 -14.5h299zM714 470q0 21 -14.5 36t-35.5 15h-299q-21 0 -35.5 -15
t-14.5 -36t14.5 -35t35.5 -14h299q21 0 35.5 14t14.5 35zM714 470z" />
<glyph glyph-name="uniE619" unicode="&#xe619;"
d="M512 599q47 0 88 -18t72 -49t49 -72t18 -89q0 -46 -18 -87t-49 -72t-72 -49t-88 -18t-88 18t-72 49t-49 72t-18 87q0 48 18 89t49 72t72 49t88 18v0zM512 599z" />
<glyph glyph-name="uniE61A" unicode="&#xe61a;"
d="M903 577l-68 69l-388 -388l-231 230l-68 -68l299 -298l65 65z" />
<glyph glyph-name="uniE61B" unicode="&#xe61b;"
d="M505 337l2 -2q2 -1 3.5 -1t3.5 1l430 364q2 2 1 5.5t-5 3.5h-435h-424q-4 0 -5 -3.5t1 -5.5zM72 669q-3 2 -6 0.5t-3 -4.5v-584q0 -4 3.5 -5t5.5 1l288 346zM953 669.5q-3 1.5 -5 -0.5l-288 -246l287 -346q3 -2 6 -1t3 5v584q0 3 -3 4.5zM641 406l-131 -111l-5 5
l-125 103l-275 -328q-2 -3 -1 -6t5 -3h396h407q4 0 5 3t-1 6z" />
<glyph glyph-name="uniE61C" unicode="&#xe61c;"
d="M982 137l-4 6l-10 12q-12 13 -42 38q-43 36 -79 59l-48 31l-21 11q-17 8 -36 1q-16 -5 -23 -18l-17 -25q-4 -6 -8 -13l-12 -24q-9 -18 -15 -28q-7 -14 -21 -24t-32 -13.5t-36 7.5q-102 57 -171 123q-101 95 -135 172q-8 13 -1.5 37t26.5 34q13 7 34.5 15.5t31.5 14.5
q7 4 14.5 8.5t18.5 11.5l4 3l4 3l3 3q19 18 9 43l-3 8q-14 32 -36 69q-17 30 -41 62q-16 21 -32.5 36t-25.5 20l-9 5q-9 5 -13 7q-23 10 -50 -1q-15 -6 -30.5 -15.5t-22 -14.5t-26.5 -21q-44 -37 -69.5 -82.5t-19.5 -86.5q10 -72 88 -198.5t182.5 -225.5t237.5 -173t209 -84
q79 -10 169 73q38 36 56 73q6 14 7.5 30t-5.5 31zM982 137z" />
<glyph glyph-name="uniE61D" unicode="&#xe61d;"
d="M888 620q12 12 28.5 12t28.5 -12t12 -28.5t-12 -28.5l-406 -405q-12 -12 -28.5 -12t-27.5 12q-12 11 -12 27.5t12 28.5zM539 214q11 -12 11 -28.5t-11 -27.5q-12 -12 -28.5 -12t-28.5 12l-406 405q-11 12 -11 28.5t11 28.5q12 12 28.5 12t28.5 -12zM539 214z" />
<glyph glyph-name="uniE61E" unicode="&#xe61e;"
d="M127 769v-770h770v770h-770zM555 170h-86v86h86v-86zM555 298h-86v257h86v-257z" />
<glyph glyph-name="uniE61F" unicode="&#xe61f;"
d="M511.5 831q-90.5 0 -173.5 -35.5t-143 -95t-95 -142.5t-35 -174t35 -173.5t95 -142.5t143 -95.5t173.5 -35.5t173.5 35.5t143 95.5t95 142.5t35.5 173.5t-35 174t-95.5 142.5t-143 95t-173.5 35.5zM452 184h-1v0l-38 38l-179 180l38 37l179 -179l318 318l38 -38zM512 -63
q-91 0 -175 35q-80 34 -142 96t-96 142q-35 83 -35 174t35 174q34 81 96 142.5t142 95.5q84 36 175 36t174 -36q80 -34 142 -95.5t96 -142.5q35 -83 35 -174t-35 -174q-34 -80 -96 -142t-142 -96q-83 -35 -174 -35zM511.5 831q-90.5 0 -173 -35.5t-142.5 -95.5t-95.5 -142.5
t-35.5 -173.5t35.5 -173.5t95.5 -142.5t142.5 -95t173 -35t173.5 35t142.5 95t95 142.5t35.5 173.5t-35.5 173.5t-95 142.5t-142.5 95.5t-173.5 35.5zM451 183l-38 39l-180 180l39 38l179 -180l318 318l39 -38zM414 222l37 -37l355 355l-37 37l-318 -318l-179 180l-38 -37z
" />
<glyph glyph-name="uniE620" unicode="&#xe620;"
d="M958 758q0 30 -21 51.5t-51 21.5h-749q-30 0 -51 -21.5t-21 -51.5v-748q0 -30 21 -51t51 -21h749q30 0 51 21t21 51v748zM778 454l-267 -267q-14 -14 -34 -14t-34 14l-168 168q-14 14 -14 34t14 34.5t34 14.5t34 -15l134 -133l233 232q14 14 34 14t34 -14t14 -34t-14 -34
z" />
<glyph glyph-name="uniE621" unicode="&#xe621;"
d="M384 640v-513l321 257z" />
<glyph glyph-name="uniE622" unicode="&#xe622;" horiz-adv-x="1000"
d="M662 662v-499l-299 250zM662 662z" />
<glyph glyph-name="uniE623" unicode="&#xe623;" horiz-adv-x="1000"
d="M744 598h-488q-38 0 -64.5 -26.5t-26.5 -64.5v-290q0 -38 26.5 -64.5t64.5 -26.5h227l200 -138v138h61q38 0 64.5 26.5t26.5 64.5v290q0 38 -26.5 64.5t-64.5 26.5zM744 358z" />
<glyph glyph-name="uniE624" unicode="&#xe624;" horiz-adv-x="1025"
d="M1024 480v338q0 32 -23 55t-55 23h-331h-14q-55 0 -76 -21l-506 -506q-19 -19 -19 -46t19 -45l387 -387q18 -19 45 -19t46 19l506 506q10 10 15 25.5t5.5 26.5t0.5 31zM764 549q-36 0 -61.5 25.5t-25.5 61.5t25.5 61t61.5 25t61 -25t25 -61t-25 -61.5t-61 -25.5z" />
<glyph glyph-name="uniE625" unicode="&#xe625;"
d="M511 832q-91 0 -173.5 -35.5t-142 -95t-95 -142t-35.5 -173.5t35.5 -173.5t95 -142t142 -95t173.5 -35.5t173.5 35.5t142.5 95t95 142t35 173.5t-35 173.5t-95 142t-142.5 95t-173.5 35.5zM734 337h-237q-7 0 -14 3q-22 9 -22 33v237q0 15 10.5 26t26 11t26 -11t10.5 -26
v-200h200q15 0 26 -10.5t11 -26t-11 -26t-26 -10.5zM734 337z" />
<glyph glyph-name="uniE626" unicode="&#xe626;" horiz-adv-x="1025"
d="M994 163q-18 9 -16 30.5t27 46.5q24 27 17.5 54.5t-33.5 40.5q-17 8 -24.5 17.5t-2 20t26.5 19.5q30 11 29.5 55.5t-31.5 80.5q-34 39 -278 23l-23 -1q3 2 3 145q0 101 -28 139t-84 36q-18 0 -28.5 -5t-17 -13t-11 -26.5t-7.5 -38t-10 -56.5t-16 -74q-12 -47 -38 -94
t-54 -80t-55 -59t-44 -39l-18 -13v-386q10 -14 27 -25.5t31 -17t31 -11.5t21 -8q9 -4 65 -10.5t105.5 -11t51.5 -4.5q4 0 11 0.5t30 2.5t45 4.5t52 6.5t56.5 8t53.5 9.5t47 11t33.5 13t15.5 14.5q8 24 3 39t-2 27t23 20q27 10 34.5 34.5t0.5 46t-19 28.5zM0 379v-380
q0 -28 20 -48.5t49 -20.5h137v518h-137q-29 0 -49 -20.5t-20 -48.5zM0 379z" />
<glyph glyph-name="uniE627" unicode="&#xe627;" horiz-adv-x="1025"
d="M512 719q-167 0 -304.5 -89.5t-205.5 -236.5q-4 -9 0 -18q68 -147 205.5 -236.5t304.5 -89.5t304.5 89.5t205.5 236.5q4 9 0 18q-68 147 -205.5 236.5t-304.5 89.5zM512 153q-96 0 -163.5 67.5t-67.5 163.5t67.5 163.5t163.5 67.5t163.5 -67.5t67.5 -163.5t-67.5 -163.5
t-163.5 -67.5zM512 384zM364 384q0 61 43.5 104.5t104.5 43.5t104.5 -43.5t43.5 -104.5t-43.5 -104.5t-104.5 -43.5t-104.5 43.5t-43.5 104.5z" />
<glyph glyph-name="uniE628" unicode="&#xe628;"
d="M482.5 167q-24.5 0 -42 -17.5t-17.5 -42.5t17.5 -42.5t42 -17.5t42 17.5t17.5 42.5t-17.5 42.5t-42 17.5zM769 167q-25 0 -42.5 -17.5t-17.5 -42.5t17.5 -42.5t42.5 -17.5t42.5 17.5t17.5 42.5t-17.5 42.5t-42.5 17.5zM839 277h-417l-143 425q-7 18 -29 18h-127
q-13 0 -22 -8t-9 -20.5t9 -20.5t22 -8h105l143 -424q7 -19 29 -19h439q13 0 21.5 8t8.5 20.5t-8.5 20.5t-21.5 8zM904 608l-516 45q-12 1 -18.5 -7t-1.5 -20l90 -270q4 -12 16 -21.5t24 -9.5h377q12 0 22 10t11 23l23 216q2 12 -6 22t-21 12z" />
<glyph glyph-name="uniE629" unicode="&#xe629;"
d="M154 770v-646h146l-14 -208l240 208h344v646h-716zM752 260h-134v159h-192v-159h-134v382h134v-148h192v148h134v-382z" />
<glyph glyph-name="uniE62A" unicode="&#xe62a;"
d="M328 18q-6 0 -11 3q-14 6 -14 22v128h-193q-10 0 -17.5 7t-7.5 18v549q0 10 7.5 17.5t17.5 7.5h804q11 0 18 -7.5t7 -17.5v-549q0 -11 -7 -18t-18 -7h-401l-169 -146q-7 -7 -16 -7zM171 256h188q10 0 17.5 -7.5t7.5 -17.5v-73l103 92q7 6 17 6h350v426h-683v-426z
M739 569h-454q-10 0 -17.5 7t-7.5 17.5t7.5 18t17.5 7.5h454q10 0 17.5 -7.5t7.5 -18t-7 -17.5t-18 -7zM739 446h-454q-10 0 -17.5 7t-7.5 17.5t7.5 18t17.5 7.5h454q10 0 17.5 -7.5t7.5 -18t-7 -17.5t-18 -7zM549 323h-264q-10 0 -17.5 7t-7.5 17.5t7.5 18t17.5 7.5h264
q10 0 17.5 -7.5t7.5 -17.5t-7.5 -17.5t-17.5 -7.5z" />
<glyph glyph-name="uniE62B" unicode="&#xe62b;"
d="M510.5 -60q-90.5 0 -173 35.5t-142.5 95.5t-95.5 142.5t-35.5 173t35.5 173t95.5 142.5t142.5 95.5t173 35.5t173.5 -35.5t142.5 -95.5t95 -142.5t35.5 -173t-35.5 -173t-95 -142.5t-142.5 -95.5t-173.5 -35.5zM510.5 787q-108.5 0 -200.5 -53.5t-146 -146t-54 -201
t54 -201t146 -146t200.5 -53.5t201 53.5t146 146t53.5 201t-53.5 201t-146 146t-201 53.5zM465 248v29q0 19 3 33q3 15 9 28q5 14 15 26t24 26l35 33q15 13 25.5 29.5t10.5 39.5q0 30 -19 50.5t-54 20.5q-18 0 -32 -6.5t-24.5 -17.5t-16.5 -26q-5 -15 -6 -30l-95 8
q5 37 20 66t39 49t55 31q31 10 66 10q33 0 63 -9.5t53 -28.5t36 -46.5t13 -64.5q0 -25 -5.5 -43t-15.5 -34t-24 -30q-15 -15 -32 -30q-16 -13 -25.5 -23t-15.5 -20t-8 -21.5t-2 -28.5v-20h-92zM450 140q0 25 18 43t44 18q24 0 43 -17t19 -42t-18.5 -42.5t-43.5 -17.5
q-12 0 -23.5 4.5t-20.5 12.5q-8 7 -13 18t-5 23z" />
<glyph glyph-name="uniE62C" unicode="&#xe62c;"
d="M505 860q95 0 182 -37t150 -100t100.5 -150t37.5 -182t-37.5 -182t-100.5 -150t-150 -100.5t-182 -37.5t-182 37.5t-150 100.5t-100 150t-37 182t37 182t100 150t150 100t182 37zM505 -20q112 0 206.5 55t149.5 149.5t55 206t-55 206t-149.5 149.5t-206 55t-206 -55
t-149.5 -149.5t-55 -206t55 -206t149.5 -149.5t205.5 -55zM528 222v-59h-58v59h58zM470 648h58v-349h-58v349z" />
<glyph glyph-name="uniE62D" unicode="&#xe62d;"
d="M828 702q65 -65 98 -148t33 -169t-33 -169t-98 -148q-66 -66 -149 -98.5t-169 -32.5t-168.5 32.5t-148.5 97.5q-66 66 -98.5 149t-32.5 169t32.5 169t98.5 149q66 65 148.5 97.5t168.5 32.5t169 -32.5t149 -98.5v0zM258 133q53 -53 118.5 -79t134.5 -26t134.5 26
t118 78.5t78.5 118t26 134.5t-26 134.5t-78 118.5q-53 53 -119 79t-134.5 26t-134.5 -26t-118 -78.5t-78.5 -118t-26.5 -134.5t26.5 -134.5t78.5 -118.5v0zM748 686l69 -72l-531 -530l-70 70zM748 686z" />
<glyph glyph-name="uniE62E" unicode="&#xe62e;" horiz-adv-x="1025"
d="M491 6q9 -10 21.5 -10t21.5 10l357 407q9 10 5.5 17.5t-17.5 7.5h-133q-14 0 -23.5 9.5t-9.5 22.5v261q0 13 -10 22.5t-24 9.5h-333q-14 0 -24 -9.5t-10 -22.5v-261q0 -13 -9.5 -22.5t-23.5 -9.5h-133q-14 0 -17.5 -7.5t5.5 -17.5z" />
<glyph glyph-name="uniE62F" unicode="&#xe62f;"
d="M512 809v0q-58 0 -112.5 -12t-105.5 -38t-80.5 -44t-77.5 -51v-450q0 -57 19.5 -110.5t49 -93.5t69 -76t75.5 -59.5t73.5 -43t57 -28t32.5 -12.5q13 4 32.5 12.5t57 28t73.5 43t75.5 59.5t69 76t49 93.5t19.5 110.5v450q-48 33 -77.5 51t-80.5 44t-105.5 38t-112.5 12z
M808 214q0 -76 -36.5 -138t-112.5 -117q-73 -53 -147 -82q-74 29 -147 82q-76 55 -112.5 117t-36.5 138v421q87 53 146.5 75t149.5 23q90 -1 149.5 -23t146.5 -75v-421zM512 671q-67 0 -112.5 -12.5t-119.5 -49.5v-399q0 -35 12.5 -68.5t30 -57.5t44 -46t47 -35.5t46 -26
t34 -16t18.5 -6.5q10 3 18.5 6.5t34 16t46 26t47 35.5t44 46t30 57.5t12.5 68.5v399q-74 37 -119.5 49.5t-112.5 12.5v0zM667 515v-47h-105v-67h92v-61h-92v-77h116v-57h-332v57h42v168h64v-168h46v205h-138v61h307v-14z" />
<glyph glyph-name="uniE630" unicode="&#xe630;" horiz-adv-x="1163"
d="M295 196q67 0 114 -47t47 -113.5t-47 -114t-114 -47.5t-114 47.5t-47 114t47 113.5t114 47zM917.5 196q66.5 0 113.5 -47t47 -113.5t-47 -114t-113.5 -47.5t-114 47.5t-47.5 114t47.5 113.5t114 47zM400 894v-99h-210v0l-187 -294v-372h95q27 56 80 90.5t117 34.5
t117 -34.5t80 -90.5h228q27 56 80 90.5t117.5 34.5t117.5 -34.5t79 -90.5h46v765h-760zM400 452h-283l159 250l124 1v-251v0zM893 701l-131 -276l-63 31l101 206h-105v68h198v-29v0z" />
<glyph glyph-name="uniE631" unicode="&#xe631;"
d="M799 456l127 127v313h-830v-609l421 -413l409 404v181l-414 -401l-288 284v426h575v-312zM671 518l-107 22l-53 100l-52 -100l-108 -22l75 -83l-14 -114l99 49l99 -49l-14 114z" />
<glyph glyph-name="uniE632" unicode="&#xe632;"
d="M512 769q-104 0 -192.5 -51.5t-140 -140t-51.5 -193t51.5 -193t140 -140t192.5 -51.5t192.5 51.5t140 140t51.5 193t-51.5 193t-140 140t-192.5 51.5zM660 181h-50v175h-196v-175h-50v395h50v-179h196v179h50v-395z" />
<glyph glyph-name="uniE633" unicode="&#xe633;"
d="M1020 810q0 34 -24 58t-59 24h-851q-34 0 -58.5 -24t-24.5 -58v-852q0 -34 24.5 -58t58.5 -24h851q35 0 59 24t24 58v852zM815 464l-304 -304q-16 -16 -38.5 -16t-38.5 16l-191 191q-17 16 -17 39t16.5 39t39 16t38.5 -16l153 -152l264 264q16 16 39 16t39 -16t16 -38.5
t-16 -38.5z" />
<glyph glyph-name="uniE634" unicode="&#xe634;"
d="M637 610l-45 46l-272 -272l272 -272l45 46l-226 226z" />
<glyph glyph-name="uniE635" unicode="&#xe635;"
d="M0 896h1024v-1024h-1024v1024zM85 -43h854v854h-854v-854z" />
<glyph glyph-name="uniE636" unicode="&#xe636;"
d="M1024 -128h-1024v1024h1024v-1024zM947 674l-34 34q-13 13 -30 13t-30 -13l-486 -495l-196 205q-13 13 -30 13t-30 -13l-34 -34q-13 -13 -13 -30t13 -30l256 -256q23 -22 51 -8q9 0 9 8l546 546q18 13 20 30.5t-12 29.5z" />
<glyph glyph-name="uniE637" unicode="&#xe637;"
d="M0 812v-1024h1024v1024h-1024zM983 -171h-942v942h942v-942zM288 280h448q9 0 15 6t6 14t-6 14t-15 6h-448q-9 0 -15 -6t-6 -14t6 -14t15 -6z" />
<glyph glyph-name="uniE638" unicode="&#xe638;"
d="M0 812v-1024h1024v1024h-1024zM983 -171h-942v942h942v-942zM288 280h204v-204q0 -9 6 -15t14 -6t14 6t6 15v204h204q9 0 15 6t6 14t-6 14t-15 6h-204v204q0 9 -6 15t-14 6t-14 -6t-6 -15v-204h-204q-9 0 -15 -6t-6 -14t6 -14t15 -6z" />
<glyph glyph-name="uniE639" unicode="&#xe639;"
d="M774 201h-524l262 366z" />
<glyph glyph-name="uniE63A" unicode="&#xe63a;"
d="M512 188l-280 392h560z" />
<glyph glyph-name="uniE63B" unicode="&#xe63b;" horiz-adv-x="1048"
d="M297.5 528q-20.5 0 -35 -14.5t-14.5 -35t14.5 -35.5t35 -15t35.5 15t15 35.5t-15 35t-35.5 14.5zM381 251q0 96 84 164t202 68t202 -68t84 -163.5t-84 -163.5t-202 -68t-202 68t-84 163zM286 251q0 -17 2 -35v1q-88 42 -140.5 114t-52.5 157t51.5 157t139.5 114t192 42
q142 0 249.5 -76.5t128.5 -189.5q-88 43 -189 43q-104 0 -191.5 -43.5t-138.5 -119t-51 -164.5zM953 36q95 93 95 215t-94 214q2 20 2 23q0 111 -64 205t-174.5 148.5t-240 54.5t-239.5 -54.5t-174 -148.5t-64 -205q0 -78 33 -148.5t93 -125.5l-77 -123q-8 -12 -6.5 -26
t10.5 -25q13 -15 32 -15q9 0 18 4l180 80q4 2 7 4q20 -7 39 -12q48 -80 138.5 -128t199.5 -48q75 0 145 25q1 -1 2 -1l140 -62q8 -4 17 -4q20 0 32 15q10 10 11 24t-7 26zM527 282q-16 0 -27.5 -11t-11.5 -27t11.5 -27.5t27.5 -11.5t27.5 11.5t11.5 27.5t-11.5 27t-27.5 11z
M667 282q-16 0 -27.5 -11t-11.5 -27t11.5 -27.5t27.5 -11.5t27.5 11.5t11.5 27.5t-11.5 27t-27.5 11zM806 282q-16 0 -27 -11t-11 -27t11 -27.5t27 -11.5t27.5 11.5t11.5 27.5t-11.5 27t-27.5 11z" />
<glyph glyph-name="uniE63C" unicode="&#xe63c;" horiz-adv-x="1158"
d="M1069 181h-245v378h132l113 -169v-209zM1158 417l-155 231h-268v-467h-45v508q0 20 -14 34t-34 14h-63l-67 -89h89v-467h-512v467h45l22 89h-108q-20 0 -34 -14t-14 -34v-549q0 -20 14 -34t34 -14h139q-33 -37 -33 -87q0 -53 37.5 -91t91 -38t91.5 38t38 91q0 50 -34 87
h264h191q-34 -37 -34 -87q0 -53 38 -91t91.5 -38t91 38t37.5 91q0 50 -33 87h134v325zM326 668q-89 -153 -94 -296v-12h129v12q0 43 17 112q17 68 39 116q27 61 67.5 118t62.5 79l4 3v96h-390l-2 -114h245q-33 -40 -78 -114z" />
<glyph glyph-name="uniE63D" unicode="&#xe63d;"
d="M875 126l-363 -164l-363 164v610q247 75 363 75t363 -75v-610zM930 808q-34 11 -84.5 26t-159.5 38.5t-174 23.5t-174 -23.5t-159.5 -38.5t-84.5 -26q-14 -4 -22 -15.5t-8 -25.5v-669q0 -27 25 -39l405 -183q9 -3 18 -3t18 3l405 183q25 12 25 39v669q0 14 -8 25.5
t-22 15.5zM751 552v83h-473v-83h206v-298h-72v237h-87v-237h-66v-84h506v84h-193v119h151v83h-151v96h179z" />
<glyph glyph-name="uniE63E" unicode="&#xe63e;"
d="M866.5 747.5q-97.5 97.5 -228 132t-261.5 0t-228.5 -132t-132 -228.5t0 -261.5t132 -228t228.5 -132t261.5 0t228 132t132 228t0 261.5t-132 228.5zM798 199l-101 -101l-187 186l-186 -186l-101 101l186 186l-186 187l101 101l186 -186l187 186l101 -101l-186 -187z" />
</font>
</defs></svg>
... ...
<?php
/**
* Created by PhpStorm.
* User: Zip
* Date: 15/4/28
* Time: 下午3:16
*/
namespace Hood\Cache;
use Hood\Core\Root;
class Memcache extends Root implements CacheInterface
{
private $mcInstances = array();
private $persistentIDs = array();
private $section = 'memcached';
private $node = 'servers';
private $tagName = '';
private $prefix = '';
private $persistentID = 'hood.cache';
private $childNodes = 'hosts';
public function __construct($prefix = '', $persistentID = 'hood.cache')
{
parent::__construct();
$this->prefix = $prefix;
$this->persistentIDs[] = $this->persistentID = $persistentID;
}
public function init()
{
if (isset($this->mcInstances[$this->persistentID])) {
$mc = $this->mcInstances[$this->persistentID];
} else {
$instance = new \Memcache();
$server = $this->getServerHost('cache');
$_serverHosts = $server->getServerConfig($this->section, $this->node);
$mcServers = $this->_makeHosts($server->getServer($_serverHosts[$this->childNodes], 2));
foreach ($mcServers as $key => $val) {
$weight = 100;
if (count($val) == 3) {
list($host, $port, $weight) = $val;
} else {
list($host, $port) = $val;
}
$instance->addServer($host, $port, $this->persistentID, $weight);
}
$this->mcInstances[$this->persistentID] = $mc = $instance;
}
return $mc;
}
/**
* 组织host
* @param array $hosts
* @return array
*/
private function _makeHosts(array $hosts)
{
$_server = array();
foreach ($hosts as $key => $val) {
$_server[] = explode(':', $val);
}
return $_server;
}
/**
* 设置mc配置的块节点
* @param $node
* @return $this
*/
public function setNode($node = null)
{
if ($node != null) $this->node = $node;
return $this;
}
/**
* 设置子节点
* @param $childNode
* @return $this
*/
public function setChildNodes($childNode)
{
$this->childNodes = $childNode;
return $this;
}
/**
* 构建tag
* @param bool $mode
* @return string
*/
private function _makeTag($mode = false)
{
if (empty($this->tagName)) return '';
$_tagVal = $this->init()->get($this->tagName);
if (empty($_tagVal) && $mode == true) {
$_tagVal = md5(microtime() . mt_rand() . uniqid());
$this->init()->set($this->tagName, $_tagVal, 0);
}
unset($this->tagName);
return empty($_tagVal) ? '' : $_tagVal . '.';
}
/**
* 检索一个元素
* @param $key
* @param callable $flags
* @return mixed
*/
public function get($key, &$flags = \MEMCACHE_COMPRESSED)
{
return $this->init()->get($this->_makeTag() . $key, $flags);
}
/**
* 向一个新的key下面增加一个元素
* @param $key
* @param $value
* @param $expiration
* @return bool
*/
public function add($key, $value, $expiration = 0)
{
return $this->init()->add($this->_makeTag(true) . $key, $value, $expiration);
}
/**
* 减小数值元素的值
* @param $key
* @param int $offset
* @return int
*/
public function decrement($key, $offset = 1)
{
return $this->init()->decrement($this->_makeTag() . $key, $offset);
}
/**
* @param $key
* @param int $time
* @return bool
*/
public function delete($key, $time = 0)
{
return $this->init()->delete($this->_makeTag() . $key, $time);
}
/**
* 增加数值元素的值
* @param $key
* @param int $offset
* @param int $initialValue
* @param int $expiry
* @return int
*/
public function increment($key, $offset = 1, $initialValue = 0, $expiry = 0)
{
return $this->init()->increment($this->_makeTag() . $key, $offset, $initialValue, $expiry);
}
/**
* 设置
* @param $key
* @param $value
* @param int $expiration
* @return bool
*/
public function set($key, $var, $expire = 0, $flag = \MEMCACHE_COMPRESSED)
{
return $this->init()->set($this->_makeTag(true) . $key, $var, $flag, $expire);
}
/**
* 设置tag
* @param $tagName
* @return $this
*/
public function tag($tagName)
{
$this->tagName = $tagName;
return $this;
}
<?php
/**
* Created by PhpStorm.
* User: Zip
* Date: 15/4/28
* Time: 下午3:16
*/
namespace Hood\Cache;
use Hood\Core\Root;
class Memcache extends Root implements CacheInterface
{
private $mcInstances = array();
private $persistentIDs = array();
private $section = 'memcached';
private $node = 'servers';
private $tagName = '';
private $prefix = '';
private $persistentID = 'hood.cache';
private $childNodes = 'hosts';
public function __construct($prefix = '', $persistentID = 'hood.cache')
{
parent::__construct();
$this->prefix = $prefix;
$this->persistentIDs[] = $this->persistentID = $persistentID;
}
public function init()
{
if (isset($this->mcInstances[$this->persistentID])) {
$mc = $this->mcInstances[$this->persistentID];
} else {
$instance = new \Memcache();
$server = $this->getServerHost('cache');
$_serverHosts = $server->getServerConfig($this->section, $this->node);
$mcServers = $this->_makeHosts($server->getServer($_serverHosts[$this->childNodes], 2));
foreach ($mcServers as $key => $val) {
$weight = 100;
if (count($val) == 3) {
list($host, $port, $weight) = $val;
} else {
list($host, $port) = $val;
}
$instance->addServer($host, $port, $this->persistentID, $weight);
}
$this->mcInstances[$this->persistentID] = $mc = $instance;
}
return $mc;
}
/**
* 组织host
* @param array $hosts
* @return array
*/
private function _makeHosts(array $hosts)
{
$_server = array();
foreach ($hosts as $key => $val) {
$_server[] = explode(':', $val);
}
return $_server;
}
/**
* 设置mc配置的块节点
* @param $node
* @return $this
*/
public function setNode($node = null)
{
if ($node != null) $this->node = $node;
return $this;
}
/**
* 设置子节点
* @param $childNode
* @return $this
*/
public function setChildNodes($childNode)
{
$this->childNodes = $childNode;
return $this;
}
/**
* 构建tag
* @param bool $mode
* @return string
*/
private function _makeTag($mode = false)
{
if (empty($this->tagName)) return '';
$_tagVal = $this->init()->get($this->tagName);
if (empty($_tagVal) && $mode == true) {
$_tagVal = md5(microtime() . mt_rand() . uniqid());
$this->init()->set($this->tagName, $_tagVal, 0);
}
unset($this->tagName);
return empty($_tagVal) ? '' : $_tagVal . '.';
}
/**
* 检索一个元素
* @param $key
* @param callable $flags
* @return mixed
*/
public function get($key, &$flags = \MEMCACHE_COMPRESSED)
{
return $this->init()->get($this->_makeTag() . $key, $flags);
}
public function getBy($key, $cacheCb = null, &$casToken = null)
{
return $this->init()->get($key, $cacheCb, $casToken);
}
/**
* 向一个新的key下面增加一个元素
* @param $key
* @param $value
* @param $expiration
* @return bool
*/
public function add($key, $value, $expiration = 0)
{
return $this->init()->add($this->_makeTag(true) . $key, $value, $expiration);
}
/**
* 减小数值元素的值
* @param $key
* @param int $offset
* @return int
*/
public function decrement($key, $offset = 1)
{
return $this->init()->decrement($this->_makeTag() . $key, $offset);
}
/**
* @param $key
* @param int $time
* @return bool
*/
public function delete($key, $time = 0)
{
return $this->init()->delete($this->_makeTag() . $key, $time);
}
/**
* 增加数值元素的值
* @param $key
* @param int $offset
* @param int $initialValue
* @param int $expiry
* @return int
*/
public function increment($key, $offset = 1, $initialValue = 0, $expiry = 0)
{
return $this->init()->increment($this->_makeTag() . $key, $offset, $initialValue, $expiry);
}
/**
* 设置
* @param $key
* @param $value
* @param int $expiration
* @return bool
*/
public function set($key, $var, $expire = 0, $flag = \MEMCACHE_COMPRESSED)
{
return $this->init()->set($this->_makeTag(true) . $key, $var, $flag, $expire);
}
/**
* 设置tag
* @param $tagName
* @return $this
*/
public function tag($tagName)
{
$this->tagName = $tagName;
return $this;
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: Zip
* Date: 14/11/23
* Time: 上午1:39
*/
namespace Hood\Cache;
use Hood\Core\Root;
use Hood\Debug\DebugException;
class Memcached extends Root implements CacheInterface
{
private $mcInstances = array();
private $persistentIDs = array();
private $timeout = 150;
private $section = 'memcached';
private $node = 'servers';
private $tagName = '';
private $prefix = '';
private $persistentID = 'hood.cache';
private $childNodes = 'hosts';
public function __construct($prefix = '', $persistentID = 'hood.cache')
{
parent::__construct();
$this->prefix = $prefix;
$this->persistentIDs[] = $this->persistentID = $persistentID;
}
/**
* 设置子节点
* @param $childNode
* @return $this
*/
public function setChildNodes($childNode)
{
$this->childNodes = $childNode;
return $this;
}
/**
* 设置前缀
* @param $prefix
* @return $this
*/
public function setPrefix($prefix)
{
$this->prefix = $prefix;
return $this;
}
/**
* 设置共享连接ID
* @param $persistentID
* @return $this
*/
public function setPersistentID($persistentID)
{
$this->persistentID = $persistentID;
return $this;
}
/**
* @param $persistentID
* @return \Memcached
* @throws \Hood\Debug\DebugException
*/
private function init()
{
if (isset($this->mcInstances[$this->persistentID])) {
$mc = $this->mcInstances[$this->persistentID];
} else {
$instance = new \Memcached();
$instance->setOption(\Memcached::OPT_PREFIX_KEY, $this->prefix);
$instance->setOption(\Memcached::OPT_DISTRIBUTION, \Memcached::DISTRIBUTION_CONSISTENT); // 开启一致性哈希 取模(默认)/ 一致性
$instance->setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true);//ketama算法兼容 设置为md5并且分布算法将会 采用带有权重的一致性hash分布
$instance->setOption(\Memcached::OPT_CONNECT_TIMEOUT, $this->timeout);
if (count($instance->getServerList()) < 1) {
$server = $this->getServerHost('cache');
$_serverHosts = $server->getServerConfig($this->section, $this->node);
if (empty($_serverHosts[$this->childNodes])) {
throw new DebugException('Memcache Host Config is Null.');
}
$mcServers = $this->_makeHosts($server->getServer($_serverHosts[$this->childNodes], 2));
$instance->addServers($mcServers);
unset($mcServers);
}
$this->mcInstances[$this->persistentID] = $mc = $instance;
}
return $mc;
}
/**
* 设置mc配置的块
* @param $section
* @return $this
*/
public function setSection($section)
{
$this->section = $section;
return $this;
}
/**
* 设置mc配置的块节点
* @param $node
* @return $this
*/
public function setNode($node = null)
{
if ($node != null) $this->node = $node;
return $this;
}
/**
* 组织host
* @param array $hosts
* @return array
*/
private function _makeHosts(array $hosts)
{
$_server = array();
foreach ($hosts as $key => $val) {
$_server[] = explode(':', $val);
}
return $_server;
}
/**
* 构建tag
* @param bool $mode
* @return string
*/
private function _makeTag($mode = false)
{
if (empty($this->tagName)) return '';
$_tagVal = $this->init()->get($this->tagName);
if (empty($_tagVal) && $mode == true) {
$_tagVal = md5(microtime() . mt_rand() . uniqid());
$this->init()->set($this->tagName, $_tagVal, 0);
}
unset($this->tagName);
return empty($_tagVal) ? '' : $_tagVal . '.';
}
/**
* 检索一个元素
* @param $key
* @param callable $cache_cb
* @param float $cas_token
* @return mixed
*/
public function get($key, $cacheCb = null, &$casToken = null)
{
return $this->init()->get($this->_makeTag() . $key, $cacheCb, $casToken);
}
/**
* 向一个新的key下面增加一个元素
* @param $key
* @param $value
* @param $expiration
* @return bool
*/
public function add($key, $value, $expiration = 0)
{
return $this->init()->add($this->_makeTag(true) . $key, $value, $expiration);
}
/**
* 向已存在元素后追加数据
* @param $key
* @param $value
* @return bool
*/
public function append($key, $value)
{
return $this->init()->append($this->_makeTag(true) . $key, $value);
}
/**
* 比较并交换值
* @param $casToken
* @param $key
* @param $value
* @param int $expiration
* @return bool
*/
public function cas($casToken, $key, $value, $expiration = 0)
{
return $this->init()->cas($casToken, $this->_makeTag(true) . $key, $value, $expiration);
}
/**
* 减小数值元素的值
* @param $key
* @param int $offset
* @return int
*/
public function decrement($key, $offset = 1)
{
return $this->init()->decrement($this->_makeTag() . $key, $offset);
}
/**
* @param $key
* @param int $time
* @return bool
*/
public function delete($key, $time = 0)
{
return $this->init()->delete($this->_makeTag() . $key, $time);
}
/**
* 删除多个数据
* @param array $keys
* @param int $time
* @return bool
*/
public function deleteMulti(array $keys, $time = 0)
{
return $this->init()->deleteMulti($this->_makeMultiKey($keys), $time);
}
/**
* 组合多key 数据
* @param $keys
* @return array
*/
private function _makeMultiKey($keys, $mode = false)
{
$_keys = array();
$tag = $this->_makeTag($mode);
foreach ($keys as $key) {
$_keys[] = $tag . $key;
}
return $_keys;
}
/**
* 请求多个元素
* @param array $keys
* @param null $withCas
* @param callable $valueCb
* @return bool
*/
public function getDelayed(array $keys, $withCas = null, callable $valueCb = null)
{
return $this->init()->getDelayed($this->_makeMultiKey($keys), $withCas, $valueCb);
}
/**
* 抓取所有剩余的结果
* @return array
*/
public function fetchAll()
{
return $this->init()->fetchAll();
}
/**
* 检索多个元素
* @param array $keys
* @param array $cas_tokens
* @param null $flags
* @return mixed
*/
public function getMulti(array $keys, array &$casTokens = null, $flags = null)
{
return $this->init()->getMulti($this->_makeMultiKey($keys), $casTokens, $flags);
}
/**
* 增加数值元素的值
* @param $key
* @param int $offset
* @param int $initialValue
* @param int $expiry
* @return int
*/
public function increment($key, $offset = 1, $initialValue = 0, $expiry = 0)
{
return $this->init()->increment($this->_makeTag() . $key, $offset, $initialValue, $expiry);
}
/**
* 检查memcache是否长连接
* @return bool
*/
public function isPersistent()
{
return $this->init()->isPersistent();
}
/**
* 设置
* @param $key
* @param $value
* @param int $expiration
* @return bool
*/
public function set($key, $value, $expiration = 0)
{
return $this->init()->set($this->_makeTag(true) . $key, $value, $expiration);
}
/**
* 设置多个数据
* @param array $items
* @param int $expiration
* @return bool
*/
public function setMulti(array $items, $expiration = 0)
{
$_items = array();
$tag = $this->_makeTag(true);
foreach ($items as $key => $val) {
$_items[$tag . $key] = $val;
}
return $this->init()->setMulti($_items, $expiration);
}
/**
* 设置tag
* @param $tagName
* @return $this
*/
public function tag($tagName)
{
$this->tagName = $tagName;
return $this;
}
/**
* 清除服务列表
* @return $this
*/
public function resetServerList()
{
$this->init()->resetServerList();
return $this;
}
<?php
/**
* Created by PhpStorm.
* User: Zip
* Date: 14/11/23
* Time: 上午1:39
*/
namespace Hood\Cache;
use Hood\Core\Root;
use Hood\Debug\DebugException;
class Memcached extends Root implements CacheInterface
{
private $mcInstances = array();
private $persistentIDs = array();
private $timeout = 150;
private $section = 'memcached';
private $node = 'servers';
private $tagName = '';
private $prefix = '';
private $persistentID = 'hood.cache';
private $childNodes = 'hosts';
public function __construct($prefix = '', $persistentID = 'hood.cache')
{
parent::__construct();
$this->prefix = $prefix;
$this->persistentIDs[] = $this->persistentID = $persistentID;
}
/**
* 设置子节点
* @param $childNode
* @return $this
*/
public function setChildNodes($childNode)
{
$this->childNodes = $childNode;
return $this;
}
/**
* 设置前缀
* @param $prefix
* @return $this
*/
public function setPrefix($prefix)
{
$this->prefix = $prefix;
return $this;
}
/**
* 设置共享连接ID
* @param $persistentID
* @return $this
*/
public function setPersistentID($persistentID)
{
$this->persistentID = $persistentID;
return $this;
}
/**
* @param $persistentID
* @return \Memcached
* @throws \Hood\Debug\DebugException
*/
private function init()
{
if (isset($this->mcInstances[$this->persistentID])) {
$mc = $this->mcInstances[$this->persistentID];
} else {
$instance = new \Memcached();
$instance->setOption(\Memcached::OPT_PREFIX_KEY, $this->prefix);
$instance->setOption(\Memcached::OPT_DISTRIBUTION, \Memcached::DISTRIBUTION_CONSISTENT); // 开启一致性哈希 取模(默认)/ 一致性
$instance->setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true);//ketama算法兼容 设置为md5并且分布算法将会 采用带有权重的一致性hash分布
$instance->setOption(\Memcached::OPT_CONNECT_TIMEOUT, $this->timeout);
if (count($instance->getServerList()) < 1) {
$server = $this->getServerHost('cache');
$_serverHosts = $server->getServerConfig($this->section, $this->node);
if (empty($_serverHosts[$this->childNodes])) {
throw new DebugException('Memcache Host Config is Null.');
}
$mcServers = $this->_makeHosts($server->getServer($_serverHosts[$this->childNodes], 2));
$instance->addServers($mcServers);
unset($mcServers);
}
$this->mcInstances[$this->persistentID] = $mc = $instance;
}
return $mc;
}
/**
* 设置mc配置的块
* @param $section
* @return $this
*/
public function setSection($section)
{
$this->section = $section;
return $this;
}
/**
* 设置mc配置的块节点
* @param $node
* @return $this
*/
public function setNode($node = null)
{
if ($node != null) $this->node = $node;
return $this;
}
/**
* 组织host
* @param array $hosts
* @return array
*/
private function _makeHosts(array $hosts)
{
$_server = array();
foreach ($hosts as $key => $val) {
$_server[] = explode(':', $val);
}
return $_server;
}
/**
* 构建tag
* @param bool $mode
* @return string
*/
private function _makeTag($mode = false)
{
if (empty($this->tagName)) return '';
$_tagVal = $this->init()->get($this->tagName);
if (empty($_tagVal) && $mode == true) {
$_tagVal = md5(microtime() . mt_rand() . uniqid());
$this->init()->set($this->tagName, $_tagVal, 0);
}
unset($this->tagName);
return empty($_tagVal) ? '' : $_tagVal . '.';
}
/**
* 检索一个元素
* @param $key
* @param callable $cache_cb
* @param float $cas_token
* @return mixed
*/
public function get($key, $cacheCb = null, &$casToken = null)
{
return $this->init()->get($this->_makeTag() . $key, $cacheCb, $casToken);
}
public function getBy($key, $cacheCb = null, &$casToken = null)
{
return $this->init()->get($key, $cacheCb, $casToken);
}
/**
* 向一个新的key下面增加一个元素
* @param $key
* @param $value
* @param $expiration
* @return bool
*/
public function add($key, $value, $expiration = 0)
{
return $this->init()->add($this->_makeTag(true) . $key, $value, $expiration);
}
/**
* 向已存在元素后追加数据
* @param $key
* @param $value
* @return bool
*/
public function append($key, $value)
{
return $this->init()->append($this->_makeTag(true) . $key, $value);
}
/**
* 比较并交换值
* @param $casToken
* @param $key
* @param $value
* @param int $expiration
* @return bool
*/
public function cas($casToken, $key, $value, $expiration = 0)
{
return $this->init()->cas($casToken, $this->_makeTag(true) . $key, $value, $expiration);
}
/**
* 减小数值元素的值
* @param $key
* @param int $offset
* @return int
*/
public function decrement($key, $offset = 1)
{
return $this->init()->decrement($this->_makeTag() . $key, $offset);
}
/**
* @param $key
* @param int $time
* @return bool
*/
public function delete($key, $time = 0)
{
return $this->init()->delete($this->_makeTag() . $key, $time);
}
/**
* 删除多个数据
* @param array $keys
* @param int $time
* @return bool
*/
public function deleteMulti(array $keys, $time = 0)
{
return $this->init()->deleteMulti($this->_makeMultiKey($keys), $time);
}
/**
* 组合多key 数据
* @param $keys
* @return array
*/
private function _makeMultiKey($keys, $mode = false)
{
$_keys = array();
$tag = $this->_makeTag($mode);
foreach ($keys as $key) {
$_keys[] = $tag . $key;
}
return $_keys;
}
/**
* 请求多个元素
* @param array $keys
* @param null $withCas
* @param callable $valueCb
* @return bool
*/
public function getDelayed(array $keys, $withCas = null, callable $valueCb = null)
{
return $this->init()->getDelayed($this->_makeMultiKey($keys), $withCas, $valueCb);
}
/**
* 抓取所有剩余的结果
* @return array
*/
public function fetchAll()
{
return $this->init()->fetchAll();
}
/**
* 检索多个元素
* @param array $keys
* @param array $cas_tokens
* @param null $flags
* @return mixed
*/
public function getMulti(array $keys, array &$casTokens = null, $flags = null)
{
return $this->init()->getMulti($this->_makeMultiKey($keys), $casTokens, $flags);
}
/**
* 增加数值元素的值
* @param $key
* @param int $offset
* @param int $initialValue
* @param int $expiry
* @return int
*/
public function increment($key, $offset = 1, $initialValue = 0, $expiry = 0)
{
return $this->init()->increment($this->_makeTag() . $key, $offset, $initialValue, $expiry);
}
/**
* 检查memcache是否长连接
* @return bool
*/
public function isPersistent()
{
return $this->init()->isPersistent();
}
/**
* 设置
* @param $key
* @param $value
* @param int $expiration
* @return bool
*/
public function set($key, $value, $expiration = 0)
{
return $this->init()->set($this->_makeTag(true) . $key, $value, $expiration);
}
/**
* 设置多个数据
* @param array $items
* @param int $expiration
* @return bool
*/
public function setMulti(array $items, $expiration = 0)
{
$_items = array();
$tag = $this->_makeTag(true);
foreach ($items as $key => $val) {
$_items[$tag . $key] = $val;
}
return $this->init()->setMulti($_items, $expiration);
}
/**
* 设置tag
* @param $tagName
* @return $this
*/
public function tag($tagName)
{
$this->tagName = $tagName;
return $this;
}
/**
* 清除服务列表
* @return $this
*/
public function resetServerList()
{
$this->init()->resetServerList();
return $this;
}
}
\ No newline at end of file
... ...
[memcached]
master.hosts=127.0.0.1:11212,127.0.0.1:11213
slave.hosts=127.0.0.1:11212,127.0.0.1:11213
session.hosts=127.0.0.1:11212,127.0.0.1:11213
[redis]
[memcached]
master.hosts=127.0.0.1:12111
slave.hosts=127.0.0.1:12111
session.hosts=127.0.0.1:12111
[redis]
servers.hosts = 127.0.0.1:6379
\ No newline at end of file
... ...
... ... @@ -12,7 +12,7 @@ defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'preview');
define('EXHIBITION_TICKET', 51335912);//展览票skn
define('USE_INTER_FACE_SHUNT', false);//分流开关
define('USE_INTER_FACE_SHUNT', true);//分流开关
define('API_URL', 'http://api.yoho.yohoops.org/');
define('SERVICE_URL', 'http://service.yoho.yohoops.org/');
... ...
... ... @@ -12,7 +12,7 @@ defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'production');
define('EXHIBITION_TICKET', 51335912);//展览票skn
define('USE_INTER_FACE_SHUNT', false);//分流开关
define('USE_INTER_FACE_SHUNT', true);//分流开关
define('API_URL', 'http://api.yoho.yohoops.org/');
define('SERVICE_URL', 'http://service.yoho.yohoops.org/');
... ...