Commit 93fda0b3 by 肖康

Merge branch 'master' of http://119.23.72.7/sunlong_v5/note-library

# Conflicts:
#	.env
parents e01ad276 e6c192c5
APP_ENV=production
APP_DEBUG=true
DING_ALERT=true
APP_KEY=fasyzIUunp4HcLBudUmkMnDc5H4Z4rNW
DB_HOST=192.168.2.232
DB_DATABASE=ichuntcms
DB_USERNAME=ichuntcms
DB_PASSWORD=ichuntcms#zsyM
DB_PORT=3306
DB_WEB_HOST=192.168.2.232
DB_WEB_DATABASE=liexin
DB_WEB_USERNAME=liexin
DB_WEB_PASSWORD=liexin#zsyM
DB_PORT=3306
DB_LABEL_HOST=192.168.2.232
DB_LABEL_DATABASE=lie_labels
DB_LABEL_USERNAME=lie_labels
DB_LABEL_PASSWORD=lie_labels#zsyM
DB_PORT=3306
DB_MONGO_HOST=192.168.1.237
DB_MONGO_DATABASE=ichunt
DB_MONGO_USERNAME=ichunt
DB_MONGO_PASSWORD=huntmon6699
DB_MONGO_PORT=27017
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
REDIS_HOST=192.168.1.235
REDIS_PASSWORD=icDb29mLy2s
REDIS_PORT=6379
REDIS_READ_HOST=192.168.1.237
REDIS_READ_PASSWORD=icDb29mLy2s
REDIS_READ_PORT=6379
RABBITMQ_HOST=192.168.2.232
RABBITMQ_PORT=5672
RABBITMQ_VHOST=/
RABBITMQ_LOGIN=guest
RABBITMQ_PASSWORD=guest
MAIL_DRIVER=smtp
MAIL_HOST='smtp.exmail.qq.com'
MAIL_PORT=25
MAIL_FROM='系统管理员'
MAIL_USERNAME='admin-it@teshehui.com'
MAIL_PASSWORD='Admin$_it$_tsh$_k031iQk0'
MAIL_ENCRYPTION=tls
ADMIN=liuzhiyong@teshehui.com
LOGIN_DOMAIN='user.liexin.net'
ERP_SUPPLY_DOMAIN=http://192.168.1.235:6888
ERP_SUPPLY_DB_NAME=demo
\ No newline at end of file
......@@ -11,6 +11,7 @@ use App\Model\TmplRelationsModel;
Class AjaxController extends Controller
{
public $erp;
// 统一入口
public function entrance(Request $request, $id)
{
......@@ -90,12 +91,42 @@ Class AjaxController extends Controller
if($tmpl){
$tmpl->status = ($tmpl->status == -1) ? 1 :-1;
$tmpl->save();
//此处推送到erp
$a = $this->erp->createIssueLabel(1,"测试模板0001","田超",1);
dump($a);
return $this->ajaxReturn(0,"修改成功");
}else{
return $this->ajaxReturn(-1,"没找到与自己对应的模板");
}
}
/*
* 模板列表修改状态
*/
public function edit_template_info($request){
$id = $request->input("id",0);
$template_name = $request->input("template_name",'');
if(!$template_name){
return $this->ajaxReturn(-1,"模板名称必填");
}
$tmpl = TemplateListModel::where("create_userid",$request->user->userId)->find(intval($id));
if(!$tmpl){
return $this->ajaxReturn(-1,"没找到与自己对应的模板");
}
$tmpl->template_name = $template_name;
$tmpl->save();
//此处推送到erp
return $this->ajaxReturn(0,"修改成功");
}
protected function ajaxReturn($code,$msg="",$data=[]){
return [
......@@ -105,4 +136,17 @@ Class AjaxController extends Controller
];
}
protected function pushTemplateErp(){
try{
//登录
$soap = new \SoapClient(env("ERP_SUPPLY_DOMAIN").'/ormrpc/services/EASLogin?wsdl');
$res = $soap->login('PT', '123456', 'eas', env('ERP_SUPPLY_DB_NAME'), 'L2', 1, 'BaseDB');
//接口
$this->erp = new \SoapClient(ENV("ERP_SUPPLY_DOMAIN").'/ormrpc/services/WSIchuntjKFacade?wsdl');
}catch(\Exception $e){
}
}
}
\ No newline at end of file
......@@ -8,6 +8,8 @@ use App\Http\Controllers\Controller;
use DB;
use App\Model\TemplateListModel;
use App\Model\NodesModel;
use DNS1D;
use DNS2D;
class WebController extends Controller
{
......@@ -80,6 +82,26 @@ class WebController extends Controller
return view('web', $info);
}
public function design($request,$info){
// echo DNS1D::getBarcodeSVG('4445645656', 'PHARMA2T');
// echo DNS1D::getBarcodeHTML('4445645656', 'PHARMA2T',"2","10");
// echo '<img src="data:image/png,' . DNS1D::getBarcodePNG('4', 'C39+') . '" alt="barcode" />';
// echo DNS1D::getBarcodePNGPath('4445645656', 'PHARMA2T');
// echo '<img src="data:image/png;base64,' . DNS1D::getBarcodePNG('4', 'C39+') . '" alt="barcode" />';
// exit;
echo DNS1D::getBarcodeSVG("4445645656", "C39","1","20");
echo DNS2D::getBarcodeHTML("4445645656", "QRCODE","3","3");
// echo DNS2D::getBarcodePNGPath("4445645656", "PDF417");
// echo DNS2D::getBarcodeSVG("4445645656", "DATAMATRIX");
// echo '<img src="data:image/png;base64,' . DNS2D::getBarcodePNG("4", "PDF417") . '" alt="barcode" />';
exit;
$info['title'] = '标签设计';
return view('web', $info);
}
}
......@@ -14,7 +14,8 @@
"redgo/monitor-ding": "0.2",
"hprose/hprose": "^2.0",
"php-amqplib/php-amqplib": "2.7",
"jenssegers/mongodb": "3.2.*"
"jenssegers/mongodb": "3.2.*",
"milon/barcode": "5.1"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
......
......@@ -160,6 +160,7 @@ return [
App\Providers\RouteServiceProvider::class,
Redgo\MonitorDing\MonitorDingServiceProvider::class,
Jenssegers\Mongodb\MongodbServiceProvider::class,
Milon\Barcode\BarcodeServiceProvider::class,
],
......@@ -211,6 +212,8 @@ return [
'Debugbar' => Barryvdh\Debugbar\Facade::class,
'MonitorDing' => Redgo\MonitorDing\Facades\MonitorDing::class,
'Mongo' => Jenssegers\Mongodb\MongodbServiceProvider::class,
'DNS1D' => Milon\Barcode\Facades\DNS1DFacade::class,
'DNS2D' => Milon\Barcode\Facades\DNS2DFacade::class,
],
];
......@@ -35,4 +35,6 @@
],
],
];
......@@ -22,7 +22,7 @@ layui.use(['form', 'table', 'laydate'], function(){
}
,cols: [[ //表头
{title: 'ID',field:"id", type: 'numbers',fixed: 'left', width: 80}
,{field: 'template_name', title: '模板名称'}
,{field: 'template_name', title: '模板名称(可点击修改)',edit: 'text'}
,{field: 'status', title: '状态',templet:"#status"}
,{field: 'create_username', title: '创建人'}
,{field: 'create_time', title: '创建时间', sort: true}
......@@ -49,7 +49,7 @@ layui.use(['form', 'table', 'laydate'], function(){
return false;
});
var enable_tool = function (title,url,datax){
var enable_tool = function (title,content,url,datax){
layer.open({
title: title,
content: content,
......@@ -95,17 +95,30 @@ layui.use(['form', 'table', 'laydate'], function(){
content = '确定启用该模板?';
url = '/ajax/template_status';
datax = {id:data.id,status:data.status}
enable_tool(title,url,datax);
enable_tool(title,content,url,datax);
}else if (layEvent == "forbid"){
title = '禁用模板';
content = '确定禁用该模板?';
url = '/ajax/template_status';
datax = {id:data.id,status:data.status}
enable_tool(title,url,datax);
enable_tool(title,content,url,datax);
}
})
//监听单元格编辑
table.on('edit(list)', function(obj){
var value = obj.value //得到修改后的值
,data = obj.data //得到所在行所有键值
,field = obj.field; //得到字段
title = '修改模板名称';
content = '确定修改模板名称?';
url = '/ajax/edit_template_info';
console.log(obj.data)
enable_tool(title,content,url,obj.data)
});
});
\ No newline at end of file
......@@ -15,13 +15,16 @@ layui.use(['form', 'table', 'laydate'], function(){
elem: '#list'
,url: '/ajax/record' //数据接口
,method:'post'
,defaultToolbar:[]
,toolbar: '#toolbarDemo'
,cellMinWidth: 80 //全局定义常规单元格的最小宽度
,page: true //开启分页
,where: {
model_id: $('input[name=model_id]').val()
}
,cols: [[ //表头
{title: '序号',field:"id", type: 'numbers',fixed: 'left', width: 80}
{title: '序号',field:"id", type: 'checkbox',fixed: 'left', width: 80},
{title: '序号',field:"id", type: 'number',fixed: 'left', width: 80}
,{field: 'template_name', title: '模板名称'}
,{field: 'sale_order_sn', title: '销售单号'}
,{field: 'goods_type', title: '型号'}
......@@ -108,6 +111,23 @@ layui.use(['form', 'table', 'laydate'], function(){
})
//工具栏事件
table.on('toolbar(list)', function(obj){
var checkStatus = table.checkStatus(obj.config.id);
switch(obj.event){
case 'getCheckData':
var data = checkStatus.data;
layer.alert(JSON.stringify(data));
break;
case 'getCheckLength':
var data = checkStatus.data;
layer.msg('选中了:'+ data.length + ' 个');
break;
case 'isAll':
layer.msg(checkStatus.isAll ? '全选': '未全选')
break;
};
});
});
\ No newline at end of file
......@@ -44,18 +44,21 @@
</div>
</div>
</form>
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<button class="layui-btn layui-btn-sm" lay-event="getCheckData">打印</button>
</div>
</script>
<table id="list" lay-filter="list"></table>
<script type="text/html" id="action">
<a class="btn btn-xs btn-outline btn-info" lay-event="offline">离线使用</a>
<a class="btn btn-xs btn-outline btn-success" lay-event="show">预览</a>
<a class="btn btn-xs btn-outline btn-success" href="/web/editLabel?t_id=@{{ d.id }}" target="_blank">编辑</a>
@{{# if (d.status == -1) { }}
<a class="btn btn-xs btn-outline layui-btn-primary" lay-event="enable">启用</a>
@{{# }else{ }}
<a class="btn btn-xs btn-outline btn-info" lay-event="forbid">禁用</a>
@{{# } }}
<a class="btn btn-xs btn-outline btn-info" lay-event="offline">预览</a>
<a class="btn btn-xs btn-outline btn-success" href="/web/editLabel?t_id=@{{ d.id }}" target="_blank">下载</a>
{{--@{{# if (d.status == -1) { }}--}}
{{--<a class="btn btn-xs btn-outline layui-btn-primary" lay-event="enable">启用</a>--}}
{{--@{{# }else{ }}--}}
{{--<a class="btn btn-xs btn-outline btn-info" lay-event="forbid">禁用</a>--}}
{{--@{{# } }}--}}
</script>
<script type="text/html" id="status">
......
This diff could not be displayed because it is too large.
......@@ -9,6 +9,7 @@ return array(
'UpdateHelper\\' => array($vendorDir . '/kylekatarnls/update-helper/src'),
'PHPExcel' => array($vendorDir . '/phpoffice/phpexcel/Classes'),
'Mockery' => array($vendorDir . '/mockery/mockery/library'),
'Milon\\Barcode' => array($vendorDir . '/milon/barcode/src'),
'Maatwebsite\\Excel\\' => array($vendorDir . '/maatwebsite/excel/src'),
'Jenssegers\\Mongodb' => array($vendorDir . '/jenssegers/mongodb/src'),
'JakubOnderka\\PhpConsoleHighlighter' => array($vendorDir . '/jakub-onderka/php-console-highlighter/src'),
......
This diff could not be displayed because it is too large.
......@@ -1457,6 +1457,63 @@
]
},
{
"name": "milon/barcode",
"version": "5.1.0",
"version_normalized": "5.1.0.0",
"source": {
"type": "git",
"url": "https://github.com/milon/barcode.git",
"reference": "a3e2c3f43c60020d2f5ace8ce69ccb97dea187c4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/milon/barcode/zipball/a3e2c3f43c60020d2f5ace8ce69ccb97dea187c4",
"reference": "a3e2c3f43c60020d2f5ace8ce69ccb97dea187c4",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"illuminate/support": "5.*",
"php": ">=5.4.0"
},
"time": "2016-01-13T04:20:49+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-0": {
"Milon\\Barcode": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-3.0"
],
"authors": [
{
"name": "Nuruzzaman Milon",
"email": "contact@milon.im"
}
],
"description": "Barcode generator like Qr Code , PDF417,C39, C39+,C39E,C39E+,C93,S25,S25+,I25,I25+,C128,C128A,C128B,C128C,2-Digits UPC-Based Extention,5-Digits UPC-Based Extention,EAN 8,EAN 13,UPC-A,UPC-E,MSI (Variation of Plessey code) ",
"keywords": [
"CODABAR",
"CODE 128",
"CODE 39",
"barcode",
"datamatrix",
"ean",
"laravel",
"pdf417",
"qr code",
"qrcode"
]
},
{
"name": "mockery/mockery",
"version": "0.9.11",
"version_normalized": "0.9.11.0",
......@@ -4055,17 +4112,17 @@
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.15.0",
"version_normalized": "1.15.0.0",
"version": "v1.16.0",
"version_normalized": "1.16.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14"
"reference": "1aab00e39cebaef4d8652497f46c15c1b7e45294"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1aab00e39cebaef4d8652497f46c15c1b7e45294",
"reference": "1aab00e39cebaef4d8652497f46c15c1b7e45294",
"shasum": "",
"mirrors": [
{
......@@ -4080,11 +4137,11 @@
"suggest": {
"ext-ctype": "For best performance"
},
"time": "2020-02-27T09:26:54+00:00",
"time": "2020-05-08T16:50:20+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-master": "1.16-dev"
}
},
"installation-source": "dist",
......@@ -4121,17 +4178,17 @@
},
{
"name": "symfony/polyfill-intl-idn",
"version": "v1.15.0",
"version_normalized": "1.15.0.0",
"version": "v1.16.0",
"version_normalized": "1.16.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf"
"reference": "ab0af41deab94ec8dceb3d1fb408bdd038eba4dc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf",
"reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ab0af41deab94ec8dceb3d1fb408bdd038eba4dc",
"reference": "ab0af41deab94ec8dceb3d1fb408bdd038eba4dc",
"shasum": "",
"mirrors": [
{
......@@ -4148,11 +4205,11 @@
"suggest": {
"ext-intl": "For best performance"
},
"time": "2020-03-09T19:04:49+00:00",
"time": "2020-05-08T16:50:20+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-master": "1.16-dev"
}
},
"installation-source": "dist",
......@@ -4191,17 +4248,17 @@
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.15.0",
"version_normalized": "1.15.0.0",
"version": "v1.16.0",
"version_normalized": "1.16.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac"
"reference": "a54881ec0ab3b2005c406aed0023c062879031e7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a54881ec0ab3b2005c406aed0023c062879031e7",
"reference": "a54881ec0ab3b2005c406aed0023c062879031e7",
"shasum": "",
"mirrors": [
{
......@@ -4216,11 +4273,11 @@
"suggest": {
"ext-mbstring": "For best performance"
},
"time": "2020-03-09T19:04:49+00:00",
"time": "2020-05-08T16:50:20+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-master": "1.16-dev"
}
},
"installation-source": "dist",
......@@ -4258,17 +4315,17 @@
},
{
"name": "symfony/polyfill-php56",
"version": "v1.15.0",
"version_normalized": "1.15.0.0",
"version": "v1.16.0",
"version_normalized": "1.16.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php56.git",
"reference": "d51ec491c8ddceae7dca8dd6c7e30428f543f37d"
"reference": "14b55b0e88c67c6a14526799abaea197dde78911"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/d51ec491c8ddceae7dca8dd6c7e30428f543f37d",
"reference": "d51ec491c8ddceae7dca8dd6c7e30428f543f37d",
"url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/14b55b0e88c67c6a14526799abaea197dde78911",
"reference": "14b55b0e88c67c6a14526799abaea197dde78911",
"shasum": "",
"mirrors": [
{
......@@ -4281,11 +4338,11 @@
"php": ">=5.3.3",
"symfony/polyfill-util": "~1.0"
},
"time": "2020-03-09T19:04:49+00:00",
"time": "2020-05-08T16:50:20+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-master": "1.16-dev"
}
},
"installation-source": "dist",
......@@ -4322,17 +4379,17 @@
},
{
"name": "symfony/polyfill-php72",
"version": "v1.15.0",
"version_normalized": "1.15.0.0",
"version": "v1.16.0",
"version_normalized": "1.16.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "37b0976c78b94856543260ce09b460a7bc852747"
"reference": "42fda6d7380e5c940d7f68341ccae89d5ab9963b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747",
"reference": "37b0976c78b94856543260ce09b460a7bc852747",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/42fda6d7380e5c940d7f68341ccae89d5ab9963b",
"reference": "42fda6d7380e5c940d7f68341ccae89d5ab9963b",
"shasum": "",
"mirrors": [
{
......@@ -4344,11 +4401,11 @@
"require": {
"php": ">=5.3.3"
},
"time": "2020-02-27T09:26:54+00:00",
"time": "2020-05-08T17:28:34+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-master": "1.16-dev"
}
},
"installation-source": "dist",
......@@ -4385,17 +4442,17 @@
},
{
"name": "symfony/polyfill-util",
"version": "v1.15.0",
"version_normalized": "1.15.0.0",
"version": "v1.16.0",
"version_normalized": "1.16.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-util.git",
"reference": "d8e76c104127675d0ea3df3be0f2ae24a8619027"
"reference": "fa1fdaf94e8a60932d8821692eb1ed07efc52db2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-util/zipball/d8e76c104127675d0ea3df3be0f2ae24a8619027",
"reference": "d8e76c104127675d0ea3df3be0f2ae24a8619027",
"url": "https://api.github.com/repos/symfony/polyfill-util/zipball/fa1fdaf94e8a60932d8821692eb1ed07efc52db2",
"reference": "fa1fdaf94e8a60932d8821692eb1ed07efc52db2",
"shasum": "",
"mirrors": [
{
......@@ -4407,11 +4464,11 @@
"require": {
"php": ">=5.3.3"
},
"time": "2020-03-02T11:55:35+00:00",
"time": "2020-05-02T14:56:09+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-master": "1.16-dev"
}
},
"installation-source": "dist",
......@@ -4846,17 +4903,17 @@
},
{
"name": "vlucas/phpdotenv",
"version": "v2.6.3",
"version_normalized": "2.6.3.0",
"version": "v2.6.4",
"version_normalized": "2.6.4.0",
"source": {
"type": "git",
"url": "https://github.com/vlucas/phpdotenv.git",
"reference": "df4c4d08a639be4ef5d6d1322868f9e477553679"
"reference": "67d472b1794c986381a8950e4958e1adb779d561"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/df4c4d08a639be4ef5d6d1322868f9e477553679",
"reference": "df4c4d08a639be4ef5d6d1322868f9e477553679",
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/67d472b1794c986381a8950e4958e1adb779d561",
"reference": "67d472b1794c986381a8950e4958e1adb779d561",
"shasum": "",
"mirrors": [
{
......@@ -4866,7 +4923,7 @@
]
},
"require": {
"php": ">=5.3.9",
"php": "^5.3.9 || ^7.0 || ^8.0",
"symfony/polyfill-ctype": "^1.9"
},
"require-dev": {
......@@ -4878,7 +4935,7 @@
"ext-filter": "Required to use the boolean validator.",
"ext-pcre": "Required to use most of the library."
},
"time": "2020-04-12T15:11:38+00:00",
"time": "2020-05-02T13:38:00+00:00",
"type": "library",
"extra": {
"branch-alias": {
......@@ -4897,9 +4954,14 @@
],
"authors": [
{
"name": "Graham Campbell",
"email": "graham@alt-three.com",
"homepage": "https://gjcampbell.co.uk/"
},
{
"name": "Vance Lucas",
"email": "vance@vancelucas.com",
"homepage": "http://www.vancelucas.com"
"homepage": "https://vancelucas.com/"
}
],
"description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.",
......
......@@ -13,14 +13,34 @@ use Symfony\Polyfill\Ctype as p;
if (!function_exists('ctype_alnum')) {
function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
}
if (!function_exists('ctype_alpha')) {
function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
}
if (!function_exists('ctype_cntrl')) {
function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
}
if (!function_exists('ctype_digit')) {
function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
}
if (!function_exists('ctype_graph')) {
function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
}
if (!function_exists('ctype_lower')) {
function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
}
if (!function_exists('ctype_print')) {
function ctype_print($text) { return p\Ctype::ctype_print($text); }
}
if (!function_exists('ctype_punct')) {
function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
}
if (!function_exists('ctype_space')) {
function ctype_space($text) { return p\Ctype::ctype_space($text); }
}
if (!function_exists('ctype_upper')) {
function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
}
if (!function_exists('ctype_xdigit')) {
function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
}
......@@ -28,7 +28,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-master": "1.16-dev"
}
}
}
......@@ -127,6 +127,10 @@ final class Idn
private static function encodePart($input)
{
if (\substr($input, 0, 1) === '-' || \substr($input, -1) === '-') {
return false;
}
$codePoints = self::listCodePoints($input);
$n = 128;
......
......@@ -11,51 +11,127 @@
use Symfony\Polyfill\Intl\Idn as p;
if (!defined('IDNA_DEFAULT')) {
if (!defined('U_IDNA_PROHIBITED_ERROR')) {
define('U_IDNA_PROHIBITED_ERROR', 66560);
}
if (!defined('U_IDNA_ERROR_START')) {
define('U_IDNA_ERROR_START', 66560);
}
if (!defined('U_IDNA_UNASSIGNED_ERROR')) {
define('U_IDNA_UNASSIGNED_ERROR', 66561);
}
if (!defined('U_IDNA_CHECK_BIDI_ERROR')) {
define('U_IDNA_CHECK_BIDI_ERROR', 66562);
}
if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) {
define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563);
}
if (!defined('U_IDNA_ACE_PREFIX_ERROR')) {
define('U_IDNA_ACE_PREFIX_ERROR', 66564);
}
if (!defined('U_IDNA_VERIFICATION_ERROR')) {
define('U_IDNA_VERIFICATION_ERROR', 66565);
}
if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) {
define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566);
}
if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) {
define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567);
}
if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) {
define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568);
}
if (!defined('U_IDNA_ERROR_LIMIT')) {
define('U_IDNA_ERROR_LIMIT', 66569);
}
if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) {
define('U_STRINGPREP_PROHIBITED_ERROR', 66560);
}
if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) {
define('U_STRINGPREP_UNASSIGNED_ERROR', 66561);
}
if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) {
define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562);
}
if (!defined('IDNA_DEFAULT')) {
define('IDNA_DEFAULT', 0);
}
if (!defined('IDNA_ALLOW_UNASSIGNED')) {
define('IDNA_ALLOW_UNASSIGNED', 1);
}
if (!defined('IDNA_USE_STD3_RULES')) {
define('IDNA_USE_STD3_RULES', 2);
}
if (!defined('IDNA_CHECK_BIDI')) {
define('IDNA_CHECK_BIDI', 4);
}
if (!defined('IDNA_CHECK_CONTEXTJ')) {
define('IDNA_CHECK_CONTEXTJ', 8);
}
if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) {
define('IDNA_NONTRANSITIONAL_TO_ASCII', 16);
}
if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) {
define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32);
}
if (!defined('INTL_IDNA_VARIANT_2003')) {
define('INTL_IDNA_VARIANT_2003', 0);
}
if (!defined('INTL_IDNA_VARIANT_UTS46')) {
define('INTL_IDNA_VARIANT_UTS46', 1);
}
if (!defined('IDNA_ERROR_EMPTY_LABEL')) {
define('IDNA_ERROR_EMPTY_LABEL', 1);
}
if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) {
define('IDNA_ERROR_LABEL_TOO_LONG', 2);
}
if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) {
define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4);
}
if (!defined('IDNA_ERROR_LEADING_HYPHEN')) {
define('IDNA_ERROR_LEADING_HYPHEN', 8);
}
if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) {
define('IDNA_ERROR_TRAILING_HYPHEN', 16);
}
if (!defined('IDNA_ERROR_HYPHEN_3_4')) {
define('IDNA_ERROR_HYPHEN_3_4', 32);
}
if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) {
define('IDNA_ERROR_LEADING_COMBINING_MARK', 64);
}
if (!defined('IDNA_ERROR_DISALLOWED')) {
define('IDNA_ERROR_DISALLOWED', 128);
}
if (!defined('IDNA_ERROR_PUNYCODE')) {
define('IDNA_ERROR_PUNYCODE', 256);
}
if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) {
define('IDNA_ERROR_LABEL_HAS_DOT', 512);
}
if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) {
define('IDNA_ERROR_INVALID_ACE_LABEL', 1024);
}
if (!defined('IDNA_ERROR_BIDI')) {
define('IDNA_ERROR_BIDI', 2048);
}
if (!defined('IDNA_ERROR_CONTEXTJ')) {
define('IDNA_ERROR_CONTEXTJ', 4096);
}
if (!function_exists('idn_to_ascii')) {
if (PHP_VERSION_ID < 70400) {
if (PHP_VERSION_ID < 70400) {
if (!function_exists('idn_to_ascii')) {
function idn_to_ascii($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_2003, &$idna_info = array()) { return p\Idn::idn_to_ascii($domain, $options, $variant, $idna_info); }
}
if (!function_exists('idn_to_utf8')) {
function idn_to_utf8($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_2003, &$idna_info = array()) { return p\Idn::idn_to_utf8($domain, $options, $variant, $idna_info); }
} else {
}
} else {
if (!function_exists('idn_to_ascii')) {
function idn_to_ascii($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = array()) { return p\Idn::idn_to_ascii($domain, $options, $variant, $idna_info); }
}
if (!function_exists('idn_to_utf8')) {
function idn_to_utf8($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = array()) { return p\Idn::idn_to_utf8($domain, $options, $variant, $idna_info); }
}
}
......@@ -30,7 +30,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-master": "1.16-dev"
}
}
}
......@@ -13,52 +13,125 @@ use Symfony\Polyfill\Mbstring as p;
if (!defined('MB_CASE_UPPER')) {
define('MB_CASE_UPPER', 0);
}
if (!defined('MB_CASE_LOWER')) {
define('MB_CASE_LOWER', 1);
}
if (!defined('MB_CASE_TITLE')) {
define('MB_CASE_TITLE', 2);
}
if (!function_exists('mb_strlen')) {
if (!function_exists('mb_convert_encoding')) {
function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); }
}
if (!function_exists('mb_decode_mimeheader')) {
function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); }
}
if (!function_exists('mb_encode_mimeheader')) {
function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); }
}
if (!function_exists('mb_decode_numericentity')) {
function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); }
}
if (!function_exists('mb_encode_numericentity')) {
function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); }
}
if (!function_exists('mb_convert_case')) {
function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); }
}
if (!function_exists('mb_internal_encoding')) {
function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); }
}
if (!function_exists('mb_language')) {
function mb_language($lang = null) { return p\Mbstring::mb_language($lang); }
}
if (!function_exists('mb_list_encodings')) {
function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
}
if (!function_exists('mb_encoding_aliases')) {
function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
}
if (!function_exists('mb_check_encoding')) {
function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); }
}
if (!function_exists('mb_detect_encoding')) {
function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); }
}
if (!function_exists('mb_detect_order')) {
function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); }
}
if (!function_exists('mb_parse_str')) {
function mb_parse_str($s, &$result = array()) { parse_str($s, $result); }
}
if (!function_exists('mb_strlen')) {
function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); }
}
if (!function_exists('mb_strpos')) {
function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); }
}
if (!function_exists('mb_strtolower')) {
function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); }
}
if (!function_exists('mb_strtoupper')) {
function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); }
}
if (!function_exists('mb_substitute_character')) {
function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); }
}
if (!function_exists('mb_substr')) {
function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); }
}
if (!function_exists('mb_stripos')) {
function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); }
}
if (!function_exists('mb_stristr')) {
function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); }
}
if (!function_exists('mb_strrchr')) {
function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); }
}
if (!function_exists('mb_strrichr')) {
function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); }
}
if (!function_exists('mb_strripos')) {
function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); }
}
if (!function_exists('mb_strrpos')) {
function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); }
}
if (!function_exists('mb_strstr')) {
function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); }
}
if (!function_exists('mb_get_info')) {
function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
}
if (!function_exists('mb_http_output')) {
function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); }
}
if (!function_exists('mb_strwidth')) {
function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); }
}
if (!function_exists('mb_substr_count')) {
function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); }
}
if (!function_exists('mb_output_handler')) {
function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); }
}
if (!function_exists('mb_http_input')) {
function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); }
}
if (!function_exists('mb_convert_variables')) {
function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); }
}
if (!function_exists('mb_chr')) {
if (!function_exists('mb_ord')) {
function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); }
}
if (!function_exists('mb_chr')) {
function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); }
}
if (!function_exists('mb_scrub')) {
function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
}
if (!function_exists('mb_str_split')) {
function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); }
}
......@@ -28,7 +28,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-master": "1.16-dev"
}
}
}
......@@ -17,6 +17,8 @@ if (PHP_VERSION_ID < 50600) {
}
if (extension_loaded('ldap') && !defined('LDAP_ESCAPE_FILTER')) {
define('LDAP_ESCAPE_FILTER', 1);
}
if (extension_loaded('ldap') && !defined('LDAP_ESCAPE_DN')) {
define('LDAP_ESCAPE_DN', 2);
}
......
......@@ -26,7 +26,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-master": "1.16-dev"
}
}
}
......@@ -95,7 +95,8 @@ final class Php72
return;
}
return self::$hashMask ^ hexdec(substr($hash, 16 - \PHP_INT_SIZE, \PHP_INT_SIZE));
// On 32-bit systems, PHP_INT_SIZE is 4,
return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1)));
}
public static function sapi_windows_vt100_support($stream, $enable = null)
......@@ -166,7 +167,7 @@ final class Php72
self::$hashMask = (int) substr(ob_get_clean(), 17);
}
self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - \PHP_INT_SIZE, \PHP_INT_SIZE));
self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1)));
}
public static function mb_chr($code, $encoding = null)
......
......@@ -16,6 +16,7 @@ Moved to core since 7.2 (was in the optional XML extension earlier):
- [`utf8_decode`](https://php.net/utf8_decode)
Also, it provides a constant added to PHP 7.2:
- [`PHP_FLOAT_*`](https://php.net/reserved.constants#constant.php-float-dig)
- [`PHP_OS_FAMILY`](https://php.net/reserved.constants#constant.php-os-family)
More information can be found in the
......
......@@ -12,6 +12,22 @@
use Symfony\Polyfill\Php72 as p;
if (PHP_VERSION_ID < 70200) {
if (!defined('PHP_FLOAT_DIG')) {
define('PHP_FLOAT_DIG', 15);
}
if (!defined('PHP_FLOAT_EPSILON')) {
define('PHP_FLOAT_EPSILON', 2.2204460492503E-16);
}
if (!defined('PHP_FLOAT_MIN')) {
define('PHP_FLOAT_MIN', 2.2250738585072E-308);
}
if (!defined('PHP_FLOAT_MAX')) {
define('PHP_FLOAT_MAX', 1.7976931348623157E+308);
}
if (!defined('PHP_OS_FAMILY')) {
define('PHP_OS_FAMILY', p\Php72::php_os_family());
}
if ('\\' === DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) {
function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); }
}
......@@ -20,17 +36,20 @@ if (PHP_VERSION_ID < 70200) {
}
if (!function_exists('utf8_encode')) {
function utf8_encode($s) { return p\Php72::utf8_encode($s); }
}
if (!function_exists('utf8_decode')) {
function utf8_decode($s) { return p\Php72::utf8_decode($s); }
}
if (!function_exists('spl_object_id')) {
function spl_object_id($s) { return p\Php72::spl_object_id($s); }
}
if (!defined('PHP_OS_FAMILY')) {
define('PHP_OS_FAMILY', p\Php72::php_os_family());
if (!function_exists('mb_ord')) {
function mb_ord($s, $enc = null) { return p\Php72::mb_ord($s, $enc); }
}
if (!function_exists('mb_chr')) {
function mb_ord($s, $enc = null) { return p\Php72::mb_ord($s, $enc); }
function mb_chr($code, $enc = null) { return p\Php72::mb_chr($code, $enc); }
}
if (!function_exists('mb_scrub')) {
function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
}
}
......@@ -25,7 +25,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-master": "1.16-dev"
}
}
}
......@@ -24,7 +24,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
"dev-master": "1.16-dev"
}
}
}
......@@ -2,16 +2,21 @@
"name": "vlucas/phpdotenv",
"description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.",
"keywords": ["env", "dotenv", "environment"],
"license" : "BSD-3-Clause",
"authors" : [
"license": "BSD-3-Clause",
"authors": [
{
"name": "Graham Campbell",
"email": "graham@alt-three.com",
"homepage": "https://gjcampbell.co.uk/"
},
{
"name": "Vance Lucas",
"email": "vance@vancelucas.com",
"homepage": "http://www.vancelucas.com"
"homepage": "https://vancelucas.com/"
}
],
"require": {
"php": ">=5.3.9",
"php": "^5.3.9 || ^7.0 || ^8.0",
"symfony/polyfill-ctype": "^1.9"
},
"require-dev": {
......@@ -28,6 +33,10 @@
"ext-filter": "Required to use the boolean validator.",
"ext-pcre": "Required to use most of the library."
},
"config": {
"preferred-install": "dist",
"platform-check": false
},
"extra": {
"branch-alias": {
"dev-master": "2.6-dev"
......
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 sign in to comment