Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08891b36aa | ||
|
|
455d68d2b4 | ||
|
|
37ea64346c | ||
|
|
09e693cb74 | ||
|
|
8394c9780c | ||
|
|
a5b404298b | ||
|
|
ab48082bb8 | ||
|
|
9094434c16 | ||
|
|
ddb971e41e | ||
|
|
a8b3befca9 | ||
|
|
e5bed62ca9 | ||
|
|
76b8a59f39 | ||
|
|
4dbe30bb2b | ||
|
|
adcfcaa1ef | ||
|
|
da32f0067a | ||
|
|
19be0c4560 | ||
|
|
f6e53746b2 | ||
|
|
9cd40b213d | ||
|
|
ed69eb5d7b | ||
|
|
ed95d5e933 |
+6
-1
@@ -6,12 +6,17 @@
|
||||
"GPL-2.0-or-later",
|
||||
"proprietary"
|
||||
],
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.3"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"brandonwamboldt/utilphp": "^1.1",
|
||||
"sergeytsalkov/meekrodb": "^2.3",
|
||||
"league/plates": "^3.3",
|
||||
"guzzlehttp/guzzle": "^6.3",
|
||||
"leafo/scssphp": "^0.7.5",
|
||||
"scssphp/scssphp": "^1.0",
|
||||
"monolog/monolog": "^1.23",
|
||||
"firephp/firephp-core": "^0.4.0",
|
||||
"vlucas/valitron": "^1.4",
|
||||
|
||||
Generated
+200
-123
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "3fceaf3c2925068c7e757ab12036e29e",
|
||||
"content-hash": "b5b5695ed0b1b04fa672f99972d8caad",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brandonwamboldt/utilphp",
|
||||
@@ -54,16 +54,16 @@
|
||||
},
|
||||
{
|
||||
"name": "catfan/medoo",
|
||||
"version": "v1.5.7",
|
||||
"version": "v1.7.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/catfan/Medoo.git",
|
||||
"reference": "8d90cba0e8ff176028847527d0ea76fe41a06ecf"
|
||||
"reference": "dd9d570584cfb1e09ec470608479b86e41d5b60d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/catfan/Medoo/zipball/8d90cba0e8ff176028847527d0ea76fe41a06ecf",
|
||||
"reference": "8d90cba0e8ff176028847527d0ea76fe41a06ecf",
|
||||
"url": "https://api.github.com/repos/catfan/Medoo/zipball/dd9d570584cfb1e09ec470608479b86e41d5b60d",
|
||||
"reference": "dd9d570584cfb1e09ec470608479b86e41d5b60d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -77,7 +77,7 @@
|
||||
"ext-pdo_oci8": "For Oracle version 8 database",
|
||||
"ext-pdo_pqsql": "For PostgreSQL database",
|
||||
"ext-pdo_sqlite": "For SQLite database",
|
||||
"ext-pdo_sqlsrv": "For MSSQL database"
|
||||
"ext-pdo_sqlsrv": "For MSSQL database on both Window/Liunx platform"
|
||||
},
|
||||
"type": "framework",
|
||||
"autoload": {
|
||||
@@ -95,10 +95,11 @@
|
||||
"email": "angel@catfan.me"
|
||||
}
|
||||
],
|
||||
"description": "The lightest PHP database framework to accelerate development",
|
||||
"description": "The lightweight PHP database framework to accelerate development",
|
||||
"homepage": "https://medoo.in",
|
||||
"keywords": [
|
||||
"database",
|
||||
"database library",
|
||||
"lightweight",
|
||||
"mariadb",
|
||||
"mssql",
|
||||
@@ -109,27 +110,27 @@
|
||||
"sql",
|
||||
"sqlite"
|
||||
],
|
||||
"time": "2018-06-14T18:59:08+00:00"
|
||||
"time": "2019-12-19T05:04:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ezyang/htmlpurifier",
|
||||
"version": "v4.10.0",
|
||||
"version": "v4.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ezyang/htmlpurifier.git",
|
||||
"reference": "d85d39da4576a6934b72480be6978fb10c860021"
|
||||
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d85d39da4576a6934b72480be6978fb10c860021",
|
||||
"reference": "d85d39da4576a6934b72480be6978fb10c860021",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/a617e55bc62a87eec73bd456d146d134ad716f03",
|
||||
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"simpletest/simpletest": "^1.1"
|
||||
"simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -142,7 +143,7 @@
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL"
|
||||
"LGPL-2.1-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
@@ -156,7 +157,7 @@
|
||||
"keywords": [
|
||||
"html"
|
||||
],
|
||||
"time": "2018-02-23T01:58:20+00:00"
|
||||
"time": "2019-10-28T03:44:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "firephp/firephp-core",
|
||||
@@ -196,44 +197,46 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "6.3.3",
|
||||
"version": "6.5.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
|
||||
"reference": "43ece0e75098b7ecd8d13918293029e555a50f82"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82",
|
||||
"reference": "43ece0e75098b7ecd8d13918293029e555a50f82",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.4",
|
||||
"guzzlehttp/psr7": "^1.6.1",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
|
||||
"psr/log": "^1.0"
|
||||
"psr/log": "^1.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
|
||||
"psr/log": "Required for using the Log middleware"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "6.3-dev"
|
||||
"dev-master": "6.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\": "src/"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
@@ -257,7 +260,7 @@
|
||||
"rest",
|
||||
"web service"
|
||||
],
|
||||
"time": "2018-04-22T15:46:56+00:00"
|
||||
"time": "2019-12-23T11:57:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
@@ -312,32 +315,37 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.4.2",
|
||||
"version": "1.6.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
|
||||
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
|
||||
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"psr/http-message": "~1.0"
|
||||
"psr/http-message": "~1.0",
|
||||
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/http-message-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
"ext-zlib": "*",
|
||||
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
|
||||
},
|
||||
"suggest": {
|
||||
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
"dev-master": "1.6-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -367,65 +375,14 @@
|
||||
"keywords": [
|
||||
"http",
|
||||
"message",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response",
|
||||
"stream",
|
||||
"uri",
|
||||
"url"
|
||||
],
|
||||
"time": "2017-03-20T17:10:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "leafo/scssphp",
|
||||
"version": "v0.7.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/leafo/scssphp.git",
|
||||
"reference": "1d656f8c02a3a69404bba6b28ec4e06edddf0f49"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/leafo/scssphp/zipball/1d656f8c02a3a69404bba6b28ec4e06edddf0f49",
|
||||
"reference": "1d656f8c02a3a69404bba6b28ec4e06edddf0f49",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.6",
|
||||
"squizlabs/php_codesniffer": "~2.5"
|
||||
},
|
||||
"bin": [
|
||||
"bin/pscss"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Leafo\\ScssPhp\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Leaf Corcoran",
|
||||
"email": "leafot@gmail.com",
|
||||
"homepage": "http://leafo.net"
|
||||
}
|
||||
],
|
||||
"description": "scssphp is a compiler for SCSS written in PHP.",
|
||||
"homepage": "http://leafo.github.io/scssphp/",
|
||||
"keywords": [
|
||||
"css",
|
||||
"less",
|
||||
"sass",
|
||||
"scss",
|
||||
"stylesheet"
|
||||
],
|
||||
"time": "2018-07-22T01:22:08+00:00"
|
||||
"time": "2019-07-01T23:21:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/plates",
|
||||
@@ -484,16 +441,16 @@
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "1.23.0",
|
||||
"version": "1.25.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Seldaek/monolog.git",
|
||||
"reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4"
|
||||
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
|
||||
"reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fa82921994db851a8becaf3787a9e73c5976b6f1",
|
||||
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -558,7 +515,7 @@
|
||||
"logging",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2017-06-19T01:22:40+00:00"
|
||||
"time": "2019-12-20T14:15:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pguardiario/phpuri",
|
||||
@@ -720,16 +677,16 @@
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
|
||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -738,7 +695,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
"dev-master": "1.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -763,7 +720,108 @@
|
||||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2016-10-10T12:19:37+00:00"
|
||||
"time": "2019-11-01T11:05:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ralouphie/getallheaders",
|
||||
"version": "3.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ralouphie/getallheaders.git",
|
||||
"reference": "120b605dfeb996808c31b6477290a714d356e822"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
|
||||
"reference": "120b605dfeb996808c31b6477290a714d356e822",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpunit/phpunit": "^5 || ^6.5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/getallheaders.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ralph Khattar",
|
||||
"email": "ralph.khattar@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A polyfill for getallheaders.",
|
||||
"time": "2019-03-08T08:55:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "scssphp/scssphp",
|
||||
"version": "1.0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/scssphp/scssphp.git",
|
||||
"reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/5b3c9d704950d8f9637f5110c36c281ec47dc13c",
|
||||
"reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-json": "*",
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3",
|
||||
"squizlabs/php_codesniffer": "~2.5",
|
||||
"twbs/bootstrap": "~4.3",
|
||||
"zurb/foundation": "~6.5"
|
||||
},
|
||||
"bin": [
|
||||
"bin/pscss"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"ScssPhp\\ScssPhp\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Anthon Pang",
|
||||
"email": "apang@softwaredevelopment.ca",
|
||||
"homepage": "https://github.com/robocoder"
|
||||
},
|
||||
{
|
||||
"name": "Cédric Morin",
|
||||
"email": "cedric@yterium.com",
|
||||
"homepage": "https://github.com/Cerdic"
|
||||
}
|
||||
],
|
||||
"description": "scssphp is a compiler for SCSS written in PHP.",
|
||||
"homepage": "http://scssphp.github.io/scssphp/",
|
||||
"keywords": [
|
||||
"css",
|
||||
"less",
|
||||
"sass",
|
||||
"scss",
|
||||
"stylesheet"
|
||||
],
|
||||
"time": "2019-12-12T05:00:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sergeytsalkov/meekrodb",
|
||||
@@ -810,29 +868,34 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/lock",
|
||||
"version": "v4.1.1",
|
||||
"version": "v4.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/lock.git",
|
||||
"reference": "d508b5dd92272cb74300396ecaadde969d0f7976"
|
||||
"reference": "6c4f5b620871cfef5b004fc57f2ca74572ae03b3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/lock/zipball/d508b5dd92272cb74300396ecaadde969d0f7976",
|
||||
"reference": "d508b5dd92272cb74300396ecaadde969d0f7976",
|
||||
"url": "https://api.github.com/repos/symfony/lock/zipball/6c4f5b620871cfef5b004fc57f2ca74572ae03b3",
|
||||
"reference": "6c4f5b620871cfef5b004fc57f2ca74572ae03b3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"psr/log": "~1.0"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/dbal": "<2.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/dbal": "~2.5",
|
||||
"mongodb/mongodb": "~1.1",
|
||||
"predis/predis": "~1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.1-dev"
|
||||
"dev-master": "4.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -848,13 +911,13 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Jérémy Derussé",
|
||||
"email": "jeremy@derusse.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Lock Component",
|
||||
@@ -867,20 +930,20 @@
|
||||
"redlock",
|
||||
"semaphore"
|
||||
],
|
||||
"time": "2018-06-21T11:15:46+00:00"
|
||||
"time": "2020-01-04T13:00:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/valitron",
|
||||
"version": "v1.4.3",
|
||||
"version": "v1.4.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vlucas/valitron.git",
|
||||
"reference": "3c5463315bfa23b17f8949b100a960d035234e43"
|
||||
"reference": "a03072bed1679660200766d134507a30193eaf6d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/3c5463315bfa23b17f8949b100a960d035234e43",
|
||||
"reference": "3c5463315bfa23b17f8949b100a960d035234e43",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/a03072bed1679660200766d134507a30193eaf6d",
|
||||
"reference": "a03072bed1679660200766d134507a30193eaf6d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -916,28 +979,29 @@
|
||||
"validation",
|
||||
"validator"
|
||||
],
|
||||
"time": "2018-05-06T10:45:26+00:00"
|
||||
"time": "2019-08-29T19:49:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "xemlock/htmlpurifier-html5",
|
||||
"version": "v0.1.7",
|
||||
"version": "v0.1.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/xemlock/htmlpurifier-html5.git",
|
||||
"reference": "b4b35e51ec75e0207c23035f7d9a354bdcdac359"
|
||||
"reference": "f0d563f9fd4a82a3d759043483f9a94c0d8c2255"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/xemlock/htmlpurifier-html5/zipball/b4b35e51ec75e0207c23035f7d9a354bdcdac359",
|
||||
"reference": "b4b35e51ec75e0207c23035f7d9a354bdcdac359",
|
||||
"url": "https://api.github.com/repos/xemlock/htmlpurifier-html5/zipball/f0d563f9fd4a82a3d759043483f9a94c0d8c2255",
|
||||
"reference": "f0d563f9fd4a82a3d759043483f9a94c0d8c2255",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ezyang/htmlpurifier": "^4.7",
|
||||
"ezyang/htmlpurifier": "^4.8",
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "4.7.*|5.7.*"
|
||||
"php-coveralls/php-coveralls": "^1.1|^2.1",
|
||||
"phpunit/phpunit": ">=4.7 <8.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -955,8 +1019,18 @@
|
||||
"email": "xemlock@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "HTML Purifier definitions for HTML5 elements",
|
||||
"time": "2018-06-07T14:30:17+00:00"
|
||||
"description": "HTML5 element definitions for HTML Purifier",
|
||||
"keywords": [
|
||||
"HTML5",
|
||||
"Purifier",
|
||||
"html",
|
||||
"htmlpurifier",
|
||||
"security",
|
||||
"tidy",
|
||||
"validator",
|
||||
"xss"
|
||||
],
|
||||
"time": "2019-08-07T17:19:21+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
@@ -966,5 +1040,8 @@
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": []
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "7.3"
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -115,6 +115,32 @@
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
/*미니체 지도*/
|
||||
.map_theme_miniche_clean.map_spring .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche_clean.map_summer .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche_clean.map_fall .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche_clean.map_winter .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
.map_theme_miniche_clean .map_bgroad{
|
||||
background: url('_tK_gameImagePath_/map/che/miniche_road.png') no-repeat;
|
||||
background-size: 700px 500px;
|
||||
}
|
||||
|
||||
/*루드라사움 지도*/
|
||||
.map_theme_ludo_rathowm .map_bglayer1{
|
||||
background: url('_tK_gameImagePath_/map/ludo_rathowm/back.jpg') no-repeat;
|
||||
|
||||
+15
-3
@@ -271,6 +271,11 @@ function myNationInfo() {
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$nation = MYDB_fetch_array($result);
|
||||
|
||||
if(!$nation){
|
||||
$nation = getNationStaticInfo(0);
|
||||
$nation['tech'] = 0;
|
||||
}
|
||||
|
||||
$query = "select COUNT(*) as cnt, SUM(pop) as totpop, SUM(pop2) as maxpop from city where nation='{$nation['nation']}'"; // 도시 이름 목록
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$city = MYDB_fetch_array($result);
|
||||
@@ -341,6 +346,7 @@ function myNationInfo() {
|
||||
|
||||
$techCall = getTechCall($nation['tech']);
|
||||
|
||||
|
||||
if(TechLimit($admin['startyear'], $admin['year'], $nation['tech'])) { $nation['tech'] = "<font color=magenta>{$nation['tech']}</font>"; }
|
||||
else { $nation['tech'] = "<font color=limegreen>{$nation['tech']}</font>"; }
|
||||
|
||||
@@ -588,6 +594,8 @@ function commandTable() {
|
||||
addCommand("첩보(통솔경험, 자금$develcost3, 군량$develcost3)", 31);
|
||||
addCommand("징병(통솔경험)", 11);
|
||||
addCommand("모병(통솔경험, 자금x2)", 12);
|
||||
addCommand("무작위 징병(통솔경험)", 18);
|
||||
addCommand("무작위 모병(통솔경험, 자금x2)", 19);
|
||||
addCommand("훈련(통솔경험)", 13);
|
||||
addCommand("사기진작(통솔경험, 자금↓)", 14);
|
||||
//addCommand("전투태세/3턴(통솔경험, 자금↓)", 15);
|
||||
@@ -596,6 +604,8 @@ function commandTable() {
|
||||
addCommand("첩보(통솔경험, 자금$develcost3, 군량$develcost3)", 31, 0);
|
||||
addCommand("징병(통솔경험)", 11, 0);
|
||||
addCommand("모병(통솔경험, 자금x2)", 12, 0);
|
||||
addCommand("무작위 징병(통솔경험)", 18, 0);
|
||||
addCommand("무작위 모병(통솔경험, 자금x2)", 19, 0);
|
||||
addCommand("훈련(통솔경험)", 13, 0);
|
||||
addCommand("사기진작(통솔경험, 자금↓)", 14, 0);
|
||||
//addCommand("전투태세/3턴(통솔경험, 자금↓)", 15, 0);
|
||||
@@ -657,6 +667,8 @@ function commandTable() {
|
||||
}
|
||||
commandGroup("", 1);
|
||||
commandGroup("======= 개 인 ========");
|
||||
addCommand("내정 특기 초기화/3턴", 38);
|
||||
addCommand("전투 특기 초기화/3턴", 39);
|
||||
if($me['level'] >= 1) {
|
||||
addCommand("단련(자금$develcost, 군량$develcost)", 41);
|
||||
addCommand("숙련전환(통솔경험, 자금$develcost, 군량$develcost)", 58);
|
||||
@@ -794,9 +806,9 @@ function CoreCommandTable() {
|
||||
commandGroup("====== 특 수 ======");
|
||||
addCommand("초토화", 65, $valid);
|
||||
addCommand("천도/3턴(금쌀{$develcost}0)", 66, $valid);
|
||||
$cost = $develcost * 500 + 60000; // 7만~13만
|
||||
addCommand("증축/6턴(금쌀{$cost})", 67, $valid);
|
||||
addCommand("감축/6턴", 68, $valid);
|
||||
$cost = $develcost * GameConst::$expandCityCostCoef + GameConst::$expandCityDefaultCost; // 7만~13만
|
||||
addCommand("증축/3턴(금쌀{$cost})", 67, $valid);
|
||||
addCommand("감축/3턴", 68, $valid);
|
||||
commandGroup("", 1);
|
||||
commandGroup("====== 전 략 ======");
|
||||
$term = Util::round(sqrt($genCount*8)*10);
|
||||
|
||||
@@ -67,6 +67,16 @@ function getTurn(array $general, $type, $font=1) {
|
||||
$double = $command[1];
|
||||
$str[$i] = "【{$third}】 {$double}00명 모병";
|
||||
break;
|
||||
case 18: //무작위 징병
|
||||
$third = GameUnitConst::byID($command[2])->name;
|
||||
$double = $command[1];
|
||||
$str[$i] = "【{$third}】 {$double}00명 무작위 징병";
|
||||
break;
|
||||
case 19: //무작위 모병
|
||||
$third = GameUnitConst::byID($command[2])->name;
|
||||
$double = $command[1];
|
||||
$str[$i] = "【{$third}】 {$double}00명 무작위 모병";
|
||||
break;
|
||||
case 13: //훈련
|
||||
$str[$i] = "훈련";
|
||||
break;
|
||||
@@ -170,6 +180,13 @@ function getTurn(array $general, $type, $font=1) {
|
||||
$str[$i] = "【{$city['name']}】에 선동 실행";
|
||||
break;
|
||||
|
||||
case 38: //내특 초기화
|
||||
$str[$i] = "내정 특기를 초기화";
|
||||
break;
|
||||
case 39: //전특 초기화
|
||||
$str[$i] = "전투 특기를 초기화";
|
||||
break;
|
||||
|
||||
case 41: //단련
|
||||
$str[$i] = "숙련도를 단련";
|
||||
break;
|
||||
@@ -607,6 +624,9 @@ function processCommand($no, $reduceTurn) {
|
||||
case 16: process_16($general); break; //전쟁
|
||||
case 17: process_17($general); break; //소집해제
|
||||
|
||||
case 18: process_18($general, 1); break; //징병
|
||||
case 19: process_18($general, 2); break; //모병
|
||||
|
||||
case 21: process_21($general); break; //이동
|
||||
case 22: process_22($general); break; //등용
|
||||
case 25: process_25($general); break; //임관
|
||||
@@ -621,6 +641,9 @@ function processCommand($no, $reduceTurn) {
|
||||
case 34: process_34($general); break; //파괴
|
||||
case 35: process_35($general); break; //선동
|
||||
|
||||
case 38: process_38($general, '내정 특기', 'special', 'specage'); break; //내특 초기화
|
||||
case 39: process_38($general, '전투 특기', 'special2', 'specage2'); break; //내특 초기화
|
||||
|
||||
case 41: process_41($general); break; //단련
|
||||
case 42: process_42($general); break; //견문
|
||||
case 43: process_43($general); break; //증여
|
||||
|
||||
+55
-20
@@ -162,15 +162,17 @@ function SetCrew($no, $nationID, $personal, $gold, $leader, $genType, $tech, $de
|
||||
$cities = [];
|
||||
$regions = [];
|
||||
|
||||
foreach($db->queryAllLists('SELECT city, region FROM city WHERE nation = %i', $nationID) as [$cityID, $regionID]){
|
||||
$cities[$cityID] = true;
|
||||
$regions[$regionID] = true;
|
||||
foreach(CityConst::all() as $city){
|
||||
$cities[$city->id] = 1;
|
||||
$regions[$city->region] = 1;
|
||||
}
|
||||
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
[$startyear, $year] = $gameStor->getValuesAsArray(['startyear', 'year']);
|
||||
$relYear = Util::valueFit($year-$startyear, 0);
|
||||
|
||||
$chosenCrewType = null;
|
||||
$maxCost = 0;
|
||||
switch($genType) {
|
||||
case 0: //무장
|
||||
case 2: //무내정장
|
||||
@@ -193,28 +195,52 @@ function SetCrew($no, $nationID, $personal, $gold, $leader, $genType, $tech, $de
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$types = [];
|
||||
switch($sel) {
|
||||
case 0:
|
||||
foreach(GameUnitConst::byType(GameUnitConst::T_FOOTMAN) as $crewtype){
|
||||
if($crewtype->isValid($cities, $regions, $relYear, $tech)){
|
||||
$types[] = $crewtype->id;
|
||||
if(!$crewtype->isValid($cities, $regions, $relYear, $tech)){
|
||||
continue;
|
||||
}
|
||||
if($chosenCrewType === null){
|
||||
$chosenCrewType = $crewtype->id;
|
||||
$maxCost = $crewtype->cost;
|
||||
}
|
||||
|
||||
if($maxCost < $crewtype->cost){
|
||||
$chosenCrewType = $crewtype->id;
|
||||
$maxCost = $crewtype->cost;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
foreach(GameUnitConst::byType(GameUnitConst::T_ARCHER) as $crewtype){
|
||||
if($crewtype->isValid($cities, $regions, $relYear, $tech)){
|
||||
$types[] = $crewtype->id;
|
||||
if(!$crewtype->isValid($cities, $regions, $relYear, $tech)){
|
||||
continue;
|
||||
}
|
||||
if($chosenCrewType === null){
|
||||
$chosenCrewType = $crewtype->id;
|
||||
$maxCost = $crewtype->cost;
|
||||
}
|
||||
|
||||
if($maxCost < $crewtype->cost){
|
||||
$chosenCrewType = $crewtype->id;
|
||||
$maxCost = $crewtype->cost;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
foreach(GameUnitConst::byType(GameUnitConst::T_CAVALRY) as $crewtype){
|
||||
if($crewtype->isValid($cities, $regions, $relYear, $tech)){
|
||||
$types[] = $crewtype->id;
|
||||
if(!$crewtype->isValid($cities, $regions, $relYear, $tech)){
|
||||
continue;
|
||||
}
|
||||
if($chosenCrewType === null){
|
||||
$chosenCrewType = $crewtype->id;
|
||||
$maxCost = $crewtype->cost;
|
||||
}
|
||||
|
||||
if($maxCost < $crewtype->cost){
|
||||
$chosenCrewType = $crewtype->id;
|
||||
$maxCost = $crewtype->cost;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -223,19 +249,28 @@ function SetCrew($no, $nationID, $personal, $gold, $leader, $genType, $tech, $de
|
||||
case 1: //지장
|
||||
case 3: //지내정장
|
||||
foreach(GameUnitConst::byType(GameUnitConst::T_WIZARD) as $crewtype){
|
||||
if($crewtype->isValid($cities, $regions, $relYear, $tech)){
|
||||
$types[] = $crewtype->id;
|
||||
if(!$crewtype->isValid($cities, $regions, $relYear, $tech)){
|
||||
continue;
|
||||
}
|
||||
if($chosenCrewType === null){
|
||||
$chosenCrewType = $crewtype->id;
|
||||
$maxCost = $crewtype->cost;
|
||||
}
|
||||
|
||||
if($maxCost < $crewtype->cost){
|
||||
$chosenCrewType = $crewtype->id;
|
||||
$maxCost = $crewtype->cost;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if($types){
|
||||
if(!$allowedAction->randomRecruit && in_array($currentCrewType, $types) && ($currentCrewType != GameUnitConst::DEFAULT_CREWTYPE && $currentCrewType != $types[0])){
|
||||
if($chosenCrewType){
|
||||
if(!$allowedAction->randomRecruit && $currentCrewType != GameUnitConst::DEFAULT_CREWTYPE){
|
||||
$type = $currentCrewType;
|
||||
}
|
||||
else{
|
||||
$type = Util::choiceRandom($types);
|
||||
$type = $chosenCrewType;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -254,10 +289,10 @@ function SetCrew($no, $nationID, $personal, $gold, $leader, $genType, $tech, $de
|
||||
if($leader < $crew) { $crew = $leader; }
|
||||
|
||||
if($allowedAction->recruit_high && $crew * $cost * 6 < $gold){
|
||||
$command = EncodeCommand(0, $type, $crew, 12);
|
||||
$command = EncodeCommand(0, $type, $crew, 19);
|
||||
}
|
||||
else{
|
||||
$command = EncodeCommand(0, $type, $crew, 11);
|
||||
$command = EncodeCommand(0, $type, $crew, 18);
|
||||
}
|
||||
|
||||
$query = "update general set turn0='$command' where no='$no'";
|
||||
@@ -1006,7 +1041,7 @@ function processAI($no, &$reduce_turn) {
|
||||
$cityCnt = $db->queryFirstField('SELECT count(city) FROM city WHERE nation=%i AND supply=1', $general['nation']);
|
||||
$citySelect = Util::randRangeInt(0, Util::toInt($cityCnt/5));
|
||||
|
||||
$selCity = $db->queryFirstField('SELECT city, ,(def+wall)/(def2+wall2) as dev from city where nation=%i and supply=1 order by dev limit %i,1',$general['nation'], $citySelect);
|
||||
$selCity = $db->queryFirstField('SELECT city, (def+wall)/(def2+wall2) as dev from city where nation=%i and supply=1 order by dev limit %i,1',$general['nation'], $citySelect);
|
||||
}
|
||||
|
||||
if($general['city'] != $selCity) {
|
||||
|
||||
@@ -1077,6 +1077,188 @@ function process_11(&$general, $type) {
|
||||
$actLog->pushGeneralActionLog($log, ActionLogger::RAWTEXT);
|
||||
}
|
||||
|
||||
|
||||
function process_18(&$general, $type) {
|
||||
if($type == 1){
|
||||
$type = '무작위 징병';
|
||||
}
|
||||
else{
|
||||
$type = '무작위 모병';
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
if($type === '무작위 징병') {
|
||||
$defaultatmos = GameConst::$defaultAtmosLow;
|
||||
$defaulttrain = GameConst::$defaultTrainLow;
|
||||
}
|
||||
else {
|
||||
$defaultatmos = GameConst::$defaultAtmosHigh;
|
||||
$defaulttrain = GameConst::$defaultTrainHigh;
|
||||
}
|
||||
|
||||
[$startyear, $year, $month] = $gameStor->getValuesAsArray(['startyear', 'year', 'month']);
|
||||
|
||||
$actLog = new ActionLogger($general['no'], $general['nation'], $year, $month);
|
||||
|
||||
$command = DecodeCommand($general['turn0']);
|
||||
$crewType = $command[2];
|
||||
$rawCrew = $command[1];
|
||||
|
||||
$ownCities = [];
|
||||
$ownRegions = [];
|
||||
[$year, $startyear] = $gameStor->getValuesAsArray(['year','startyear']);
|
||||
|
||||
$relativeYear = $year - $startyear;
|
||||
|
||||
foreach(CityConst::all() as $city){
|
||||
$ownCities[$city->id] = 1;
|
||||
$ownRegions[$city->region] = 1;
|
||||
}
|
||||
|
||||
$srcCrewType = GameUnitConst::byID($general['crewtype']);
|
||||
$dstCrewType = GameUnitConst::byID($crewType);
|
||||
|
||||
if($dstCrewType === null){
|
||||
$actLog->pushGeneralActionLog("병종 코드 에러. $type 실패. <1>$date</>");
|
||||
return;
|
||||
}
|
||||
|
||||
if($srcCrewType->armType != $dstCrewType->armType){
|
||||
$general['crew'] = 0;
|
||||
$general['train'] = $defaulttrain;
|
||||
$general['atmos'] = $defaultatmos;
|
||||
}
|
||||
|
||||
if($general['crew'] != 0) {
|
||||
$dtype = "추가".$type;
|
||||
}
|
||||
else {
|
||||
$dtype = $type;
|
||||
}
|
||||
|
||||
if(!$general['nation']){
|
||||
$actLog->pushGeneralActionLog("재야입니다. $dtype 실패. <1>$date</>");
|
||||
return;
|
||||
}
|
||||
|
||||
$city = $db->queryFirstRow('SELECT * FROM city WHERE city = %i', $general['city']);
|
||||
|
||||
if($city['nation'] != $general['nation']){
|
||||
$actLog->pushGeneralActionLog("아국이 아닙니다. $dtype 실패. <1>$date</>");
|
||||
return;
|
||||
}
|
||||
|
||||
[$nationLevel, $tech] = $db->queryFirstList('SELECT `level`,tech FROM nation WHERE nation=%i', $general['nation']);
|
||||
|
||||
$candidateList = [];
|
||||
foreach(GameUnitConst::byType($dstCrewType->armType) as $crewTypeCandidate){
|
||||
if(!$crewTypeCandidate->isValid($ownCities, $ownRegions, $relativeYear, $tech)){
|
||||
continue;
|
||||
}
|
||||
$candidateList[$crewTypeCandidate->id] = $crewTypeCandidate->reqTech + 1000;
|
||||
}
|
||||
|
||||
$crewTypeObj = GameUnitConst::byID(Util::choiceRandomUsingWeight($candidateList));
|
||||
|
||||
$lbonus = setLeadershipBonus($general, $nationLevel);
|
||||
|
||||
//NOTE: 입력 변수는 100명 단위임
|
||||
$crew = $rawCrew * 100;
|
||||
if($crew + $general['crew'] > getGeneralLeadership($general, true, true, true)*100) {
|
||||
$crew = max(0, getGeneralLeadership($general, true, true, true) * 100 - $general['crew']);
|
||||
}
|
||||
|
||||
if($crew <= 0) {
|
||||
$actLog->pushGeneralActionLog("더이상 $dtype 할 수 없습니다. $dtype 실패. <1>$date</>");
|
||||
return;
|
||||
}
|
||||
|
||||
$cost = $crewTypeObj->costWithTech($tech, $crew);
|
||||
if($type === '무작위 모병') {
|
||||
$cost *= 2;
|
||||
}
|
||||
//성격 보정
|
||||
$cost = Util::round(CharCost($cost, $general['personal']));
|
||||
|
||||
//특기 보정 : 징병, 보병, 궁병, 기병, 귀병, 공성
|
||||
if($general['special2'] == 72) { $cost *= 0.5; }
|
||||
else if($general['special2'] == 50 && $crewTypeObj->armType == GameUnitConstBase::T_FOOTMAN) { $cost *= 0.9; }
|
||||
else if($general['special2'] == 51 && $crewTypeObj->armType == GameUnitConstBase::T_ARCHER) { $cost *= 0.9; }
|
||||
else if($general['special2'] == 52 && $crewTypeObj->armType == GameUnitConstBase::T_CAVALRY) { $cost *= 0.9; }
|
||||
else if($general['special2'] == 40 && $crewTypeObj->armType == GameUnitConstBase::T_WIZARD) { $cost *= 0.9; }
|
||||
else if($general['special2'] == 53 && $crewTypeObj->armType == GameUnitConstBase::T_SIEGE) { $cost *= 0.9; }
|
||||
|
||||
if($general['gold'] < $cost){
|
||||
$actLog->pushGeneralActionLog("자금이 모자랍니다. $dtype 실패. <1>$date</>");
|
||||
return;
|
||||
}
|
||||
|
||||
if($general['rice'] < $crew / 100) {
|
||||
$actLog->pushGeneralActionLog("군량이 모자랍니다. $dtype 실패. <1>$date</>");
|
||||
return;
|
||||
}
|
||||
|
||||
if($city['pop']-30000 < $crew) { // 주민 30000명 이상만 가능
|
||||
$actLog->pushGeneralActionLog("주민이 모자랍니다. $dtype 실패. <1>$date</>");
|
||||
return;
|
||||
}
|
||||
if($city['rate'] < 20) {
|
||||
$actLog->pushGeneralActionLog("민심이 낮아 주민들이 도망갑니다. $dtype 실패. <1>$date</>");
|
||||
return;
|
||||
}
|
||||
|
||||
$josaUl = JosaUtil::pick($crewTypeObj->name, '을');
|
||||
$actLog->pushGeneralActionLog($crewTypeObj->name."{$josaUl} <C>{$crew}</>명 {$dtype}했습니다. <1>$date</>");
|
||||
$exp = Util::round($crew / 100);
|
||||
$ded = Util::round($crew / 100);
|
||||
// 숙련도 증가
|
||||
addGenDex($general['no'], GameConst::$maxAtmosByCommand, GameConst::$maxTrainByCommand, $crewType, $crew/100);
|
||||
|
||||
// 성격 보정
|
||||
$exp = CharExperience($exp, $general['personal']);
|
||||
$ded = CharDedication($ded, $general['personal']);
|
||||
|
||||
$atmos = Util::round(($general['atmos'] * $general['crew'] + $defaultatmos * $crew) / ($general['crew'] + $crew));
|
||||
$train = Util::round(($general['train'] * $general['crew'] + $defaulttrain * $crew) / ($general['crew'] + $crew));
|
||||
$general['crew'] += $crew;
|
||||
$general['gold'] -= $cost;
|
||||
// 주민수 감소 // 민심 감소
|
||||
if($type === '무작위 징병') {
|
||||
$city['rate'] -= Util::round(($crew / $city['pop'])*100);
|
||||
}
|
||||
else {
|
||||
$city['rate'] -= Util::round(($crew / 2 / $city['pop'])*100);
|
||||
}
|
||||
if($city['rate'] < 0) { $city['rate'] = 0; }
|
||||
|
||||
$db->update('city', [
|
||||
'pop'=>$db->sqleval('pop-%i', $crew),
|
||||
'rate'=>$city['rate']
|
||||
], 'city = %i', $general['city']);
|
||||
|
||||
// 통솔경험, 병종 변경, 병사수 변경, 훈련치 변경, 사기치 변경, 자금 군량 하락, 공헌도, 명성 상승
|
||||
$general['leader2']++;
|
||||
$db->update('general', [
|
||||
'resturn'=>'SUCCESS',
|
||||
'leader2'=>$general['leader2'],
|
||||
'crewtype'=>$crewTypeObj->id,
|
||||
'crew'=>$general['crew'],
|
||||
'train'=>$train,
|
||||
'atmos'=>$atmos,
|
||||
'gold'=>$general['gold'],
|
||||
'rice'=>$db->sqleval('rice - %i', Util::round($crew/100)),
|
||||
'dedication'=>$db->sqleval('dedication + %i', $ded),
|
||||
'experience'=>$db->sqleval('experience + %i', $exp)
|
||||
], 'no=%i', $general['no']);
|
||||
|
||||
checkAbilityEx($general['no'], $actLog);
|
||||
$log = uniqueItem($general, []);//TODO: uniqueItem 재 구현
|
||||
$actLog->pushGeneralActionLog($log, ActionLogger::RAWTEXT);
|
||||
}
|
||||
|
||||
function process_13(&$general) {
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
@@ -1858,6 +2040,43 @@ function process_31(&$general) {
|
||||
pushGenLog($general, $log);
|
||||
}
|
||||
|
||||
function process_38(&$general, string $specName, string $specTypeKey, string $specAgeKey) {
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
|
||||
$log = [];
|
||||
$date = substr($general['turntime'],11,5);
|
||||
|
||||
$admin = $gameStor->getValues(['year', 'month']);
|
||||
|
||||
if($general['term']%100 == 15) {
|
||||
$term = intdiv($general['term'], 100) + 1;
|
||||
$code = $term * 100 + 15;
|
||||
} else {
|
||||
$term = 1;
|
||||
$code = 100 + 15;
|
||||
}
|
||||
|
||||
if(!$general[$specTypeKey]) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:{$specName}를 갖고 있지 않습니다. {$specName} 초기화 실패. <1>$date</>";
|
||||
} elseif($term < 3) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:새로운 적성을 찾는 중... ({$term}/3) <1>$date</>";
|
||||
|
||||
$query = "update general set resturn='ONGOING',term={$code} where no='{$general['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
} else {
|
||||
|
||||
$general[$specAgeKey]=20;
|
||||
$query = "update general set resturn='SUCCESS',term='0',$specTypeKey=0,$specAgeKey=age+1 where no='{$general['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
$log[] = "<C>●</>{$admin['month']}월:새로운 {$specName}를 가질 준비가 되었습니다. <1>$date</>";
|
||||
}
|
||||
|
||||
pushGenLog($general, $log);
|
||||
}
|
||||
|
||||
function process_41(&$general) {
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
+20
-19
@@ -1074,11 +1074,11 @@ function process_67(&$general) {
|
||||
$command = DecodeCommand($nation["l{$general['level']}turn0"]);
|
||||
$which = $command[1];
|
||||
|
||||
$query = "select city,name,nation,level from city where city='$which'";
|
||||
$query = "select city,name,nation,level,front from city where city='$which'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$destcity = MYDB_fetch_array($result);
|
||||
|
||||
$amount = $admin['develcost'] * 500 + 60000; // 7만~13만
|
||||
$amount = $admin['develcost'] * GameConst::$expandCityCostCoef + GameConst::$expandCityDefaultCost; // 7만~13만
|
||||
|
||||
$code = $nation["l{$general['level']}term"];
|
||||
if($code%100 == 67) {
|
||||
@@ -1089,10 +1089,11 @@ function process_67(&$general) {
|
||||
$code = 100 + 67;
|
||||
}
|
||||
|
||||
if($nation['capital'] != $general['city']) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:수도에서 실행해야 합니다. 증축 실패. <1>$date</>";
|
||||
} elseif($nation['capital'] != $destcity['city']) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:수도만 가능합니다. 증축 실패. <1>$date</>";
|
||||
if($destcity['nation'] != $general['nation']){
|
||||
$log[] = "<C>●</>{$admin['month']}월:아군 도시가 아닙니다. 증축 실패. <1>$date</>";
|
||||
}
|
||||
else if($nation['capital'] != $destcity['city'] && $destcity['front'] == 1) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:접경 도시 증축은 수도만 가능합니다. 증축 실패. <1>$date</>";
|
||||
} elseif($destcity['level'] <= 3) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:수진, 진, 관문은 불가능합니다. 증축 실패. <1>$date</>";
|
||||
} elseif($destcity['level'] >= 8) {
|
||||
@@ -1103,8 +1104,8 @@ function process_67(&$general) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:다음 분기에 가능합니다. 증축 실패. <1>$date</>";
|
||||
} elseif($nation['gold']-GameConst::$basegold < $amount || $nation['rice']-GameConst::$baserice < $amount) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:물자가 부족합니다. 증축 실패. <1>$date</>";
|
||||
} elseif($term < 6) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:증축중... ({$term}/6) <1>$date</>";
|
||||
} elseif($term < 3) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:증축중... ({$term}/3) <1>$date</>";
|
||||
|
||||
$query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
@@ -1130,7 +1131,7 @@ function process_67(&$general) {
|
||||
$query = "update nation set l{$general['level']}term='0',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='{$general['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
//수도 증축
|
||||
//증축
|
||||
$db->update('city', [
|
||||
'upgrading'=>$db->sqleval('upgrading+1'),
|
||||
'level'=>$db->sqleval('level+1'),
|
||||
@@ -1165,7 +1166,7 @@ function process_68(&$general) {
|
||||
|
||||
$admin = $gameStor->getValues(['year','month','develcost']);
|
||||
|
||||
$query = "select nation,supply from city where city='{$general['city']}'";
|
||||
$query = "select nation,supply,front from city where city='{$general['city']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$city = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1180,7 +1181,7 @@ function process_68(&$general) {
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$destcity = MYDB_fetch_array($result);
|
||||
|
||||
$amount = $admin['develcost'] * 500 + 30000; // 4만~10만
|
||||
$amount = $admin['develcost'] * GameConst::$expandCityCostCoef + GameConst::$expandCityDefaultCost / 2; // 4만~10만
|
||||
|
||||
$code = $nation["l{$general['level']}term"];
|
||||
if($code%100 == 68) {
|
||||
@@ -1190,12 +1191,12 @@ function process_68(&$general) {
|
||||
$term = 1;
|
||||
$code = 100 + 68;
|
||||
}
|
||||
|
||||
if($nation['capital'] != $general['city']) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:수도에서 실행해야 합니다. 감축 실패. <1>$date</>";
|
||||
} elseif($nation['capital'] != $destcity['city']) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:수도만 가능합니다. 감축 실패. <1>$date</>";
|
||||
} elseif($destcity['upgrading'] <= 0) {
|
||||
if($destcity['nation'] != $general['nation']){
|
||||
$log[] = "<C>●</>{$admin['month']}월:아군 도시가 아닙니다. 감축 실패. <1>$date</>";
|
||||
}
|
||||
else if($nation['capital'] != $destcity['city'] && $destcity['front'] == 1) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:접경 도시 감축은 수도만 가능합니다. 감축 실패. <1>$date</>";
|
||||
} elseif($destcity['level'] == 5) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:증축된 도시가 아닙니다. 감축 실패. <1>$date</>";
|
||||
} elseif($destcity['level'] <= 4) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:수, 진, 관문, 이성은 불가능합니다. 감축 실패. <1>$date</>";
|
||||
@@ -1203,8 +1204,8 @@ function process_68(&$general) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:수뇌부가 아닙니다. 감축 실패. <1>$date</>";
|
||||
} elseif($nation['capset'] == 1) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:다음 분기에 가능합니다. 감축 실패. <1>$date</>";
|
||||
} elseif($term < 6) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:감축중... ({$term}/6) <1>$date</>";
|
||||
} elseif($term < 3) {
|
||||
$log[] = "<C>●</>{$admin['month']}월:감축중... ({$term}/3) <1>$date</>";
|
||||
|
||||
$query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
@@ -82,6 +82,9 @@ switch($commandtype) {
|
||||
// case 34: command_34($turn, 34); break; //파괴
|
||||
// case 35: command_35($turn, 35); break; //선동
|
||||
|
||||
case 38: command_Single($turn, 38); break; //내특 초기화
|
||||
case 39: command_Single($turn, 39); break; //전특 초기화
|
||||
|
||||
case 41: command_Single($turn, 41); break; //단련
|
||||
case 42: command_Single($turn, 42); break; //견문
|
||||
// case 43: command_43( $turn, 43); break; //증여
|
||||
|
||||
+161
-3
@@ -60,6 +60,9 @@ switch($commandtype) {
|
||||
case 16: command_16( $turn, 16); break; //전쟁
|
||||
case 17: command_Single($turn, 17); break; //소집해제
|
||||
|
||||
case 18: command_18( $turn, 18, false); break; //무작위 징병
|
||||
case 19: command_18( $turn, 19, true); break; //무작위 모병
|
||||
|
||||
case 21: command_21( $turn, 21); break; //이동
|
||||
case 22: command_22( $turn, 22); break; //등용 //TODO:등용장 재 디자인
|
||||
case 23: command_23( $turn, 23); break; //포상
|
||||
@@ -77,6 +80,9 @@ switch($commandtype) {
|
||||
case 34: command_34($turn, 34); break; //파괴
|
||||
case 35: command_35($turn, 35); break; //선동
|
||||
|
||||
case 38: command_Single($turn, 38); break; //내특 초기화
|
||||
case 39: command_Single($turn, 39); break; //전특 초기화
|
||||
|
||||
case 41: command_Single($turn, 41); break; //단련
|
||||
case 42: command_Single($turn, 42); break; //견문
|
||||
case 43: command_43( $turn, 43); break; //증여
|
||||
@@ -244,9 +250,8 @@ function command_11($turn, $command, bool $is모병 = false) {
|
||||
|
||||
foreach(GameUnitConst::byType($armType) as $unit){
|
||||
$crewObj = new \stdClass;
|
||||
if(!$unit->isValid($ownCities, $ownRegions, $relativeYear, $tech)){
|
||||
continue; //TODO: 불가능한 병종도 보여줄 필요가 있음.
|
||||
}
|
||||
$crewObj->showDefault = 'true';
|
||||
|
||||
|
||||
$crewObj->id = $unit->id;
|
||||
|
||||
@@ -256,6 +261,11 @@ function command_11($turn, $command, bool $is모병 = false) {
|
||||
else{
|
||||
$crewObj->bgcolor = 'limegreen';
|
||||
}
|
||||
|
||||
if(!$unit->isValid($ownCities, $ownRegions, $relativeYear, $tech)){
|
||||
$crewObj->showDefault = 'false';
|
||||
$crewObj->bgcolor = 'red';
|
||||
}
|
||||
|
||||
$crewObj->baseRice = $unit->rice * getTechCost($tech);
|
||||
$crewObj->baseCost = CharCost($unit->costWithTech($tech), $me['personal']);
|
||||
@@ -418,6 +428,154 @@ function command_16($turn, $command) {
|
||||
ender();
|
||||
}
|
||||
|
||||
|
||||
function command_18($turn, $command, bool $is모병 = false) {
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$me = $db->queryFirstRow(
|
||||
'SELECT no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold
|
||||
from general where owner=%i',
|
||||
$userID
|
||||
);
|
||||
|
||||
[$nationLevel, $tech] = $db->queryFirstList('SELECT level,tech FROM nation WHERE nation=%i', $me['nation']);
|
||||
if(!$nationLevel){
|
||||
$nationLevel = 0;
|
||||
}
|
||||
|
||||
if(!$tech){
|
||||
$tech = 0;
|
||||
}
|
||||
|
||||
$lbonus = setLeadershipBonus($me, $nationLevel);
|
||||
|
||||
$ownCities = [];
|
||||
$ownRegions = [];
|
||||
[$year, $startyear] = $gameStor->getValuesAsArray(['year','startyear']);
|
||||
|
||||
$relativeYear = $year - $startyear;
|
||||
|
||||
foreach(CityConst::all() as $city){
|
||||
$ownCities[$city->id] = 1;
|
||||
$ownRegions[$city->region] = 1;
|
||||
}
|
||||
|
||||
$leader = getGeneralLeadership($me, true, true, true);
|
||||
$fullLeader = getGeneralLeadership($me, false, true, true);
|
||||
$abil = getTechAbil($tech);
|
||||
|
||||
$armTypes = [];
|
||||
|
||||
|
||||
foreach(GameUnitConst::allType() as $armType => $armName){
|
||||
$armTypeCrews = [];
|
||||
|
||||
foreach(GameUnitConst::byType($armType) as $unit){
|
||||
$crewObj = new \stdClass;
|
||||
$crewObj->showDefault = 'true';
|
||||
|
||||
|
||||
$crewObj->id = $unit->id;
|
||||
|
||||
if($unit->reqTech == 0){
|
||||
$crewObj->bgcolor = 'green';
|
||||
}
|
||||
else{
|
||||
$crewObj->bgcolor = 'limegreen';
|
||||
}
|
||||
|
||||
if(!$unit->isValid($ownCities, $ownRegions, $relativeYear, $tech)){
|
||||
continue;
|
||||
}
|
||||
|
||||
$crewObj->baseRice = $unit->rice * getTechCost($tech);
|
||||
$crewObj->baseCost = CharCost($unit->costWithTech($tech), $me['personal']);
|
||||
|
||||
$armType = $unit->armType;
|
||||
if($me['special2'] == 50 && $armType == GameUnitConst::T_FOOTMAN){
|
||||
$crewObj->baseCost *= 0.9;
|
||||
}
|
||||
else if($me['special2'] == 51 && $armType == GameUnitConst::T_ARCHER){
|
||||
$crewObj->baseCost *= 0.9;
|
||||
}
|
||||
else if($me['special2'] == 52 && $armType == GameUnitConst::T_CAVALRY){
|
||||
$crewObj->baseCost *= 0.9;
|
||||
}
|
||||
else if($me['special2'] == 53 && $armType == GameUnitConst::T_WIZARD){
|
||||
$crewObj->baseCost *= 0.9;
|
||||
}
|
||||
else if($me['special2'] == 54 && $armType == GameUnitConst::T_SIEGE){
|
||||
$crewObj->baseCost *= 0.9;
|
||||
}
|
||||
else if($me['special2'] == 72) {
|
||||
$crewObj->baseCost *= 0.5;
|
||||
}
|
||||
|
||||
$crewObj->name = $unit->name;
|
||||
$crewObj->attack = $unit->attack + $abil;
|
||||
$crewObj->defence = $unit->defence + $abil;
|
||||
$crewObj->speed = $unit->speed;
|
||||
$crewObj->avoid = $unit->avoid;
|
||||
if($gameStor->show_img_level < 2) {
|
||||
$crewObj->img = ServConfig::$sharedIconPath."/default.jpg";
|
||||
}
|
||||
else{
|
||||
$crewObj->img = ServConfig::$gameImagePath."/weap".$unit->id.".png";
|
||||
}
|
||||
|
||||
$crewObj->baseRiceShort = round($crewObj->baseRice, 1);
|
||||
$crewObj->baseCostShort = round($crewObj->baseCost, 1);
|
||||
|
||||
$crewObj->info = join('<br>', $unit->info);
|
||||
|
||||
if(count($armTypeCrews) == 0){
|
||||
$armTypeCrews[] = $crewObj;
|
||||
}
|
||||
else{
|
||||
$compCrewObj = $armTypeCrews[0];
|
||||
$compCrewObj->baseRiceShort = max($crewObj->baseRiceShort, $compCrewObj->baseRiceShort);
|
||||
$compCrewObj->baseCostShort = max($crewObj->baseCostShort, $compCrewObj->baseCostShort);
|
||||
|
||||
$compCrewObj->baseRice = max($crewObj->baseRice, $compCrewObj->baseRice);
|
||||
$compCrewObj->baseCost = max($crewObj->baseCost, $compCrewObj->baseCost);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
$armTypes[] = [$armName, $armTypeCrews];
|
||||
}
|
||||
if($is모병){
|
||||
$commandName = '무작위 모병';
|
||||
starter("무작위 모병");
|
||||
}
|
||||
else{
|
||||
$commandName = '무작위 징병';
|
||||
starter("무작위 징병");
|
||||
}
|
||||
|
||||
$templates = new \League\Plates\Engine('templates');
|
||||
echo $templates->render('recruitCrewForm_rand', [
|
||||
'command'=>$command,
|
||||
'commandName'=>$commandName,
|
||||
'techLevelText'=>getTechCall($tech),
|
||||
'tech'=>$tech,
|
||||
'leader'=>$leader,
|
||||
'fullLeader'=>$fullLeader,
|
||||
'crewType'=>GameUnitConst::byId($me['crewtype'])->id,
|
||||
'crewTypeName'=>GameUnitConst::byId($me['crewtype'])->name,
|
||||
'crew'=>$me['crew'],
|
||||
'gold'=>$me['gold'],
|
||||
'turn'=>$turn,
|
||||
'armTypes'=>$armTypes,
|
||||
]);
|
||||
|
||||
|
||||
ender();
|
||||
}
|
||||
|
||||
|
||||
function command_21($turn, $command) {
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
@@ -82,6 +82,10 @@ class GameConstBase
|
||||
public static $expandCityDevelIncreaseAmount = 2000;
|
||||
/** @var int 증축시 성벽 증가량 */
|
||||
public static $expandCityWallIncreaseAmount = 2000;
|
||||
/** @var int 증축시 최소 비용 */
|
||||
public static $expandCityDefaultCost = 60000;
|
||||
/** @var int 증축시 비용 계수 */
|
||||
public static $expandCityCostCoef = 500;
|
||||
|
||||
/** @var int 초기 제한시 장수 제한 */
|
||||
public static $initialNationGenLimitForRandInit = 3;
|
||||
|
||||
@@ -336,7 +336,9 @@ class GameUnitConstBase{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return \sammo\GameUnitDetail[]
|
||||
*/
|
||||
public static function byType(int $type): array{
|
||||
static::_generate();
|
||||
if(!key_exists($type, static::$constType)){
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
class CityConst extends CityConstBase{
|
||||
protected static $initCity = [
|
||||
//id, 도시, 규모, 상, 치, 성, 수,(x100)지역, x, y, 연결도시
|
||||
[1, '낙양', '소', 4163, 57, 60, 40, 61, 64, '중원', 285, 176, ['하내', '홍농', '호로']],
|
||||
[2, '성도', '소', 3247, 63, 65, 40, 65, 63, '서촉', 30, 285, ['덕양', '강주']],
|
||||
[3, '건업', '소', 3178, 56, 63, 40, 55, 59, '오월', 507, 303, ['광릉', '합비', '오']],
|
||||
[4, '업', '소', 3087, 65, 53, 40, 57, 62, '하북', 355, 135, ['하내', '거록', '남피', '제남', '진류']],
|
||||
[5, '장안', '소', 2946, 56, 63, 40, 60, 58, '서북', 162, 173, ['안정', '오장원', '한중', '홍농']],
|
||||
[6, '허창', '소', 2923, 61, 64, 40, 57, 65, '중원', 325, 218, ['호로', '진류', '초', '여남', '완']],
|
||||
[7, '양양', '소', 2903, 60, 66, 40, 55, 57, '초', 259, 295, ['신야', '강릉', '강하']],
|
||||
[8, '시상', '소', 3116, 58, 60, 40, 59, 56, '오월', 357, 357, ['적벽', '여강', '단양', '상동', '장사']],
|
||||
[9, '수춘', '소', 3061, 59, 56, 40, 59, 55, '중원', 385, 270, ['여남', '초', '하비', '합비']],
|
||||
[10, '한중', '소', 3058, 56, 61, 40, 62, 63, '서촉', 130, 218, ['무도', '오장원', '장안', '상용', '자동']],
|
||||
[11, '남피', '소', 3006, 59, 61, 40, 61, 65, '하북', 410, 93, ['계', '북평', '평원', '업', '거록']],
|
||||
[12, '위례', '소', 2953, 60, 53, 40, 58, 63, '동이', 618, 140, ['평양', '북해', '웅진', '계림']],
|
||||
[13, '북평', '소', 2921, 62, 55, 40, 63, 59, '하북', 442, 53, ['계', '요동', '남피']],
|
||||
[14, '강릉', '소', 2915, 65, 56, 40, 55, 56, '초', 245, 330, ['이릉', '양양', '적벽', '장사', '무릉']],
|
||||
[15, '완', '소', 2852, 63, 60, 40, 61, 59, '중원', 275, 235, ['허창', '여남', '신야']],
|
||||
[16, '장사', '소', 2845, 57, 59, 40, 60, 65, '초', 258, 373, ['강릉', '시상', '계양', '무릉']],
|
||||
[17, '오', '소', 3172, 57, 61, 40, 57, 56, '오월', 515, 340, ['건업', '단양', '회계', '탐라']],
|
||||
[18, '하비', '소', 3134, 65, 63, 40, 62, 58, '중원', 460, 240, ['패', '북해', '광릉', '수춘']],
|
||||
[19, '복양', '소', 3087, 60, 63, 40, 62, 60, '중원', 412, 170, ['제남', '진류', '패']],
|
||||
[20, '웅진', '소', 3073, 57, 59, 40, 58, 60, '동이', 615, 205, ['위례', '계림', '탐라']],
|
||||
[21, '강주', '소', 3058, 59, 60, 40, 64, 61, '서촉', 75, 305, ['성도', '덕양', '영안', '주제', '월수']],
|
||||
[22, '무도', '소', 3008, 57, 64, 40, 60, 65, '서촉', 55, 191, ['저', '한중', '자동']],
|
||||
[23, '국내', '소', 2986, 58, 60, 40, 63, 58, '동이', 596, 48, ['요동', '오환', '평양']],
|
||||
[24, '진류', '소', 2973, 62, 60, 40, 60, 63, '중원', 370, 175, ['업', '복양', '패', '초', '허창', '호로']],
|
||||
[25, '계양', '소', 2972, 63, 60, 40, 61, 57, '초', 242, 408, ['영릉', '장사', '상동']],
|
||||
[26, '계림', '소', 2950, 60, 54, 40, 61, 58, '동이', 660, 195, ['위례', '웅진', '왜']],
|
||||
[27, '계', '소', 2937, 55, 60, 40, 58, 61, '하북', 386, 55, ['진양', '북평', '남피']],
|
||||
[28, '무위', '소', 2932, 57, 59, 40, 63, 60, '서북', 56, 76, ['강', '안정', '천수', '저']],
|
||||
[29, '제남', '소', 2910, 57, 61, 40, 64, 57, '하북', 402, 132, ['업', '평원', '복양']],
|
||||
[30, '남해', '소', 2896, 62, 56, 40, 60, 61, '오월', 270, 474, ['상동', '산월', '교지']],
|
||||
[31, '덕양', '소', 2896, 61, 64, 40, 59, 57, '서촉', 73, 276, ['자동', '영안', '강주', '성도']],
|
||||
[32, '하내', '소', 2863, 57, 61, 40, 61, 60, '하북', 295, 140, ['진양', '업', '낙양', '하동']],
|
||||
[33, '상용', '소', 2838, 58, 56, 40, 57, 61, '서촉', 190, 220, ['한중', '신야']],
|
||||
[34, '초', '소', 3286, 60, 62, 40, 62, 57, '중원', 375, 225, ['허창', '진류', '패', '수춘', '여남']],
|
||||
[35, '운남', '소', 3258, 62, 60, 40, 64, 61, '남중', 45, 405, ['월수', '건녕', '남만']],
|
||||
[36, '소', '소', 3256, 60, 62, 40, 57, 60, '오월', 450, 470, ['산월', '회계', '왜']],
|
||||
[37, '하동', '소', 3208, 60, 60, 40, 62, 55, '서북', 240, 140, ['흉노', '진양', '하내', '홍농']],
|
||||
[38, '무릉', '소', 3196, 58, 63, 40, 63, 58, '초', 195, 352, ['강릉', '장사', '영릉']],
|
||||
[39, '교지', '소', 3195, 58, 59, 40, 58, 59, '남중', 136, 480, ['남만', '남해']],
|
||||
[40, '단양', '소', 3183, 62, 64, 40, 58, 57, '오월', 440, 350, ['여강', '오', '건안', '시상']],
|
||||
[41, '영안', '소', 3153, 62, 59, 40, 58, 59, '서촉', 116, 282, ['덕양', '이릉', '강주']],
|
||||
[42, '북해', '소', 3146, 55, 63, 40, 63, 58, '하북', 470, 150, ['평원', '위례', '하비']],
|
||||
[43, '합비', '진', 998, 20, 19, 20, 39, 41, '중원', 420, 294, ['수춘', '건업', '여강']],
|
||||
[44, '이릉', '진', 968, 18, 19, 20, 39, 41, '초', 188, 275, ['영안', '강릉']],
|
||||
[45, '건녕', '소', 3082, 58, 59, 40, 63, 56, '남중', 85, 390, ['주제', '장가', '운남']],
|
||||
[46, '강하', '소', 3074, 55, 56, 40, 57, 60, '초', 320, 299, ['양양', '적벽', '여강']],
|
||||
[47, '진양', '소', 3074, 56, 59, 40, 64, 59, '하북', 310, 75, ['흉노', '하동', '하내', '거록', '계']],
|
||||
[48, '평원', '소', 3074, 62, 65, 40, 61, 63, '하북', 445, 110, ['남피', '제남', '북해']],
|
||||
[49, '회계', '소', 3005, 64, 59, 40, 62, 64, '오월', 485, 390, ['오', '건안', '소']],
|
||||
[50, '천수', '소', 2985, 59, 64, 40, 60, 58, '서북', 76, 140, ['무위', '안정', '오장원', '저']],
|
||||
[51, '평양', '소', 2939, 55, 59, 40, 60, 58, '동이', 606, 97, ['국내', '위례']],
|
||||
[52, '요동', '소', 2937, 63, 59, 40, 59, 63, '동이', 549, 26, ['북평', '오환', '국내']],
|
||||
[53, '거록', '소', 2936, 61, 57, 40, 64, 58, '하북', 355, 95, ['진양', '남피', '업']],
|
||||
[54, '여강', '소', 2905, 56, 58, 40, 60, 55, '오월', 392, 325, ['합비', '단양', '시상', '강하']],
|
||||
[55, '패', '소', 2877, 64, 58, 40, 58, 59, '중원', 425, 210, ['진류', '복양', '하비', '초']],
|
||||
[56, '자동', '소', 2870, 57, 55, 40, 60, 58, '서촉', 62, 240, ['무도', '한중', '덕양']],
|
||||
[57, '광릉', '소', 2867, 61, 55, 40, 60, 62, '오월', 478, 270, ['하비', '건업']],
|
||||
[58, '장가', '소', 2853, 59, 62, 40, 58, 57, '남중', 136, 395, ['건녕', '영릉', '남만']],
|
||||
[59, '영릉', '소', 2849, 62, 58, 40, 62, 62, '초', 197, 390, ['무릉', '계양', '장가']],
|
||||
[60, '월수', '소', 2828, 60, 59, 40, 58, 63, '남중', 39, 349, ['강주', '주제', '운남']],
|
||||
[61, '건안', '소', 2802, 57, 62, 40, 58, 63, '오월', 440, 420, ['단양', '회계', '산월']],
|
||||
[62, '신야', '소', 2786, 60, 62, 40, 58, 55, '초', 245, 255, ['상용', '완', '양양']],
|
||||
[63, '탐라', '수', 1130, 22, 21, 20, 43, 41, '동이', 614, 259, ['웅진', '왜', '오']],
|
||||
[64, '상동', '소', 2767, 58, 59, 40, 62, 58, '초', 285, 405, ['계양', '시상', '남해']],
|
||||
[65, '안정', '소', 2764, 57, 59, 40, 57, 62, '서북', 135, 130, ['강', '무위', '천수', '장안']],
|
||||
[66, '여남', '소', 2749, 63, 56, 40, 64, 64, '중원', 335, 255, ['완', '허창', '초', '수춘']],
|
||||
[67, '홍농', '소', 2748, 57, 63, 40, 58, 63, '서북', 220, 170, ['하동', '낙양', '장안']],
|
||||
[68, '주제', '소', 2746, 58, 61, 40, 61, 58, '남중', 93, 357, ['강주', '월수', '건녕']],
|
||||
[69, '남만', '이', 2378, 40, 42, 20, 43, 45, '남중', 90, 454, ['운남', '장가', '교지']],
|
||||
[70, '산월', '이', 2275, 40, 37, 20, 43, 38, '오월', 373, 447, ['건안', '소', '남해']],
|
||||
[71, '오환', '이', 2153, 42, 37, 20, 43, 40, '동이', 628, 19, ['요동', '국내']],
|
||||
[72, '강', '이', 2095, 40, 42, 20, 43, 40, '서북', 154, 70, ['무위', '안정']],
|
||||
[73, '왜', '이', 2065, 39, 37, 20, 43, 41, '동이', 681, 292, ['계림', '탐라', '소']],
|
||||
[74, '흉노', '이', 2064, 40, 41, 20, 40, 38, '서북', 227, 79, ['진양', '하동']],
|
||||
[75, '저', '이', 1957, 40, 42, 20, 43, 42, '서북', 24, 123, ['무위', '천수', '무도']],
|
||||
[76, '호로', '관', 958, 17, 19, 20, 95, 96, '중원', 317, 182, ['낙양', '진류', '허창']],
|
||||
[77, '오장원', '진', 1005, 19, 18, 20, 41, 40, '서북', 104, 175, ['천수', '장안', '한중']],
|
||||
[78, '적벽', '수', 1117, 23, 21, 20, 42, 41, '오월', 335, 330, ['강하', '강릉', '시상']],
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"title":"【공백지】 무주공산",
|
||||
"startYear":180,
|
||||
"map":{
|
||||
"mapName":"miniche_clean"
|
||||
},
|
||||
"history":[
|
||||
],
|
||||
"const": {
|
||||
"expandCityDefaultCost": 30000,
|
||||
"expandCityCostCoef": 250
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,655 @@
|
||||
{
|
||||
"title":"【공백지】 무주공산T",
|
||||
"startYear":180,
|
||||
"map":{
|
||||
"mapName":"miniche_clean"
|
||||
},
|
||||
"history":[
|
||||
],
|
||||
"const": {
|
||||
"expandCityDefaultCost": 30000,
|
||||
"expandCityCostCoef": 250
|
||||
},
|
||||
"general":[
|
||||
[0, "아회남", null, 0, null, 65, 74, 26, 0, 160, 300, null, null],
|
||||
[0, "이적", null, 0, null, 40, 24, 84, 0, 160, 300, null, null],
|
||||
[0, "윤상", null, 0, null, 51, 44, 62, 0, 160, 300, null, null],
|
||||
[0, "윤묵", null, 0, null, 26, 15, 66, 0, 160, 300, null, null],
|
||||
[0, "우금", null, 0, null, 85, 82, 62, 0, 160, 300, null, null],
|
||||
[0, "위관", null, 0, null, 69, 46, 79, 0, 160, 300, null, null],
|
||||
[0, "원윤", null, 0, null, 32, 14, 39, 0, 160, 300, null, null],
|
||||
[0, "원희", null, 0, null, 66, 43, 63, 0, 160, 300, null, null],
|
||||
[0, "염행", null, 0, null, 78, 90, 58, 0, 160, 300, null, null],
|
||||
[0, "염유", null, 0, null, 71, 50, 71, 0, 160, 300, null, null],
|
||||
[0, "원술", null, 0, null, 76, 55, 75, 0, 160, 300, null, null, "천한 것들관 상종을 하면 안돼"],
|
||||
[0, "원상", null, 0, null, 63, 75, 42, 0, 160, 300, null, null],
|
||||
[0, "원소", null, 0, null, 90, 62, 81, 0, 160, 300, null, null],
|
||||
[0, "염상", null, 0, null, 40, 27, 71, 0, 160, 300, null, null],
|
||||
[0, "원담", null, 0, null, 60, 78, 30, 0, 160, 300, null, null],
|
||||
[0, "염포", null, 0, null, 40, 25, 82, 0, 160, 300, null, null],
|
||||
[0, "왕위", null, 0, null, 60, 70, 48, 0, 160, 300, null, null],
|
||||
[0, "왕윤", null, 0, null, 26, 6, 68, 0, 160, 300, null, null],
|
||||
[0, "왕항", null, 0, null, 76, 43, 61, 0, 160, 300, null, null],
|
||||
[0, "왕찬", null, 0, null, 15, 3, 79, 0, 160, 300, null, null],
|
||||
[0, "왕수", null, 0, null, 54, 27, 77, 0, 160, 300, null, null],
|
||||
[0, "왕숙", null, 0, null, 36, 22, 76, 0, 160, 300, null, null],
|
||||
[0, "왕준", null, 0, null, 85, 64, 84, 0, 160, 300, null, null],
|
||||
[0, "왕쌍", null, 0, null, 67, 88, 19, 0, 160, 300, null, null],
|
||||
[0, "왕창", null, 0, null, 74, 57, 79, 0, 160, 300, null, null],
|
||||
[0, "왕평", null, 0, null, 88, 81, 61, 0, 160, 300, null, null],
|
||||
[0, "왕보", null, 0, null, 62, 41, 79, 0, 160, 300, null, null],
|
||||
[0, "왕문", null, 0, null, 65, 64, 31, 0, 160, 300, null, null],
|
||||
[0, "왕릉", null, 0, null, 74, 50, 71, 0, 160, 300, null, null],
|
||||
[0, "왕루", null, 0, null, 28, 30, 79, 0, 160, 300, null, null],
|
||||
[0, "왕랑", null, 0, null, 47, 35, 79, 0, 160, 300, null, null],
|
||||
[0, "온회", null, 0, null, 62, 36, 74, 0, 160, 300, null, null],
|
||||
[0, "하안", null, 0, null, 15, 30, 72, 0, 160, 300, null, null],
|
||||
[0, "괴월", null, 0, null, 50, 38, 85, 0, 160, 300, null, null],
|
||||
[0, "괴량", null, 0, null, 68, 33, 88, 0, 160, 300, null, null],
|
||||
[0, "가화", null, 0, null, 49, 65, 41, 0, 160, 300, null, null],
|
||||
[0, "가규", null, 0, null, 78, 61, 84, 0, 160, 300, null, null],
|
||||
[0, "하의", null, 0, null, 56, 69, 36, 0, 160, 300, null, null],
|
||||
[0, "화흠", null, 0, null, 51, 33, 88, 0, 160, 300, null, null],
|
||||
[0, "가후", null, 0, null, 71, 40, 98, 0, 160, 300, null, null, "이기기 위한 전략만 내드리겠습니다"],
|
||||
[0, "곽가", null, 0, null, 70, 41, 97, 0, 160, 300, null, null, "조공을 위한 명이 조금만 더 남았다면..."],
|
||||
[0, "악환", null, 0, null, 65, 80, 42, 0, 160, 300, null, null],
|
||||
[0, "곽사", null, 0, null, 64, 76, 13, 0, 160, 300, null, null],
|
||||
[0, "악취", null, 0, null, 53, 66, 61, 0, 160, 300, null, null],
|
||||
[0, "곽준", null, 0, null, 73, 52, 73, 0, 160, 300, null, null],
|
||||
[0, "학소", null, 0, null, 88, 63, 83, 0, 160, 300, null, null],
|
||||
[0, "악진", null, 0, null, 80, 85, 56, 0, 160, 300, null, null],
|
||||
[0, "곽도", null, 0, null, 62, 50, 82, 0, 160, 300, null, null],
|
||||
[0, "학맹", null, 0, null, 62, 67, 42, 0, 160, 300, null, null],
|
||||
[0, "곽유지", null, 0, null, 28, 9, 69, 0, 160, 300, null, null],
|
||||
[0, "곽익", null, 0, null, 73, 69, 69, 0, 160, 300, null, null],
|
||||
[0, "곽회", null, 0, null, 90, 66, 85, 0, 160, 300, null, null],
|
||||
[0, "하후위", null, 0, null, 71, 73, 49, 0, 160, 300, null, null],
|
||||
[0, "하후연", null, 0, null, 95, 92, 72, 0, 160, 300, null, null, "궁술로 날 당해낼 자가 있을까?"],
|
||||
[0, "하후은", null, 0, null, 63, 72, 53, 0, 160, 300, null, null],
|
||||
[0, "하후화", null, 0, null, 48, 51, 71, 0, 160, 300, null, null],
|
||||
[0, "하후혜", null, 0, null, 50, 44, 76, 0, 160, 300, null, null],
|
||||
[0, "하후현", null, 0, null, 54, 39, 76, 0, 160, 300, null, null],
|
||||
[0, "하후상", null, 0, null, 79, 55, 75, 0, 160, 300, null, null],
|
||||
[0, "하후덕", null, 0, null, 69, 73, 32, 0, 160, 300, null, null],
|
||||
[0, "하후돈", null, 0, null, 91, 88, 68, 0, 160, 300, null, null],
|
||||
[0, "하후패", null, 0, null, 79, 85, 63, 0, 160, 300, null, null],
|
||||
[0, "하후무", null, 0, null, 20, 7, 4, 0, 160, 300, null, null],
|
||||
[0, "가충", null, 0, null, 54, 31, 89, 0, 160, 300, null, null],
|
||||
[0, "하진", null, 0, null, 68, 54, 75, 0, 160, 300, null, null],
|
||||
[0, "화웅", null, 0, null, 78, 90, 55, 0, 160, 300, null, null],
|
||||
[0, "한윤", null, 0, null, 26, 29, 65, 0, 160, 300, null, null],
|
||||
[0, "관우", null, 0, null, 96, 99, 76, 0, 160, 300, null, null, "차가 식기 전에 적장의 목을 베어 오겠소!"],
|
||||
[0, "환계", null, 0, null, 25, 26, 68, 0, 160, 300, null, null],
|
||||
[0, "관해", null, 0, null, 70, 82, 10, 0, 160, 300, null, null],
|
||||
[0, "관구검", null, 0, null, 84, 86, 62, 0, 160, 300, null, null],
|
||||
[0, "한현", null, 0, null, 22, 33, 7, 0, 160, 300, null, null],
|
||||
[0, "한호", null, 0, null, 73, 61, 84, 0, 160, 300, null, null],
|
||||
[0, "관흥", null, 0, null, 76, 84, 62, 0, 160, 300, null, null],
|
||||
[0, "관색", null, 0, null, 74, 83, 56, 0, 160, 300, null, null],
|
||||
[0, "한수", null, 0, null, 78, 58, 79, 0, 160, 300, null, null],
|
||||
[0, "한숭", null, 0, null, 25, 15, 71, 0, 160, 300, null, null],
|
||||
[0, "관정", null, 0, null, 36, 52, 73, 0, 160, 300, null, null],
|
||||
[0, "한섬", null, 0, null, 69, 66, 36, 0, 160, 300, null, null],
|
||||
[0, "감택", null, 0, null, 51, 49, 83, 0, 160, 300, null, null],
|
||||
[0, "한충", null, 0, null, 64, 67, 18, 0, 160, 300, null, null],
|
||||
[0, "한당", null, 0, null, 76, 85, 61, 0, 160, 300, null, null],
|
||||
[0, "한덕", null, 0, null, 63, 76, 25, 0, 160, 300, null, null],
|
||||
[0, "감녕", null, 0, null, 92, 95, 74, 0, 160, 300, null, null],
|
||||
[0, "한복", null, 0, null, 28, 3, 27, 0, 160, 300, null, null],
|
||||
[0, "관평", null, 0, null, 78, 82, 60, 0, 160, 300, null, null],
|
||||
[0, "간옹", null, 0, null, 20, 32, 75, 0, 160, 300, null, null],
|
||||
[0, "안량", null, 0, null, 88, 96, 43, 0, 160, 300, null, null],
|
||||
[0, "위연", null, 0, null, 91, 90, 70, 0, 160, 300, null, null],
|
||||
[0, "국의", null, 0, null, 84, 78, 51, 0, 160, 300, null, null],
|
||||
[0, "희지재", null, 0, null, 63, 35, 91, 0, 160, 300, null, null],
|
||||
[0, "위속", null, 0, null, 67, 78, 31, 0, 160, 300, null, null],
|
||||
[0, "위유", null, 0, null, 46, 29, 74, 0, 160, 300, null, null],
|
||||
[0, "우금2", null, 0, null, 72, 79, 38, 0, 160, 300, null, null],
|
||||
[0, "우보", null, 0, null, 38, 60, 21, 0, 160, 300, null, null],
|
||||
[0, "강유", null, 0, null, 92, 72, 93, 0, 160, 300, null, null],
|
||||
[0, "공지", null, 0, null, 43, 53, 62, 0, 160, 300, null, null],
|
||||
[0, "교유", null, 0, null, 64, 69, 38, 0, 160, 300, null, null],
|
||||
[0, "공도", null, 0, null, 59, 70, 23, 0, 160, 300, null, null],
|
||||
[0, "허공", null, 0, null, 44, 66, 64, 0, 160, 300, null, null],
|
||||
[0, "허정", null, 0, null, 23, 5, 68, 0, 160, 300, null, null],
|
||||
[0, "허저", null, 0, null, 74, 97, 36, 0, 160, 300, null, null],
|
||||
[0, "허유", null, 0, null, 36, 21, 80, 0, 160, 300, null, null],
|
||||
[0, "기령", null, 0, null, 85, 84, 51, 0, 160, 300, null, null],
|
||||
[0, "김의", null, 0, null, 32, 38, 65, 0, 160, 300, null, null],
|
||||
[0, "김배삼결", null, 0, null, 64, 76, 19, 0, 160, 300, null, null],
|
||||
[0, "김선", null, 0, null, 52, 68, 13, 0, 160, 300, null, null],
|
||||
[0, "우번", null, 0, null, 46, 46, 87, 0, 160, 300, null, null],
|
||||
[0, "형도영", null, 0, null, 69, 79, 41, 0, 160, 300, null, null],
|
||||
[0, "엄안", null, 0, null, 82, 83, 62, 0, 160, 300, null, null],
|
||||
[0, "엄망", null, 0, null, 68, 71, 40, 0, 160, 300, null, null],
|
||||
[0, "엄준", null, 0, null, 41, 12, 71, 0, 160, 300, null, null],
|
||||
[0, "엄정", null, 0, null, 50, 55, 39, 0, 160, 300, null, null],
|
||||
[0, "엄백호", null, 0, null, 67, 70, 42, 0, 160, 300, null, null],
|
||||
[0, "엄여", null, 0, null, 61, 78, 44, 0, 160, 300, null, null],
|
||||
[0, "오의", null, 0, null, 79, 73, 53, 0, 160, 300, null, null],
|
||||
[0, "황개", null, 0, null, 80, 86, 64, 0, 160, 300, null, null],
|
||||
[0, "고간", null, 0, null, 74, 56, 38, 0, 160, 300, null, null],
|
||||
[0, "황권", null, 0, null, 75, 59, 88, 0, 160, 300, null, null],
|
||||
[0, "고유", null, 0, null, 57, 43, 72, 0, 160, 300, null, null],
|
||||
[0, "고순", null, 0, null, 87, 89, 60, 0, 160, 300, null, null],
|
||||
[0, "고상", null, 0, null, 68, 68, 53, 0, 160, 300, null, null],
|
||||
[0, "고승", null, 0, null, 67, 73, 41, 0, 160, 300, null, null],
|
||||
[0, "후성", null, 0, null, 74, 75, 54, 0, 160, 300, null, null],
|
||||
[0, "후선", null, 0, null, 63, 66, 34, 0, 160, 300, null, null],
|
||||
[0, "황조", null, 0, null, 81, 66, 48, 0, 160, 300, null, null],
|
||||
[0, "공손월", null, 0, null, 74, 72, 47, 0, 160, 300, null, null],
|
||||
[0, "공손연", null, 0, null, 65, 70, 49, 0, 160, 300, null, null],
|
||||
[0, "공손공", null, 0, null, 39, 17, 69, 0, 160, 300, null, null],
|
||||
[0, "공손강", null, 0, null, 72, 66, 46, 0, 160, 300, null, null],
|
||||
[0, "공손찬", null, 0, null, 86, 82, 62, 0, 160, 300, null, null],
|
||||
[0, "공손속", null, 0, null, 63, 68, 46, 0, 160, 300, null, null],
|
||||
[0, "공손도", null, 0, null, 67, 71, 49, 0, 160, 300, null, null],
|
||||
[0, "공손범", null, 0, null, 73, 69, 49, 0, 160, 300, null, null],
|
||||
[0, "황충", null, 0, null, 88, 96, 65, 0, 160, 300, null, null],
|
||||
[0, "고정", null, 0, null, 55, 63, 43, 0, 160, 300, null, null],
|
||||
[0, "고패", null, 0, null, 66, 48, 69, 0, 160, 300, null, null],
|
||||
[0, "황보숭", null, 0, null, 91, 61, 82, 0, 160, 300, null, null],
|
||||
[0, "공융", null, 0, null, 30, 5, 73, 0, 160, 300, null, null],
|
||||
[0, "고람", null, 0, null, 76, 82, 60, 0, 160, 300, null, null],
|
||||
[0, "오경", null, 0, null, 69, 66, 45, 0, 160, 300, null, null],
|
||||
[0, "호거아", null, 0, null, 70, 82, 41, 0, 160, 300, null, null],
|
||||
[0, "호진", null, 0, null, 65, 74, 12, 0, 160, 300, null, null],
|
||||
[0, "올돌골", null, 0, null, 79, 86, 11, 0, 160, 300, null, null],
|
||||
[0, "호반", null, 0, null, 55, 55, 59, 0, 160, 300, null, null],
|
||||
[0, "오반", null, 0, null, 74, 71, 50, 0, 160, 300, null, null],
|
||||
[0, "고옹", null, 0, null, 52, 18, 81, 0, 160, 300, null, null],
|
||||
[0, "오란", null, 0, null, 68, 80, 35, 0, 160, 300, null, null],
|
||||
[0, "채화", null, 0, null, 39, 50, 1, 0, 160, 300, null, null],
|
||||
[0, "채중", null, 0, null, 40, 54, 2, 0, 160, 300, null, null],
|
||||
[0, "채모", null, 0, null, 70, 55, 77, 0, 160, 300, null, null],
|
||||
[0, "착융", null, 0, null, 60, 69, 38, 0, 160, 300, null, null],
|
||||
[0, "사마의", null, 0, null, 99, 63, 98, 0, 160, 300, null, null],
|
||||
[0, "사마염", null, 0, null, 69, 59, 77, 0, 160, 300, null, null],
|
||||
[0, "사마사", null, 0, null, 84, 64, 89, 0, 160, 300, null, null],
|
||||
[0, "사마소", null, 0, null, 85, 57, 88, 0, 160, 300, null, null],
|
||||
[0, "사마부", null, 0, null, 70, 37, 77, 0, 160, 300, null, null],
|
||||
[0, "사마랑", null, 0, null, 20, 21, 72, 0, 160, 300, null, null],
|
||||
[0, "사마가", null, 0, null, 66, 84, 25, 0, 160, 300, null, null],
|
||||
[0, "주흔", null, 0, null, 65, 51, 73, 0, 160, 300, null, null],
|
||||
[0, "주앙", null, 0, null, 74, 65, 48, 0, 160, 300, null, null],
|
||||
[0, "주지", null, 0, null, 73, 85, 41, 0, 160, 300, null, null],
|
||||
[0, "주창", null, 0, null, 68, 77, 42, 0, 160, 300, null, null],
|
||||
[0, "주태", null, 0, null, 84, 90, 48, 0, 160, 300, null, null],
|
||||
[0, "주방", null, 0, null, 52, 41, 80, 0, 160, 300, null, null],
|
||||
[0, "주유", null, 0, null, 97, 71, 97, 0, 160, 300, null, null],
|
||||
[0, "주환", null, 0, null, 87, 84, 64, 0, 160, 300, null, null],
|
||||
[0, "주거", null, 0, null, 77, 57, 72, 0, 160, 300, null, null],
|
||||
[0, "축융", null, 0, null, 72, 75, 35, 0, 160, 300, null, null],
|
||||
[0, "주준", null, 0, null, 89, 57, 76, 0, 160, 300, null, null],
|
||||
[0, "주연", null, 0, null, 86, 75, 57, 0, 160, 300, null, null],
|
||||
[0, "주치", null, 0, null, 71, 56, 72, 0, 160, 300, null, null],
|
||||
[0, "주포", null, 0, null, 68, 73, 34, 0, 160, 300, null, null],
|
||||
[0, "주령", null, 0, null, 78, 73, 53, 0, 160, 300, null, null],
|
||||
[0, "순욱", null, 0, null, 78, 38, 97, 0, 160, 300, null, null],
|
||||
[0, "순우경", null, 0, null, 78, 66, 29, 0, 160, 300, null, null],
|
||||
[0, "순심", null, 0, null, 45, 25, 78, 0, 160, 300, null, null],
|
||||
[0, "순유", null, 0, null, 80, 35, 95, 0, 160, 300, null, null],
|
||||
[0, "장완", null, 0, null, 78, 34, 89, 0, 160, 300, null, null],
|
||||
[0, "종회", null, 0, null, 88, 62, 93, 0, 160, 300, null, null],
|
||||
[0, "장간", null, 0, null, 19, 6, 66, 0, 160, 300, null, null],
|
||||
[0, "장의거", null, 0, null, 71, 41, 59, 0, 160, 300, null, null],
|
||||
[0, "장흠", null, 0, null, 78, 85, 54, 0, 160, 300, null, null],
|
||||
[0, "장제3", null, 0, null, 62, 43, 85, 0, 160, 300, null, null],
|
||||
[0, "초주", null, 0, null, 16, 3, 67, 0, 160, 300, null, null],
|
||||
[0, "초촉", null, 0, null, 65, 76, 33, 0, 160, 300, null, null],
|
||||
[0, "향총", null, 0, null, 76, 56, 77, 0, 160, 300, null, null],
|
||||
[0, "종요", null, 0, null, 79, 24, 90, 0, 160, 300, null, null],
|
||||
[0, "향랑", null, 0, null, 28, 18, 74, 0, 160, 300, null, null],
|
||||
[0, "서영", null, 0, null, 92, 80, 62, 0, 160, 300, null, null],
|
||||
[0, "제갈각", null, 0, null, 72, 47, 90, 0, 160, 300, null, null],
|
||||
[0, "제갈근", null, 0, null, 75, 34, 85, 0, 160, 300, null, null],
|
||||
[0, "제갈균", null, 0, null, 29, 25, 52, 0, 160, 300, null, null],
|
||||
[0, "제갈탄", null, 0, null, 72, 54, 76, 0, 160, 300, null, null],
|
||||
[0, "제갈량", null, 0, null, 98, 43, 100, 0, 160, 300, null, null],
|
||||
[0, "서황", null, 0, null, 95, 94, 74, 0, 160, 300, null, null],
|
||||
[0, "서서", null, 0, null, 85, 64, 94, 0, 160, 300, null, null],
|
||||
[0, "서성", null, 0, null, 86, 81, 61, 0, 160, 300, null, null],
|
||||
[0, "서막", null, 0, null, 55, 32, 68, 0, 160, 300, null, null],
|
||||
[0, "신의", null, 0, null, 55, 59, 60, 0, 160, 300, null, null],
|
||||
[0, "신탐", null, 0, null, 56, 62, 54, 0, 160, 300, null, null],
|
||||
[0, "심배", null, 0, null, 80, 60, 84, 0, 160, 300, null, null],
|
||||
[0, "신비", null, 0, null, 42, 24, 79, 0, 160, 300, null, null],
|
||||
[0, "신평", null, 0, null, 69, 43, 77, 0, 160, 300, null, null],
|
||||
[0, "진복", null, 0, null, 31, 7, 73, 0, 160, 300, null, null],
|
||||
[0, "진랑", null, 0, null, 58, 70, 35, 0, 160, 300, null, null],
|
||||
[0, "휴고", null, 0, null, 63, 71, 38, 0, 160, 300, null, null],
|
||||
[0, "추단", null, 0, null, 61, 64, 34, 0, 160, 300, null, null],
|
||||
[0, "성의", null, 0, null, 74, 72, 41, 0, 160, 300, null, null],
|
||||
[0, "성공영", null, 0, null, 73, 58, 80, 0, 160, 300, null, null],
|
||||
[0, "설종", null, 0, null, 34, 16, 73, 0, 160, 300, null, null],
|
||||
[0, "단경", null, 0, null, 71, 68, 43, 0, 160, 300, null, null],
|
||||
[0, "전종", null, 0, null, 78, 55, 75, 0, 160, 300, null, null],
|
||||
[0, "조예", null, 0, null, 72, 52, 82, 0, 160, 300, null, null],
|
||||
[0, "조휴", null, 0, null, 84, 78, 58, 0, 160, 300, null, null],
|
||||
[0, "송헌", null, 0, null, 68, 77, 38, 0, 160, 300, null, null],
|
||||
[0, "조앙", null, 0, null, 78, 50, 69, 0, 160, 300, null, null],
|
||||
[0, "조홍", null, 0, null, 80, 75, 55, 0, 160, 300, null, null],
|
||||
[0, "조순", null, 0, null, 85, 83, 63, 0, 160, 300, null, null],
|
||||
[0, "조창", null, 0, null, 86, 91, 59, 0, 160, 300, null, null],
|
||||
[0, "조식", null, 0, null, 45, 22, 86, 0, 160, 300, null, null],
|
||||
[0, "조진", null, 0, null, 88, 74, 56, 0, 160, 300, null, null],
|
||||
[0, "조인", null, 0, null, 94, 90, 70, 0, 160, 300, null, null],
|
||||
[0, "조성", null, 0, null, 54, 74, 38, 0, 160, 300, null, null],
|
||||
[0, "조조", null, 0, null, 100, 72, 96, 0, 160, 300, null, null, "미망인이 더 매력적이란 말이야... 후후"],
|
||||
[0, "조충", null, 0, null, 43, 21, 74, 0, 160, 300, null, null],
|
||||
[0, "장패", null, 0, null, 78, 86, 53, 0, 160, 300, null, null],
|
||||
[0, "조비", null, 0, null, 75, 64, 87, 0, 160, 300, null, null, "새로운 왕조를 열겠다..."],
|
||||
[0, "조표", null, 0, null, 54, 69, 32, 0, 160, 300, null, null],
|
||||
[0, "저수", null, 0, null, 86, 46, 95, 0, 160, 300, null, null],
|
||||
[0, "소비", null, 0, null, 69, 45, 66, 0, 160, 300, null, null],
|
||||
[0, "조무", null, 0, null, 70, 71, 50, 0, 160, 300, null, null],
|
||||
[0, "손환", null, 0, null, 82, 56, 76, 0, 160, 300, null, null],
|
||||
[0, "손견", null, 0, null, 94, 95, 73, 0, 160, 300, null, null],
|
||||
[0, "손건", null, 0, null, 44, 33, 79, 0, 160, 300, null, null],
|
||||
[0, "손권", null, 0, null, 86, 61, 81, 0, 160, 300, null, null],
|
||||
[0, "손교", null, 0, null, 77, 72, 52, 0, 160, 300, null, null],
|
||||
[0, "손책", null, 0, null, 93, 94, 74, 0, 160, 300, null, null],
|
||||
[0, "손소", null, 0, null, 82, 79, 59, 0, 160, 300, null, null],
|
||||
[0, "손정", null, 0, null, 66, 53, 73, 0, 160, 300, null, null],
|
||||
[0, "손중", null, 0, null, 62, 71, 36, 0, 160, 300, null, null],
|
||||
[0, "손등", null, 0, null, 62, 37, 79, 0, 160, 300, null, null],
|
||||
[0, "손유", null, 0, null, 77, 70, 51, 0, 160, 300, null, null],
|
||||
[0, "손익", null, 0, null, 67, 83, 27, 0, 160, 300, null, null],
|
||||
[0, "손례", null, 0, null, 78, 81, 59, 0, 160, 300, null, null],
|
||||
[0, "태사자", null, 0, null, 94, 94, 72, 0, 160, 300, null, null],
|
||||
[0, "대래동주", null, 0, null, 51, 53, 54, 0, 160, 300, null, null],
|
||||
[0, "대릉", null, 0, null, 70, 75, 39, 0, 160, 300, null, null],
|
||||
[0, "타사대왕", null, 0, null, 62, 48, 70, 0, 160, 300, null, null],
|
||||
[0, "담웅", null, 0, null, 58, 73, 14, 0, 160, 300, null, null],
|
||||
[0, "장윤", null, 0, null, 72, 67, 42, 0, 160, 300, null, null],
|
||||
[0, "조운", null, 0, null, 90, 96, 75, 0, 160, 300, null, null],
|
||||
[0, "장위", null, 0, null, 74, 66, 45, 0, 160, 300, null, null],
|
||||
[0, "장영", null, 0, null, 75, 74, 41, 0, 160, 300, null, null],
|
||||
[0, "장연", null, 0, null, 76, 81, 57, 0, 160, 300, null, null],
|
||||
[0, "장횡", null, 0, null, 59, 70, 23, 0, 160, 300, null, null],
|
||||
[0, "장온", null, 0, null, 32, 10, 72, 0, 160, 300, null, null],
|
||||
[0, "장개", null, 0, null, 34, 66, 8, 0, 160, 300, null, null],
|
||||
[0, "장각", null, 0, null, 87, 35, 90, 0, 160, 300, null, null],
|
||||
[0, "장기", null, 0, null, 74, 35, 76, 0, 160, 300, null, null],
|
||||
[0, "장의", null, 0, null, 79, 55, 75, 0, 160, 300, null, null],
|
||||
[0, "장훈", null, 0, null, 72, 68, 41, 0, 160, 300, null, null],
|
||||
[0, "장굉", null, 0, null, 24, 22, 86, 0, 160, 300, null, null],
|
||||
[0, "장합", null, 0, null, 92, 89, 69, 0, 160, 300, null, null],
|
||||
[0, "조홍2", null, 0, null, 66, 72, 28, 0, 160, 300, null, null],
|
||||
[0, "장제2", null, 0, null, 70, 66, 46, 0, 160, 300, null, null],
|
||||
[0, "장수", null, 0, null, 80, 73, 51, 0, 160, 300, null, null],
|
||||
[0, "장소", null, 0, null, 41, 13, 87, 0, 160, 300, null, null],
|
||||
[0, "장송", null, 0, null, 40, 6, 85, 0, 160, 300, null, null],
|
||||
[0, "장임", null, 0, null, 85, 84, 64, 0, 160, 300, null, null],
|
||||
[0, "장제", null, 0, null, 67, 43, 80, 0, 160, 300, null, null],
|
||||
[0, "장막", null, 0, null, 52, 53, 71, 0, 160, 300, null, null],
|
||||
[0, "조범", null, 0, null, 28, 21, 32, 0, 160, 300, null, null],
|
||||
[0, "장비", null, 0, null, 87, 98, 72, 0, 160, 300, null, null],
|
||||
[0, "장포", null, 0, null, 78, 84, 48, 0, 160, 300, null, null],
|
||||
[0, "장보", null, 0, null, 83, 60, 81, 0, 160, 300, null, null],
|
||||
[0, "장만성", null, 0, null, 75, 81, 45, 0, 160, 300, null, null],
|
||||
[0, "장양", null, 0, null, 72, 70, 50, 0, 160, 300, null, null],
|
||||
[0, "장익", null, 0, null, 75, 55, 76, 0, 160, 300, null, null],
|
||||
[0, "장료", null, 0, null, 96, 94, 74, 0, 160, 300, null, null],
|
||||
[0, "장량", null, 0, null, 78, 80, 59, 0, 160, 300, null, null],
|
||||
[0, "조루", null, 0, null, 70, 43, 68, 0, 160, 300, null, null],
|
||||
[0, "장로", null, 0, null, 65, 42, 81, 0, 160, 300, null, null],
|
||||
[0, "진횡", null, 0, null, 64, 63, 26, 0, 160, 300, null, null],
|
||||
[0, "진응", null, 0, null, 62, 72, 45, 0, 160, 300, null, null],
|
||||
[0, "진기", null, 0, null, 58, 65, 43, 0, 160, 300, null, null],
|
||||
[0, "진궁", null, 0, null, 84, 55, 90, 0, 160, 300, null, null],
|
||||
[0, "진교", null, 0, null, 61, 27, 77, 0, 160, 300, null, null],
|
||||
[0, "진군", null, 0, null, 32, 14, 75, 0, 160, 300, null, null],
|
||||
[0, "진규", null, 0, null, 30, 4, 82, 0, 160, 300, null, null],
|
||||
[0, "진식", null, 0, null, 70, 71, 25, 0, 160, 300, null, null],
|
||||
[0, "진진", null, 0, null, 46, 46, 69, 0, 160, 300, null, null],
|
||||
[0, "진태", null, 0, null, 86, 68, 89, 0, 160, 300, null, null],
|
||||
[0, "진등", null, 0, null, 79, 59, 81, 0, 160, 300, null, null],
|
||||
[0, "진도", null, 0, null, 82, 78, 58, 0, 160, 300, null, null],
|
||||
[0, "진무", null, 0, null, 76, 87, 43, 0, 160, 300, null, null],
|
||||
[0, "진란", null, 0, null, 66, 69, 40, 0, 160, 300, null, null],
|
||||
[0, "진림", null, 0, null, 25, 9, 75, 0, 160, 300, null, null],
|
||||
[0, "정욱", null, 0, null, 76, 49, 94, 0, 160, 300, null, null],
|
||||
[0, "정원지", null, 0, null, 69, 74, 17, 0, 160, 300, null, null],
|
||||
[0, "정은", null, 0, null, 69, 73, 40, 0, 160, 300, null, null],
|
||||
[0, "정원", null, 0, null, 70, 76, 35, 0, 160, 300, null, null],
|
||||
[0, "정보", null, 0, null, 84, 79, 59, 0, 160, 300, null, null],
|
||||
[0, "정봉", null, 0, null, 81, 92, 69, 0, 160, 300, null, null],
|
||||
[0, "전위", null, 0, null, 79, 98, 42, 0, 160, 300, null, null],
|
||||
[0, "전해", null, 0, null, 68, 65, 45, 0, 160, 300, null, null],
|
||||
[0, "전주", null, 0, null, 66, 51, 73, 0, 160, 300, null, null],
|
||||
[0, "전풍", null, 0, null, 82, 43, 96, 0, 160, 300, null, null],
|
||||
[0, "전예", null, 0, null, 93, 85, 66, 0, 160, 300, null, null],
|
||||
[0, "동윤", null, 0, null, 47, 28, 79, 0, 160, 300, null, null],
|
||||
[0, "동화", null, 0, null, 57, 34, 75, 0, 160, 300, null, null],
|
||||
[0, "등애", null, 0, null, 92, 73, 94, 0, 160, 300, null, null],
|
||||
[0, "도겸", null, 0, null, 51, 27, 64, 0, 160, 300, null, null],
|
||||
[0, "등현", null, 0, null, 61, 73, 45, 0, 160, 300, null, null],
|
||||
[0, "등지", null, 0, null, 73, 52, 81, 0, 160, 300, null, null],
|
||||
[0, "동습", null, 0, null, 72, 85, 50, 0, 160, 300, null, null],
|
||||
[0, "동승", null, 0, null, 56, 53, 65, 0, 160, 300, null, null],
|
||||
[0, "동소", null, 0, null, 34, 25, 80, 0, 160, 300, null, null],
|
||||
[0, "동탁", null, 0, null, 91, 87, 67, 0, 160, 300, null, null],
|
||||
[0, "동도나", null, 0, null, 68, 73, 31, 0, 160, 300, null, null],
|
||||
[0, "동민", null, 0, null, 49, 60, 25, 0, 160, 300, null, null],
|
||||
[0, "등무", null, 0, null, 61, 75, 29, 0, 160, 300, null, null],
|
||||
[0, "두기", null, 0, null, 74, 43, 78, 0, 160, 300, null, null],
|
||||
[0, "두예", null, 0, null, 96, 69, 95, 0, 160, 300, null, null],
|
||||
[0, "배원소", null, 0, null, 49, 65, 25, 0, 160, 300, null, null],
|
||||
[0, "마완", null, 0, null, 71, 74, 16, 0, 160, 300, null, null],
|
||||
[0, "마휴", null, 0, null, 68, 73, 48, 0, 160, 300, null, null],
|
||||
[0, "파재", null, 0, null, 74, 74, 55, 0, 160, 300, null, null],
|
||||
[0, "마준", null, 0, null, 38, 52, 31, 0, 160, 300, null, null],
|
||||
[0, "마속", null, 0, null, 61, 59, 84, 0, 160, 300, null, null],
|
||||
[0, "마대", null, 0, null, 79, 85, 62, 0, 160, 300, null, null],
|
||||
[0, "마충", null, 0, null, 78, 72, 52, 0, 160, 300, null, null],
|
||||
[0, "마초", null, 0, null, 86, 97, 44, 0, 160, 300, null, null, "서량의 금마초 나가신다!"],
|
||||
[0, "마철", null, 0, null, 70, 62, 43, 0, 160, 300, null, null],
|
||||
[0, "마등", null, 0, null, 85, 80, 52, 0, 160, 300, null, null],
|
||||
[0, "마량", null, 0, null, 53, 23, 85, 0, 160, 300, null, null],
|
||||
[0, "반준", null, 0, null, 61, 46, 82, 0, 160, 300, null, null],
|
||||
[0, "반장", null, 0, null, 76, 80, 59, 0, 160, 300, null, null],
|
||||
[0, "번조", null, 0, null, 66, 73, 31, 0, 160, 300, null, null],
|
||||
[0, "번능", null, 0, null, 69, 61, 36, 0, 160, 300, null, null],
|
||||
[0, "반봉", null, 0, null, 56, 77, 4, 0, 160, 300, null, null],
|
||||
[0, "비의", null, 0, null, 82, 56, 88, 0, 160, 300, null, null],
|
||||
[0, "비연", null, 0, null, 60, 66, 21, 0, 160, 300, null, null],
|
||||
[0, "비시", null, 0, null, 18, 28, 65, 0, 160, 300, null, null],
|
||||
[0, "미축", null, 0, null, 33, 29, 78, 0, 160, 300, null, null],
|
||||
[0, "미방", null, 0, null, 54, 61, 32, 0, 160, 300, null, null],
|
||||
[0, "비요", null, 0, null, 70, 52, 73, 0, 160, 300, null, null],
|
||||
[0, "무안국", null, 0, null, 70, 79, 34, 0, 160, 300, null, null],
|
||||
[0, "풍습", null, 0, null, 72, 71, 39, 0, 160, 300, null, null],
|
||||
[0, "부사인", null, 0, null, 46, 63, 37, 0, 160, 300, null, null],
|
||||
[0, "부첨", null, 0, null, 73, 85, 62, 0, 160, 300, null, null],
|
||||
[0, "부손", null, 0, null, 29, 13, 70, 0, 160, 300, null, null],
|
||||
[0, "문앙", null, 0, null, 76, 96, 65, 0, 160, 300, null, null],
|
||||
[0, "문흠", null, 0, null, 74, 79, 43, 0, 160, 300, null, null],
|
||||
[0, "문추", null, 0, null, 87, 95, 49, 0, 160, 300, null, null],
|
||||
[0, "문빙", null, 0, null, 88, 85, 65, 0, 160, 300, null, null],
|
||||
[0, "변희", null, 0, null, 56, 70, 62, 0, 160, 300, null, null],
|
||||
[0, "망아장", null, 0, null, 45, 79, 3, 0, 160, 300, null, null],
|
||||
[0, "봉기", null, 0, null, 56, 48, 84, 0, 160, 300, null, null],
|
||||
[0, "방희", null, 0, null, 60, 38, 69, 0, 160, 300, null, null],
|
||||
[0, "법정", null, 0, null, 82, 47, 94, 0, 160, 300, null, null],
|
||||
[0, "방통", null, 0, null, 79, 34, 97, 0, 160, 300, null, null],
|
||||
[0, "방덕", null, 0, null, 89, 94, 70, 0, 160, 300, null, null],
|
||||
[0, "포륭", null, 0, null, 58, 76, 49, 0, 160, 300, null, null],
|
||||
[0, "목순", null, 0, null, 52, 77, 11, 0, 160, 300, null, null],
|
||||
[0, "목록대왕", null, 0, null, 65, 71, 39, 0, 160, 300, null, null],
|
||||
[0, "보즐", null, 0, null, 83, 51, 81, 0, 160, 300, null, null],
|
||||
[0, "만총", null, 0, null, 88, 64, 87, 0, 160, 300, null, null],
|
||||
[0, "모개", null, 0, null, 63, 39, 60, 0, 160, 300, null, null],
|
||||
[0, "맹획", null, 0, null, 81, 88, 42, 0, 160, 300, null, null],
|
||||
[0, "맹체", null, 0, null, 75, 55, 75, 0, 160, 300, null, null],
|
||||
[0, "맹우", null, 0, null, 50, 68, 22, 0, 160, 300, null, null],
|
||||
[0, "유섭", null, 0, null, 62, 79, 24, 0, 160, 300, null, null],
|
||||
[0, "양부", null, 0, null, 62, 48, 68, 0, 160, 300, null, null],
|
||||
[0, "옹개", null, 0, null, 73, 75, 57, 0, 160, 300, null, null],
|
||||
[0, "양의", null, 0, null, 68, 40, 82, 0, 160, 300, null, null],
|
||||
[0, "양호", null, 0, null, 94, 69, 92, 0, 160, 300, null, null],
|
||||
[0, "양홍", null, 0, null, 33, 15, 77, 0, 160, 300, null, null],
|
||||
[0, "양앙", null, 0, null, 68, 72, 38, 0, 160, 300, null, null],
|
||||
[0, "양추", null, 0, null, 52, 65, 40, 0, 160, 300, null, null],
|
||||
[0, "양수", null, 0, null, 46, 23, 83, 0, 160, 300, null, null],
|
||||
[0, "양추2", null, 0, null, 67, 64, 44, 0, 160, 300, null, null],
|
||||
[0, "양송", null, 0, null, 17, 5, 28, 0, 160, 300, null, null],
|
||||
[0, "양임", null, 0, null, 70, 78, 56, 0, 160, 300, null, null],
|
||||
[0, "양조", null, 0, null, 53, 61, 36, 0, 160, 300, null, null],
|
||||
[0, "양백", null, 0, null, 44, 45, 19, 0, 160, 300, null, null],
|
||||
[0, "양부2", null, 0, null, 67, 50, 83, 0, 160, 300, null, null],
|
||||
[0, "양봉", null, 0, null, 66, 65, 31, 0, 160, 300, null, null],
|
||||
[0, "양봉2", null, 0, null, 54, 62, 53, 0, 160, 300, null, null],
|
||||
[0, "뇌동", null, 0, null, 69, 78, 51, 0, 160, 300, null, null],
|
||||
[0, "뇌박", null, 0, null, 62, 70, 36, 0, 160, 300, null, null],
|
||||
[0, "이이", null, 0, null, 63, 77, 19, 0, 160, 300, null, null],
|
||||
[0, "이회", null, 0, null, 79, 58, 79, 0, 160, 300, null, null],
|
||||
[0, "이각", null, 0, null, 69, 72, 24, 0, 160, 300, null, null],
|
||||
[0, "육항", null, 0, null, 94, 68, 93, 0, 160, 300, null, null],
|
||||
[0, "육적", null, 0, null, 20, 7, 72, 0, 160, 300, null, null],
|
||||
[0, "육손", null, 0, null, 95, 71, 96, 0, 160, 300, null, null],
|
||||
[0, "이엄", null, 0, null, 83, 84, 63, 0, 160, 300, null, null],
|
||||
[0, "이유", null, 0, null, 61, 26, 93, 0, 160, 300, null, null],
|
||||
[0, "이숙", null, 0, null, 46, 69, 61, 0, 160, 300, null, null],
|
||||
[0, "이통", null, 0, null, 73, 81, 62, 0, 160, 300, null, null],
|
||||
[0, "이전", null, 0, null, 78, 80, 59, 0, 160, 300, null, null],
|
||||
[0, "이풍", null, 0, null, 69, 74, 50, 0, 160, 300, null, null],
|
||||
[0, "유언", null, 0, null, 61, 38, 80, 0, 160, 300, null, null],
|
||||
[0, "유괴", null, 0, null, 71, 73, 52, 0, 160, 300, null, null],
|
||||
[0, "유기", null, 0, null, 52, 12, 63, 0, 160, 300, null, null],
|
||||
[0, "유우", null, 0, null, 62, 33, 75, 0, 160, 300, null, null],
|
||||
[0, "유훈", null, 0, null, 47, 63, 35, 0, 160, 300, null, null],
|
||||
[0, "유현", null, 0, null, 54, 66, 51, 0, 160, 300, null, null],
|
||||
[0, "유순", null, 0, null, 63, 46, 28, 0, 160, 300, null, null],
|
||||
[0, "유장", null, 0, null, 31, 5, 34, 0, 160, 300, null, null],
|
||||
[0, "유심", null, 0, null, 60, 48, 70, 0, 160, 300, null, null],
|
||||
[0, "유선", null, 0, null, 3, 5, 9, 0, 160, 300, null, null],
|
||||
[0, "유종", null, 0, null, 24, 22, 65, 0, 160, 300, null, null],
|
||||
[0, "유도", null, 0, null, 25, 23, 26, 0, 160, 300, null, null],
|
||||
[0, "유파", null, 0, null, 29, 22, 75, 0, 160, 300, null, null],
|
||||
[0, "유반", null, 0, null, 69, 76, 47, 0, 160, 300, null, null],
|
||||
[0, "유비", null, 0, null, 88, 78, 59, 0, 160, 300, null, null, "한왕실은 중산정왕의 후손인 내가 이어받겠다...!"],
|
||||
[0, "유표", null, 0, null, 48, 31, 72, 0, 160, 300, null, null],
|
||||
[0, "유복", null, 0, null, 64, 49, 74, 0, 160, 300, null, null],
|
||||
[0, "유벽", null, 0, null, 70, 72, 47, 0, 160, 300, null, null],
|
||||
[0, "유봉", null, 0, null, 75, 79, 44, 0, 160, 300, null, null],
|
||||
[0, "유엽", null, 0, null, 56, 32, 92, 0, 160, 300, null, null],
|
||||
[0, "유요", null, 0, null, 62, 67, 46, 0, 160, 300, null, null],
|
||||
[0, "여위황", null, 0, null, 58, 63, 29, 0, 160, 300, null, null],
|
||||
[0, "요화", null, 0, null, 73, 76, 54, 0, 160, 300, null, null],
|
||||
[0, "양흥", null, 0, null, 61, 65, 19, 0, 160, 300, null, null],
|
||||
[0, "양습", null, 0, null, 73, 40, 74, 0, 160, 300, null, null],
|
||||
[0, "양서", null, 0, null, 56, 62, 66, 0, 160, 300, null, null],
|
||||
[0, "능조", null, 0, null, 75, 81, 42, 0, 160, 300, null, null],
|
||||
[0, "능통", null, 0, null, 83, 89, 60, 0, 160, 300, null, null],
|
||||
[0, "여개", null, 0, null, 53, 30, 67, 0, 160, 300, null, null],
|
||||
[0, "여건", null, 0, null, 57, 70, 62, 0, 160, 300, null, null],
|
||||
[0, "여광", null, 0, null, 56, 70, 13, 0, 160, 300, null, null],
|
||||
[0, "여상", null, 0, null, 54, 71, 12, 0, 160, 300, null, null],
|
||||
[0, "여대", null, 0, null, 80, 71, 52, 0, 160, 300, null, null],
|
||||
[0, "여범", null, 0, null, 73, 54, 75, 0, 160, 300, null, null],
|
||||
[0, "여포", null, 0, null, 89, 100, 42, 0, 160, 300, null, null, "다 덤비거라! 하하하하"],
|
||||
[0, "여몽", null, 0, null, 91, 69, 90, 0, 160, 300, null, null],
|
||||
[0, "윤직", null, 0, null, 46, 42, 73, 0, 160, 300, null, null],
|
||||
[0, "냉포", null, 0, null, 71, 82, 61, 0, 160, 300, null, null],
|
||||
[0, "누규", null, 0, null, 52, 13, 87, 0, 160, 300, null, null],
|
||||
[0, "노숙", null, 0, null, 89, 56, 93, 0, 160, 300, null, null],
|
||||
[0, "노식", null, 0, null, 86, 63, 82, 0, 160, 300, null, null],
|
||||
[0, "범강", null, 0, null, 49, 50, 36, 0, 160, 300, null, null],
|
||||
[0, "장달", null, 0, null, 43, 56, 34, 0, 160, 300, null, null],
|
||||
[0, "규람", null, 0, null, 55, 70, 58, 0, 160, 300, null, null],
|
||||
[0, "대원", null, 0, null, 38, 32, 68, 0, 160, 300, null, null],
|
||||
[0, "왕기", null, 0, null, 81, 64, 86, 0, 160, 300, null, null],
|
||||
[0, "왕상", null, 0, null, 23, 19, 68, 0, 160, 300, null, null],
|
||||
[0, "왕돈", null, 0, null, 60, 66, 46, 0, 160, 300, null, null],
|
||||
[0, "악침", null, 0, null, 73, 75, 43, 0, 160, 300, null, null],
|
||||
[0, "하제", null, 0, null, 83, 61, 82, 0, 160, 300, null, null],
|
||||
[0, "환범", null, 0, null, 40, 11, 78, 0, 160, 300, null, null],
|
||||
[0, "견초", null, 0, null, 72, 79, 57, 0, 160, 300, null, null],
|
||||
[0, "고당륭", null, 0, null, 35, 24, 76, 0, 160, 300, null, null],
|
||||
[0, "오찬", null, 0, null, 68, 41, 78, 0, 160, 300, null, null],
|
||||
[0, "호질", null, 0, null, 73, 46, 74, 0, 160, 300, null, null],
|
||||
[0, "오질", null, 0, null, 16, 29, 68, 0, 160, 300, null, null],
|
||||
[0, "호준", null, 0, null, 79, 76, 55, 0, 160, 300, null, null],
|
||||
[0, "고담", null, 0, null, 53, 23, 77, 0, 160, 300, null, null],
|
||||
[0, "최림", null, 0, null, 32, 22, 66, 0, 160, 300, null, null],
|
||||
[0, "사마망", null, 0, null, 78, 58, 83, 0, 160, 300, null, null],
|
||||
[0, "주이", null, 0, null, 70, 73, 52, 0, 160, 300, null, null],
|
||||
[0, "전단", null, 0, null, 67, 64, 39, 0, 160, 300, null, null],
|
||||
[0, "조우", null, 0, null, 50, 43, 37, 0, 160, 300, null, null],
|
||||
[0, "조상", null, 0, null, 39, 33, 30, 0, 160, 300, null, null],
|
||||
[0, "조방", null, 0, null, 20, 14, 27, 0, 160, 300, null, null],
|
||||
[0, "태사향", null, 0, null, 57, 66, 48, 0, 160, 300, null, null],
|
||||
[0, "장휴", null, 0, null, 63, 27, 74, 0, 160, 300, null, null],
|
||||
[0, "장호", null, 0, null, 75, 74, 51, 0, 160, 300, null, null],
|
||||
[0, "조광", null, 0, null, 67, 71, 53, 0, 160, 300, null, null],
|
||||
[0, "장집", null, 0, null, 76, 29, 80, 0, 160, 300, null, null],
|
||||
[0, "장승", null, 0, null, 77, 55, 75, 0, 160, 300, null, null],
|
||||
[0, "장소2", null, 0, null, 23, 56, 31, 0, 160, 300, null, null],
|
||||
[0, "조통", null, 0, null, 68, 67, 46, 0, 160, 300, null, null],
|
||||
[0, "진표", null, 0, null, 66, 42, 74, 0, 160, 300, null, null],
|
||||
[0, "정무", null, 0, null, 56, 35, 75, 0, 160, 300, null, null],
|
||||
[0, "정봉2", null, 0, null, 66, 66, 46, 0, 160, 300, null, null],
|
||||
[0, "전만", null, 0, null, 51, 73, 39, 0, 160, 300, null, null],
|
||||
[0, "마균", null, 0, null, 22, 17, 71, 0, 160, 300, null, null],
|
||||
[0, "방회", null, 0, null, 69, 75, 49, 0, 160, 300, null, null],
|
||||
[0, "낙통", null, 0, null, 76, 58, 75, 0, 160, 300, null, null],
|
||||
[0, "육개", null, 0, null, 65, 61, 79, 0, 160, 300, null, null],
|
||||
[0, "유찬", null, 0, null, 78, 81, 59, 0, 160, 300, null, null],
|
||||
[0, "유소", null, 0, null, 68, 53, 74, 0, 160, 300, null, null],
|
||||
[0, "요립", null, 0, null, 32, 15, 76, 0, 160, 300, null, null],
|
||||
[0, "여거", null, 0, null, 78, 51, 71, 0, 160, 300, null, null],
|
||||
[0, "제갈첨", null, 0, null, 70, 57, 76, 0, 160, 300, null, null],
|
||||
[0, "손휴", null, 0, null, 57, 42, 78, 0, 160, 300, null, null],
|
||||
[0, "극정", null, 0, null, 42, 23, 68, 0, 160, 300, null, null],
|
||||
[0, "호분", null, 0, null, 71, 76, 50, 0, 160, 300, null, null],
|
||||
[0, "손량", null, 0, null, 32, 26, 70, 0, 160, 300, null, null],
|
||||
[0, "마막", null, 0, null, 34, 12, 44, 0, 160, 300, null, null],
|
||||
[0, "손호", null, 0, null, 41, 73, 71, 0, 160, 300, null, null],
|
||||
[0, "조모", null, 0, null, 54, 61, 59, 0, 160, 300, null, null],
|
||||
[0, "조환", null, 0, null, 30, 28, 30, 0, 160, 300, null, null],
|
||||
[0, "사마유", null, 0, null, 71, 54, 75, 0, 160, 300, null, null],
|
||||
[0, "제갈상", null, 0, null, 64, 79, 62, 0, 160, 300, null, null],
|
||||
[0, "손화", null, 0, null, 31, 39, 68, 0, 160, 300, null, null],
|
||||
[0, "염우", null, 0, null, 52, 61, 51, 0, 160, 300, null, null],
|
||||
[0, "왕경", null, 0, null, 67, 49, 71, 0, 160, 300, null, null],
|
||||
[0, "왕혼", null, 0, null, 74, 71, 50, 0, 160, 300, null, null],
|
||||
[0, "곽혁", null, 0, null, 33, 29, 70, 0, 160, 300, null, null],
|
||||
[0, "가범", null, 0, null, 60, 50, 73, 0, 160, 300, null, null],
|
||||
[0, "서질", null, 0, null, 68, 83, 24, 0, 160, 300, null, null],
|
||||
[0, "손준", null, 0, null, 64, 70, 48, 0, 160, 300, null, null],
|
||||
[0, "손침", null, 0, null, 58, 55, 65, 0, 160, 300, null, null],
|
||||
[0, "우사", null, 0, null, 61, 34, 74, 0, 160, 300, null, null],
|
||||
[0, "진건", null, 0, null, 72, 71, 50, 0, 160, 300, null, null],
|
||||
[0, "동궐", null, 0, null, 65, 59, 76, 0, 160, 300, null, null],
|
||||
[0, "당자", null, 0, null, 61, 71, 50, 0, 160, 300, null, null],
|
||||
[0, "등충", null, 0, null, 76, 80, 59, 0, 160, 300, null, null],
|
||||
[0, "황숭", null, 0, null, 67, 50, 72, 0, 160, 300, null, null],
|
||||
[0, "화핵", null, 0, null, 20, 24, 71, 0, 160, 300, null, null],
|
||||
[0, "허의", null, 0, null, 51, 74, 15, 0, 160, 300, null, null],
|
||||
[0, "송겸", null, 0, null, 66, 78, 42, 0, 160, 300, null, null],
|
||||
[0, "호제", null, 0, null, 57, 39, 68, 0, 160, 300, null, null],
|
||||
[0, "나헌", null, 0, null, 86, 62, 82, 0, 160, 300, null, null],
|
||||
[0, "노숙2", null, 0, null, 73, 53, 74, 0, 160, 300, null, null],
|
||||
[0, "구성", null, 0, null, 63, 70, 38, 0, 160, 300, null, null],
|
||||
[0, "어부라", null, 0, null, 72, 68, 21, 0, 160, 300, null, null],
|
||||
[0, "아하소과", null, 0, null, 61, 76, 13, 0, 160, 300, null, null],
|
||||
[0, "가비능", null, 0, null, 77, 69, 52, 0, 160, 300, null, null],
|
||||
[0, "구력거", null, 0, null, 80, 68, 50, 0, 160, 300, null, null],
|
||||
[0, "강단", null, 0, null, 65, 83, 48, 0, 160, 300, null, null],
|
||||
[0, "황란", null, 0, null, 63, 75, 44, 0, 160, 300, null, null],
|
||||
[0, "호주천", null, 0, null, 70, 71, 40, 0, 160, 300, null, null],
|
||||
[0, "종리목", null, 0, null, 84, 61, 82, 0, 160, 300, null, null],
|
||||
[0, "제갈교", null, 0, null, 62, 27, 75, 0, 160, 300, null, null],
|
||||
[0, "답돈", null, 0, null, 84, 82, 61, 0, 160, 300, null, null],
|
||||
[0, "반임", null, 0, null, 66, 79, 38, 0, 160, 300, null, null],
|
||||
[0, "보도근", null, 0, null, 64, 73, 50, 0, 160, 300, null, null],
|
||||
[0, "미당대왕", null, 0, null, 59, 69, 21, 0, 160, 300, null, null],
|
||||
[0, "유표2", null, 0, null, 73, 74, 48, 0, 160, 300, null, null],
|
||||
[0, "루반", null, 0, null, 65, 76, 39, 0, 160, 300, null, null],
|
||||
[0, "손관", null, 0, null, 72, 78, 51, 0, 160, 300, null, null],
|
||||
[0, "곽석", null, 0, null, 59, 71, 48, 0, 160, 300, null, null],
|
||||
[0, "주조", null, 0, null, 63, 68, 26, 0, 160, 300, null, null],
|
||||
[0, "장거", null, 0, null, 79, 75, 56, 0, 160, 300, null, null],
|
||||
[0, "장순", null, 0, null, 73, 81, 60, 0, 160, 300, null, null],
|
||||
[0, "철리길", null, 0, null, 77, 70, 52, 0, 160, 300, null, null],
|
||||
[0, "주삭", null, 0, null, 54, 60, 50, 0, 160, 300, null, null],
|
||||
[0, "황월영", null, 0, null, 46, 33, 78, 0, 160, 300, null, null],
|
||||
[0, "채염", null, 0, null, 42, 26, 82, 0, 160, 300, null, null],
|
||||
[0, "소교", null, 0, null, 23, 15, 78, 0, 160, 300, null, null],
|
||||
[0, "신헌영", null, 0, null, 65, 35, 90, 0, 160, 300, null, null, "내가 사내로 태어났더라면..."],
|
||||
[0, "손상향", null, 0, null, 72, 79, 55, 0, 160, 300, null, null],
|
||||
[0, "대교", null, 0, null, 22, 30, 78, 0, 160, 300, null, null],
|
||||
[0, "초선", null, 0, null, 12, 22, 71, 0, 160, 300, null, null],
|
||||
[0, "교모", null, 0, null, 54, 45, 69, 0, 160, 300, null, null],
|
||||
[0, "관구수", null, 0, null, 58, 62, 33, 0, 160, 300, null, null],
|
||||
[0, "관구전", null, 0, null, 63, 47, 69, 0, 160, 300, null, null],
|
||||
[0, "원유", null, 0, null, 56, 40, 73, 0, 160, 300, null, null],
|
||||
[0, "왕광", null, 0, null, 65, 41, 61, 0, 160, 300, null, null],
|
||||
[0, "신창", null, 0, null, 50, 26, 42, 0, 160, 300, null, null],
|
||||
[0, "사마주", null, 0, null, 61, 40, 61, 0, 160, 300, null, null],
|
||||
[0, "양제", null, 0, null, 67, 49, 71, 0, 160, 300, null, null],
|
||||
[0, "성만", null, 0, null, 61, 68, 46, 0, 160, 300, null, null],
|
||||
[0, "오연", null, 0, null, 66, 73, 42, 0, 160, 300, null, null],
|
||||
[0, "맹충", null, 0, null, 47, 28, 72, 0, 160, 300, null, null],
|
||||
[0, "잠혼", null, 0, null, 1, 1, 22, 0, 160, 300, null, null],
|
||||
[0, "사정", null, 0, null, 64, 76, 34, 0, 160, 300, null, null],
|
||||
[0, "심영", null, 0, null, 70, 77, 55, 0, 160, 300, null, null],
|
||||
[0, "도준", null, 0, null, 65, 66, 46, 0, 160, 300, null, null],
|
||||
[0, "만욱", null, 0, null, 21, 25, 71, 0, 160, 300, null, null],
|
||||
[0, "오언", null, 0, null, 76, 81, 59, 0, 160, 300, null, null],
|
||||
[0, "위막", null, 0, null, 57, 62, 59, 0, 160, 300, null, null],
|
||||
[0, "시삭", null, 0, null, 38, 65, 47, 0, 160, 300, null, null],
|
||||
[0, "전속", null, 0, null, 47, 60, 55, 0, 160, 300, null, null],
|
||||
[0, "장화", null, 0, null, 36, 27, 78, 0, 160, 300, null, null],
|
||||
[0, "오거", null, 0, null, 49, 61, 23, 0, 160, 300, null, null],
|
||||
[0, "추정", null, 0, null, 70, 46, 66, 0, 160, 300, null, null],
|
||||
[0, "장특", null, 0, null, 73, 54, 75, 0, 160, 300, null, null],
|
||||
[0, "곽마", null, 0, null, 68, 71, 47, 0, 160, 300, null, null],
|
||||
[0, "석포", null, 0, null, 69, 71, 49, 0, 160, 300, null, null],
|
||||
[0, "견홍", null, 0, null, 70, 74, 53, 0, 160, 300, null, null],
|
||||
[0, "한거자", null, 0, null, 51, 59, 51, 0, 160, 300, null, null],
|
||||
[0, "휴원진", null, 0, null, 52, 68, 45, 0, 160, 300, null, null],
|
||||
[0, "곽원", null, 0, null, 66, 73, 36, 0, 160, 300, null, null],
|
||||
[0, "계옹", null, 0, null, 63, 52, 33, 0, 160, 300, null, null],
|
||||
[0, "이부", null, 0, null, 31, 36, 74, 0, 160, 300, null, null],
|
||||
[0, "왕업", null, 0, null, 33, 6, 35, 0, 160, 300, null, null],
|
||||
[0, "좌혁", null, 0, null, 62, 66, 51, 0, 160, 300, null, null],
|
||||
[0, "화타", null, 0, null, 57, 25, 73, 0, 160, 300, null, null, "아픈 사람들 모두 내게 오시오~"],
|
||||
[0, "사마휘", null, 0, null, 55, 26, 82, 0, 160, 300, null, null, "좋지 좋아~"],
|
||||
[0, "우길", null, 0, null, 23, 15, 90, 0, 160, 300, null, null, "길조로다"],
|
||||
[0, "헌제", null, 0, null, 22, 18, 68, 0, 160, 300, null, null, "한왕실은 정녕 여기서 끝이란 말인가.."],
|
||||
[0, "백기", null, 0, null, 100, 88, 69, 0, 160, 300, null, null],
|
||||
[0, "한신", null, 0, null, 100, 74, 95, 0, 160, 300, null, null],
|
||||
[0, "악비", null, 0, null, 99, 91, 71, 0, 160, 300, null, null],
|
||||
[0, "항적", null, 0, null, 99, 100, 65, 0, 160, 300, null, null],
|
||||
[0, "악의", null, 0, null, 98, 75, 96, 0, 160, 300, null, null],
|
||||
[0, "영정", null, 0, null, 97, 55, 92, 0, 160, 300, null, null],
|
||||
[0, "강상", null, 0, null, 94, 49, 100, 0, 160, 300, null, null],
|
||||
[0, "전단2", null, 0, null, 96, 75, 95, 0, 160, 300, null, null],
|
||||
[0, "이목", null, 0, null, 96, 69, 88, 0, 160, 300, null, null],
|
||||
[0, "염파", null, 0, null, 97, 96, 75, 0, 160, 300, null, null],
|
||||
[0, "왕전", null, 0, null, 94, 64, 83, 0, 160, 300, null, null],
|
||||
[0, "오기", null, 0, null, 94, 66, 95, 0, 160, 300, null, null],
|
||||
[0, "곽거병", null, 0, null, 93, 92, 53, 0, 160, 300, null, null],
|
||||
[0, "영포", null, 0, null, 82, 91, 54, 0, 160, 300, null, null],
|
||||
[0, "이신", null, 0, null, 81, 88, 63, 0, 160, 300, null, null],
|
||||
[0, "몽념", null, 0, null, 87, 86, 65, 0, 160, 300, null, null],
|
||||
[0, "전기", null, 0, null, 80, 85, 44, 0, 160, 300, null, null],
|
||||
[0, "극신", null, 0, null, 76, 83, 42, 0, 160, 300, null, null],
|
||||
[0, "항연", null, 0, null, 89, 80, 61, 0, 160, 300, null, null],
|
||||
[0, "인상여", null, 0, null, 69, 38, 96, 0, 160, 300, null, null],
|
||||
[0, "장자방", null, 0, null, 72, 40, 100, 0, 160, 300, null, null],
|
||||
[0, "관이오", null, 0, null, 85, 64, 99, 0, 160, 300, null, null],
|
||||
[0, "손빈", null, 0, null, 83, 22, 98, 0, 160, 300, null, null],
|
||||
[0, "소진", null, 0, null, 90, 47, 96, 0, 160, 300, null, null],
|
||||
[0, "범증", null, 0, null, 68, 24, 94, 0, 160, 300, null, null],
|
||||
[0, "장의2", null, 0, null, 75, 23, 93, 0, 160, 300, null, null],
|
||||
[0, "공구", null, 0, null, 68, 70, 91, 0, 160, 300, null, null],
|
||||
[0, "소하", null, 0, null, 56, 27, 97, 0, 160, 300, null, null],
|
||||
[0, "한비", null, 0, null, 49, 18, 97, 0, 160, 300, null, null],
|
||||
[0, "이사", null, 0, null, 48, 24, 95, 0, 160, 300, null, null],
|
||||
[0, "전문", null, 0, null, 79, 67, 89, 0, 160, 300, null, null],
|
||||
[0, "황헐", null, 0, null, 81, 68, 88, 0, 160, 300, null, null],
|
||||
[0, "방난", null, 0, null, 88, 95, 66, 0, 160, 300, null, null],
|
||||
[0, "개섭", null, 0, null, 43, 97, 54, 0, 160, 300, null, null],
|
||||
[0, "형가", null, 0, null, 42, 89, 43, 0, 160, 300, null, null],
|
||||
[0, "유방", null, 0, null, 90, 66, 85, 0, 160, 300, null, null, "나는 사람을 쓰는 재주로 천하를 얻었다"],
|
||||
[0, "하리", null, 0, null, 100, 100, 72, 0, 160, 300, null, null, "내 업적을 따라올 사람이 있을까?"],
|
||||
[0, "헹이", null, 0, null, 97, 71, 92, 0, 160, 300, null, null, "맛있다 'ㅅ'"],
|
||||
[0, "나나", null, 0, null, 96, 67, 87, 0, 160, 300, null, null, "이번 전쟁을 계산해보면 말이죠..."],
|
||||
[0, "장임2", null, 0, null, 90, 91, 69, 0, 160, 300, null, null, "으리!"],
|
||||
[0, "하야미", null, 0, null, 94, 73, 95, 0, 160, 300, null, null, "흑막이 되어볼까요"],
|
||||
[0, "이시리스", null, 0, null, 96, 74, 96, 0, 160, 300, null, null],
|
||||
[0, "연채홍", null, 0, null, 93, 73, 94, 0, 160, 300, null, null, "엄마도 천통할수 있다!"],
|
||||
[0, "임사영", null, 0, null, 75, 75, 75, 0, 160, 300, null, null, "일반인 양민입니다"],
|
||||
[0, "장군보", null, 0, null, 88, 90, 68, 0, 160, 300, null, null],
|
||||
[0, "크렌스", null, 0, null, 92, 86, 67, 0, 160, 300, null, null],
|
||||
[0, "콘", null, 0, null, 90, 98, 77, 0, 160, 300, null, null],
|
||||
[0, "리즈나", null, 0, null, 93, 60, 76, 0, 160, 300, null, null, "내가 다 했다"],
|
||||
[0, "오티누스", null, 0, null, 93, 93, 73, 0, 160, 300, null, null],
|
||||
[0, "네시", null, 0, null, 88, 73, 94, 0, 160, 300, null, null, "안 자고 싸우면 이겨요"],
|
||||
[0, "시뉴카린", null, 0, null, 89, 90, 71, 0, 160, 300, null, null, "흔들흔들"],
|
||||
[0, "Hide_D", null, 0, null, 39, 99, 75, 0, 160, 300, null, null]
|
||||
]
|
||||
}
|
||||
@@ -11,9 +11,11 @@
|
||||
|
||||
<table class='tb_layout' style='margin:auto;'>
|
||||
<thead>
|
||||
<tr><td colspan=11><div style='float:right'><input type='checkbox' id="show_unavailable_troops">불가능한 병종 표시</input></div>
|
||||
<?php if($commandName=='모병'): ?>
|
||||
<tr><td align=center colspan=11>모병은 가격 2배의 자금이 소요됩니다.</td></tr>
|
||||
<div style='text-align:center;'>모병은 가격 2배의 자금이 소요됩니다.</div>
|
||||
<?php endif; ?>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td colspan=11 align=center class='bg2'>
|
||||
현재 기술력 : <?=$techLevelText?>
|
||||
@@ -43,6 +45,7 @@
|
||||
<?php foreach($armTypeCrews as $crewObj): ?>
|
||||
<tr
|
||||
id="crewType<?=$crewObj->id?>"
|
||||
class="show_default_<?=$crewObj->showDefault?>"
|
||||
style='height:64px;background-color:<?=$crewObj->bgcolor?>'
|
||||
data-rice="<?=$crewObj->baseRice?>"
|
||||
data-cost="<?=$crewObj->baseCost?>"
|
||||
@@ -177,5 +180,16 @@ $(function(){
|
||||
});
|
||||
|
||||
$('.btn_fill').click();
|
||||
|
||||
$('#show_unavailable_troops').change(function(){
|
||||
var show = $('#show_unavailable_troops').is(":checked");
|
||||
if(show){
|
||||
$('.show_default_false').show();
|
||||
}
|
||||
else{
|
||||
$('.show_default_false').hide();
|
||||
}
|
||||
});
|
||||
$('.show_default_false').hide();
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,193 @@
|
||||
<font size=2>병사를 모집합니다.
|
||||
<?php if($commandName=='무작위 징병'): ?>
|
||||
훈련과 사기치는 낮지만 가격이 저렴합니다.<br>
|
||||
<?php else: ?>
|
||||
훈련과 사기치는 높지만 자금이 많이 듭니다.
|
||||
<?php endif; ?>
|
||||
가능한 수보다 많게 입력하면 가능한 최대 병사를 모집합니다.<br>
|
||||
이미 병사가 있는 경우 추가<?=$commandName?>되며, 병종이 다를경우는 기존의 병사는 소집해제됩니다.<br>
|
||||
병종은 영토에 상관 없이 기술 등급이 충족하는 병종 중 하나가 무작위로 선택됩니다.
|
||||
<table class='tb_layout' style='margin:auto;'>
|
||||
<thead>
|
||||
<tr><td colspan=11>
|
||||
<?php if($commandName=='무작위 모병'): ?>
|
||||
<div style='text-align:center;'>모병은 가격 2배의 자금이 소요됩니다.</div>
|
||||
<?php endif; ?>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td colspan=11 align=center class='bg2'>
|
||||
현재 기술력 : <?=$techLevelText?>
|
||||
현재 통솔 : <?=$leader?><?=($leader!=$fullLeader)?"({$fullLeader})":''?>
|
||||
현재 병종 : <?=$crewTypeName?>
|
||||
현재 병사 : <?=$crew?>
|
||||
현재 자금 : <?=$gold?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=64 align=center class='bg1'>사진</td>
|
||||
<td width=64 align=center class='bg1'>병종</td>
|
||||
<td width=40 align=center class='bg1'>공격</td>
|
||||
<td width=40 align=center class='bg1'>방어</td>
|
||||
<td width=40 align=center class='bg1'>기동</td>
|
||||
<td width=40 align=center class='bg1'>회피</td>
|
||||
<td width=40 align=center class='bg1'>가격</td>
|
||||
<td width=40 align=center class='bg1'>군량</td>
|
||||
<td width=180 align=center class='bg1'>병사수</td>
|
||||
<td width=50 align=center class='bg1'>행동</td>
|
||||
<td width=300 align=center class='bg1'>특징</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($armTypes as [$armName,$armTypeCrews]): ?>
|
||||
<tr><td colspan=11><?=$armName?> 계열</td></tr>
|
||||
<?php foreach($armTypeCrews as $crewObj): ?>
|
||||
<tr
|
||||
id="crewType<?=$crewObj->id?>"
|
||||
class="show_default_<?=$crewObj->showDefault?>"
|
||||
style='height:64px;background-color:<?=$crewObj->bgcolor?>'
|
||||
data-rice="<?=$crewObj->baseRice?>"
|
||||
data-cost="<?=$crewObj->baseCost?>"
|
||||
>
|
||||
<td style='background:#222222 no-repeat center url("<?=$crewObj->img?>");background-size:64px'></td>
|
||||
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->name?></td>
|
||||
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->attack?></td>
|
||||
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->defence?></td>
|
||||
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->speed?></td>
|
||||
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->avoid?></td>
|
||||
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->baseCostShort?></td>
|
||||
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->baseRiceShort?></td>
|
||||
<td style='text-align:center;vertical-align:middle;' class='input_form' data-crewtype='<?=$crewObj->id?>'>
|
||||
<input type=button value='절반' class='btn_half'
|
||||
><input type=button value='채우기' class='btn_fill'
|
||||
><input type=button value='가득' class='btn_full'
|
||||
><br>
|
||||
<input type=text data-crewtype='<?=$crewObj->id?>' class=form_double name=double maxlength=3 size=3
|
||||
style=text-align:right;color:white;background-color:black
|
||||
>00명
|
||||
<input type=text class=form_cost name=cost maxlength=5 size=5 readonly
|
||||
style=text-align:right;color:white;background-color:black>원
|
||||
|
||||
</td>
|
||||
<td style='position:relative;height:64px;'><input
|
||||
type=submit value='<?=mb_substr($commandName, mb_strlen($commandName) - 2)?>' class='submit_btn'
|
||||
style='width:100%;height:44px;margin:10px 0;display:block;position: absolute;left:0;top:0;'
|
||||
></td>
|
||||
<td><?=$crewObj->info?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<form id='post_form' action='c_double.php' type='post'>
|
||||
<input type='hidden' name='double' class='form_amount' value='1'>
|
||||
<input type='hidden' name='third' class='form_crewtype' value='<?=$crewObj->id?>'>
|
||||
<input type='hidden' name='command' value='<?=$command?>'>
|
||||
<?php foreach($turn as $turnItem) : ?>
|
||||
<input type=hidden name='turn[]' value='<?=$turnItem?>'>
|
||||
<?php endforeach; ?>
|
||||
</form>
|
||||
<script>
|
||||
var currentTech = <?=$tech?>;
|
||||
var leader = <?=$leader?>;
|
||||
var fullLeader = <?=$fullLeader?>;
|
||||
var currentCrewType = <?=$crewType?>;
|
||||
var currentCrew = <?=$crew?>;
|
||||
var currentGold = <?=$gold?>;
|
||||
var is모병 = <?=($commandName=='무작위 모병')?'true':'false'?>;
|
||||
|
||||
window.calc = function(id) {
|
||||
var $obj = $('#crewType{0}'.format(id));
|
||||
var crew = $obj.find('.form_double').val();
|
||||
var baseCost = $obj.data('cost');
|
||||
var $cost = $obj.find('.form_cost');
|
||||
|
||||
var cost = crew * baseCost;
|
||||
if(is모병){
|
||||
cost *= 2;
|
||||
}
|
||||
$cost.val(Math.round(cost));
|
||||
}
|
||||
|
||||
$(function(){
|
||||
var $postForm = $('#post_form');
|
||||
var $formAmount = $postForm.find('.form_amount');
|
||||
var $formCrewtype = $postForm.find('.form_crewtype');
|
||||
$('.form_double').on('keyup change',function(e){
|
||||
var $this = $(this);
|
||||
var $parent = $this.parents('.input_form');
|
||||
var crewtype = parseInt($parent.data('crewtype'));
|
||||
calc(crewtype);
|
||||
$formCrewtype.val(crewtype);
|
||||
$formAmount.val($this.val());
|
||||
|
||||
if(e.which === 13){
|
||||
$postForm.submit();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.btn_half').click(function(){
|
||||
var $this = $(this);
|
||||
var $parent = $this.closest('.input_form');
|
||||
var crewtype = parseInt($parent.data('crewtype'));
|
||||
var $input = $parent.find('.form_double:eq(0)');
|
||||
|
||||
var fillValue = Math.round(leader / 2);
|
||||
$formCrewtype.val(crewtype);
|
||||
$input.val(fillValue).change();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.btn_fill').click(function(){
|
||||
var $this = $(this);
|
||||
var $parent = $this.closest('.input_form');
|
||||
var crewtype = parseInt($parent.data('crewtype'));
|
||||
var $input = $parent.find('.form_double:eq(0)');
|
||||
|
||||
var fillValue = Math.ceil((leader*100 - currentCrew)/100);
|
||||
if(crewtype != currentCrewType){
|
||||
fillValue = leader;
|
||||
}
|
||||
$formCrewtype.val(crewtype);
|
||||
$input.val(fillValue).change();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.btn_full').click(function(){
|
||||
var $this = $(this);
|
||||
var $parent = $this.closest('.input_form');
|
||||
var crewtype = parseInt($parent.data('crewtype'));
|
||||
var $input = $parent.find('.form_double:eq(0)');
|
||||
|
||||
var fillValue = fullLeader + 15;
|
||||
$formCrewtype.val(crewtype);
|
||||
$input.val(fillValue).change();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.submit_btn').click(function(){
|
||||
var $this = $(this);
|
||||
var $parent = $this.closest('tr').find('.input_form');
|
||||
var crewtype = parseInt($parent.data('crewtype'));
|
||||
var $input = $parent.find('.form_double');
|
||||
|
||||
$formCrewtype.val(crewtype);
|
||||
$formAmount.val($input.val());
|
||||
|
||||
$postForm.submit();
|
||||
});
|
||||
|
||||
$('.btn_fill').click();
|
||||
|
||||
$('#show_unavailable_troops').change(function(){
|
||||
var show = $('#show_unavailable_troops').is(":checked");
|
||||
if(show){
|
||||
$('.show_default_false').show();
|
||||
}
|
||||
else{
|
||||
$('.show_default_false').hide();
|
||||
}
|
||||
});
|
||||
$('.show_default_false').hide();
|
||||
});
|
||||
</script>
|
||||
+13
-13
@@ -183,19 +183,19 @@ class StringUtil
|
||||
}
|
||||
|
||||
public static function uniord(string $c) {
|
||||
if (ord($c{0}) >=0 && ord($c{0}) <= 127)
|
||||
return ord($c{0});
|
||||
if (ord($c{0}) >= 192 && ord($c{0}) <= 223)
|
||||
return (ord($c{0})-192)*64 + (ord($c{1})-128);
|
||||
if (ord($c{0}) >= 224 && ord($c{0}) <= 239)
|
||||
return (ord($c{0})-224)*4096 + (ord($c{1})-128)*64 + (ord($c{2})-128);
|
||||
if (ord($c{0}) >= 240 && ord($c{0}) <= 247)
|
||||
return (ord($c{0})-240)*262144 + (ord($c{1})-128)*4096 + (ord($c{2})-128)*64 + (ord($c{3})-128);
|
||||
if (ord($c{0}) >= 248 && ord($c{0}) <= 251)
|
||||
return (ord($c{0})-248)*16777216 + (ord($c{1})-128)*262144 + (ord($c{2})-128)*4096 + (ord($c{3})-128)*64 + (ord($c{4})-128);
|
||||
if (ord($c{0}) >= 252 && ord($c{0}) <= 253)
|
||||
return (ord($c{0})-252)*1073741824 + (ord($c{1})-128)*16777216 + (ord($c{2})-128)*262144 + (ord($c{3})-128)*4096 + (ord($c{4})-128)*64 + (ord($c{5})-128);
|
||||
if (ord($c{0}) >= 254 && ord($c{0}) <= 255) // error
|
||||
if (ord($c[0]) >=0 && ord($c[0]) <= 127)
|
||||
return ord($c[0]);
|
||||
if (ord($c[0]) >= 192 && ord($c[0]) <= 223)
|
||||
return (ord($c[0])-192)*64 + (ord($c[1])-128);
|
||||
if (ord($c[0]) >= 224 && ord($c[0]) <= 239)
|
||||
return (ord($c[0])-224)*4096 + (ord($c[1])-128)*64 + (ord($c[2])-128);
|
||||
if (ord($c[0]) >= 240 && ord($c[0]) <= 247)
|
||||
return (ord($c[0])-240)*262144 + (ord($c[1])-128)*4096 + (ord($c[2])-128)*64 + (ord($c[3])-128);
|
||||
if (ord($c[0]) >= 248 && ord($c[0]) <= 251)
|
||||
return (ord($c[0])-248)*16777216 + (ord($c[1])-128)*262144 + (ord($c[2])-128)*4096 + (ord($c[3])-128)*64 + (ord($c[4])-128);
|
||||
if (ord($c[0]) >= 252 && ord($c[0]) <= 253)
|
||||
return (ord($c[0])-252)*1073741824 + (ord($c[1])-128)*16777216 + (ord($c[2])-128)*262144 + (ord($c[3])-128)*4096 + (ord($c[4])-128)*64 + (ord($c[5])-128);
|
||||
if (ord($c[0]) >= 254 && ord($c[0]) <= 255) // error
|
||||
return FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Vendored
+8
-4
@@ -1,10 +1,14 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../leafo/scssphp/bin" && pwd)
|
||||
dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../scssphp/scssphp/bin" && pwd)
|
||||
|
||||
if [ -d /proc/cygdrive ] && [[ $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
|
||||
# We are in Cgywin using Windows php, so the path must be translated
|
||||
dir=$(cygpath -m "$dir");
|
||||
if [ -d /proc/cygdrive ]; then
|
||||
case $(which php) in
|
||||
$(readlink -n /proc/cygdrive)/*)
|
||||
# We are in Cygwin using Windows php, so the path must be translated
|
||||
dir=$(cygpath -m "$dir");
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
"${dir}/pscss" "$@"
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
@ECHO OFF
|
||||
setlocal DISABLEDELAYEDEXPANSION
|
||||
SET BIN_TARGET=%~dp0/../leafo/scssphp/bin/pscss
|
||||
SET BIN_TARGET=%~dp0/../scssphp/scssphp/bin/pscss
|
||||
php "%BIN_TARGET%" %*
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
open_collective: medoo
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Information**
|
||||
- Version of Medoo:
|
||||
- Type of Database (MySQL, MSSQL, SQLite...):
|
||||
- System (Liunx\Windows\Mac):
|
||||
|
||||
**Detail Code**
|
||||
The detail code causes the problem.
|
||||
|
||||
**Expected output**
|
||||
A clear and concise description of what output you expected.
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Angel Lai
|
||||
Copyright (c) 2019 Angel Lai
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
Vendored
+6
-4
@@ -6,9 +6,11 @@
|
||||
<a href="https://packagist.org/packages/catfan/medoo"><img alt="Total Downloads" src="https://poser.pugx.org/catfan/medoo/downloads"></a>
|
||||
<a href="https://packagist.org/packages/catfan/medoo"><img alt="Latest Stable Version" src="https://poser.pugx.org/catfan/medoo/v/stable"></a>
|
||||
<a href="https://packagist.org/packages/catfan/medoo"><img alt="License" src="https://poser.pugx.org/catfan/medoo/license"></a>
|
||||
<a href="https://opencollective.com/medoo"><img alt="Backers on Open Collective" src="https://opencollective.com/Medoo/backers/badge.svg"></a>
|
||||
<a href="https://opencollective.com/medoo"><img alt="Sponsors on Open Collective" src="https://opencollective.com/Medoo/sponsors/badge.svg"> </a>
|
||||
</p>
|
||||
|
||||
> The Lightest PHP database framework to accelerate development
|
||||
> The lightweight PHP database framework to accelerate development
|
||||
|
||||
## Features
|
||||
|
||||
@@ -26,7 +28,7 @@
|
||||
|
||||
## Requirement
|
||||
|
||||
PHP 5.4+ and PDO extension installed
|
||||
PHP 5.4+ and PDO extension installed, recommend PHP 7.0+
|
||||
|
||||
## Get Started
|
||||
|
||||
@@ -34,7 +36,7 @@ PHP 5.4+ and PDO extension installed
|
||||
|
||||
Add Medoo to composer.json configuration file.
|
||||
```
|
||||
$ composer require catfan/Medoo
|
||||
$ composer require catfan/medoo
|
||||
```
|
||||
|
||||
And update the composer
|
||||
@@ -43,7 +45,7 @@ $ composer update
|
||||
```
|
||||
|
||||
```php
|
||||
// If you installed via composer, just use this code to requrie autoloader on the top of your projects.
|
||||
// If you installed via composer, just use this code to require autoloader on the top of your projects.
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
// Using Medoo namespace
|
||||
|
||||
Vendored
+4
-4
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "catfan/medoo",
|
||||
"type": "framework",
|
||||
"description": "The lightest PHP database framework to accelerate development",
|
||||
"keywords": ["database", "lightweight", "PHP framework", "SQL", "MySQL", "MSSQL", "SQLite", "PostgreSQL", "MariaDB", "Oracle"],
|
||||
"description": "The lightweight PHP database framework to accelerate development",
|
||||
"keywords": ["database", "database library", "lightweight", "PHP framework", "SQL", "MySQL", "MSSQL", "SQLite", "PostgreSQL", "MariaDB", "Oracle"],
|
||||
"homepage": "https://medoo.in",
|
||||
"license": "MIT",
|
||||
"support": {
|
||||
@@ -18,10 +18,10 @@
|
||||
},
|
||||
"suggest": {
|
||||
"ext-pdo_mysql": "For MySQL or MariaDB database",
|
||||
"ext-pdo_sqlsrv": "For MSSQL database",
|
||||
"ext-pdo_sqlsrv": "For MSSQL database on both Window/Liunx platform",
|
||||
"ext-pdo_dblib": "For MSSQL or Sybase database on Linux/UNIX platform",
|
||||
"ext-pdo_oci": "For Oracle database",
|
||||
"ext-pdo_oci8": "For Oracle version 8 database",
|
||||
"ext-pdo_oci8": "For Oracle version 8 database",
|
||||
"ext-pdo_pqsql": "For PostgreSQL database",
|
||||
"ext-pdo_sqlite": "For SQLite database"
|
||||
},
|
||||
|
||||
Vendored
+503
-209
@@ -2,9 +2,9 @@
|
||||
/*!
|
||||
* Medoo database framework
|
||||
* https://medoo.in
|
||||
* Version 1.5.7
|
||||
* Version 1.7.8
|
||||
*
|
||||
* Copyright 2018, Angel Lai
|
||||
* Copyright 2019, Angel Lai
|
||||
* Released under the MIT license
|
||||
*/
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace Medoo;
|
||||
use PDO;
|
||||
use Exception;
|
||||
use PDOException;
|
||||
use InvalidArgumentException;
|
||||
|
||||
class Raw {
|
||||
public $map;
|
||||
@@ -29,7 +30,7 @@ class Medoo
|
||||
|
||||
protected $statement;
|
||||
|
||||
protected $option = [];
|
||||
protected $dsn;
|
||||
|
||||
protected $logs = [];
|
||||
|
||||
@@ -39,16 +40,18 @@ class Medoo
|
||||
|
||||
protected $guid = 0;
|
||||
|
||||
public function __construct($options = null)
|
||||
{
|
||||
if (!is_array($options))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
protected $errorInfo = null;
|
||||
|
||||
public function __construct(array $options)
|
||||
{
|
||||
if (isset($options[ 'database_type' ]))
|
||||
{
|
||||
$this->type = strtolower($options[ 'database_type' ]);
|
||||
|
||||
if ($this->type === 'mariadb')
|
||||
{
|
||||
$this->type = 'mysql';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($options[ 'prefix' ]))
|
||||
@@ -56,23 +59,47 @@ class Medoo
|
||||
$this->prefix = $options[ 'prefix' ];
|
||||
}
|
||||
|
||||
if (isset($options[ 'option' ]))
|
||||
{
|
||||
$this->option = $options[ 'option' ];
|
||||
}
|
||||
|
||||
if (isset($options[ 'logging' ]) && is_bool($options[ 'logging' ]))
|
||||
{
|
||||
$this->logging = $options[ 'logging' ];
|
||||
}
|
||||
|
||||
if (isset($options[ 'command' ]) && is_array($options[ 'command' ]))
|
||||
$option = isset($options[ 'option' ]) ? $options[ 'option' ] : [];
|
||||
$commands = (isset($options[ 'command' ]) && is_array($options[ 'command' ])) ? $options[ 'command' ] : [];
|
||||
|
||||
switch ($this->type)
|
||||
{
|
||||
$commands = $options[ 'command' ];
|
||||
case 'mysql':
|
||||
// Make MySQL using standard quoted identifier
|
||||
$commands[] = 'SET SQL_MODE=ANSI_QUOTES';
|
||||
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
// Keep MSSQL QUOTED_IDENTIFIER is ON for standard quoting
|
||||
$commands[] = 'SET QUOTED_IDENTIFIER ON';
|
||||
|
||||
// Make ANSI_NULLS is ON for NULL value
|
||||
$commands[] = 'SET ANSI_NULLS ON';
|
||||
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
||||
if (isset($options[ 'pdo' ]))
|
||||
{
|
||||
$commands = [];
|
||||
if (!$options[ 'pdo' ] instanceof PDO)
|
||||
{
|
||||
throw new InvalidArgumentException('Invalid PDO object supplied');
|
||||
}
|
||||
|
||||
$this->pdo = $options[ 'pdo' ];
|
||||
|
||||
foreach ($commands as $value)
|
||||
{
|
||||
$this->pdo->exec($value);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (isset($options[ 'dsn' ]))
|
||||
@@ -83,7 +110,7 @@ class Medoo
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
throw new InvalidArgumentException('Invalid DSN option supplied');
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -100,7 +127,6 @@ class Medoo
|
||||
|
||||
switch ($this->type)
|
||||
{
|
||||
case 'mariadb':
|
||||
case 'mysql':
|
||||
$attr = [
|
||||
'driver' => 'mysql',
|
||||
@@ -121,8 +147,6 @@ class Medoo
|
||||
}
|
||||
}
|
||||
|
||||
// Make MySQL using standard quoted identifier
|
||||
$commands[] = 'SET SQL_MODE=ANSI_QUOTES';
|
||||
break;
|
||||
|
||||
case 'pgsql':
|
||||
@@ -176,6 +200,16 @@ class Medoo
|
||||
'host' => $options[ 'server' ] . ($is_port ? ':' . $port : ''),
|
||||
'dbname' => $options[ 'database_name' ]
|
||||
];
|
||||
|
||||
if (isset($options[ 'appname' ]))
|
||||
{
|
||||
$attr[ 'appname' ] = $options[ 'appname' ];
|
||||
}
|
||||
|
||||
if (isset($options[ 'charset' ]))
|
||||
{
|
||||
$attr[ 'charset' ] = $options[ 'charset' ];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -184,13 +218,46 @@ class Medoo
|
||||
'Server' => $options[ 'server' ] . ($is_port ? ',' . $port : ''),
|
||||
'Database' => $options[ 'database_name' ]
|
||||
];
|
||||
|
||||
if (isset($options[ 'appname' ]))
|
||||
{
|
||||
$attr[ 'APP' ] = $options[ 'appname' ];
|
||||
}
|
||||
|
||||
$config = [
|
||||
'ApplicationIntent',
|
||||
'AttachDBFileName',
|
||||
'Authentication',
|
||||
'ColumnEncryption',
|
||||
'ConnectionPooling',
|
||||
'Encrypt',
|
||||
'Failover_Partner',
|
||||
'KeyStoreAuthentication',
|
||||
'KeyStorePrincipalId',
|
||||
'KeyStoreSecret',
|
||||
'LoginTimeout',
|
||||
'MultipleActiveResultSets',
|
||||
'MultiSubnetFailover',
|
||||
'Scrollable',
|
||||
'TraceFile',
|
||||
'TraceOn',
|
||||
'TransactionIsolation',
|
||||
'TransparentNetworkIPResolution',
|
||||
'TrustServerCertificate',
|
||||
'WSID',
|
||||
];
|
||||
|
||||
foreach ($config as $value)
|
||||
{
|
||||
$keyname = strtolower(preg_replace(['/([a-z\d])([A-Z])/', '/([^_])([A-Z][a-z])/'], '$1_$2', $value));
|
||||
|
||||
if (isset($options[ $keyname ]))
|
||||
{
|
||||
$attr[ $value ] = $options[ $keyname ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Keep MSSQL QUOTED_IDENTIFIER is ON for standard quoting
|
||||
$commands[] = 'SET QUOTED_IDENTIFIER ON';
|
||||
|
||||
// Make ANSI_NULLS is ON for NULL value
|
||||
$commands[] = 'SET ANSI_NULLS ON';
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
@@ -203,8 +270,18 @@ class Medoo
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($attr))
|
||||
{
|
||||
throw new InvalidArgumentException('Incorrect connection options');
|
||||
}
|
||||
|
||||
$driver = $attr[ 'driver' ];
|
||||
|
||||
if (!in_array($driver, PDO::getAvailableDrivers()))
|
||||
{
|
||||
throw new InvalidArgumentException("Unsupported PDO driver: {$driver}");
|
||||
}
|
||||
|
||||
unset($attr[ 'driver' ]);
|
||||
|
||||
$stack = [];
|
||||
@@ -214,22 +291,27 @@ class Medoo
|
||||
$stack[] = is_int($key) ? $value : $key . '=' . $value;
|
||||
}
|
||||
|
||||
$dsn = $driver . ':' . implode($stack, ';');
|
||||
$dsn = $driver . ':' . implode(';', $stack);
|
||||
|
||||
if (
|
||||
in_array($this->type, ['mariadb', 'mysql', 'pgsql', 'sybase', 'mssql']) &&
|
||||
in_array($this->type, ['mysql', 'pgsql', 'sybase', 'mssql']) &&
|
||||
isset($options[ 'charset' ])
|
||||
)
|
||||
{
|
||||
$commands[] = "SET NAMES '" . $options[ 'charset' ] . "'";
|
||||
$commands[] = "SET NAMES '{$options[ 'charset' ]}'" . (
|
||||
$this->type === 'mysql' && isset($options[ 'collation' ]) ?
|
||||
" COLLATE '{$options[ 'collation' ]}'" : ''
|
||||
);
|
||||
}
|
||||
|
||||
$this->dsn = $dsn;
|
||||
|
||||
try {
|
||||
$this->pdo = new PDO(
|
||||
$dsn,
|
||||
isset($options[ 'username' ]) ? $options[ 'username' ] : null,
|
||||
isset($options[ 'password' ]) ? $options[ 'password' ] : null,
|
||||
$this->option
|
||||
$option
|
||||
);
|
||||
|
||||
foreach ($commands as $value)
|
||||
@@ -242,18 +324,6 @@ class Medoo
|
||||
}
|
||||
}
|
||||
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
$aggregation = ['avg', 'count', 'max', 'min', 'sum'];
|
||||
|
||||
if (in_array($name, $aggregation))
|
||||
{
|
||||
array_unshift($arguments, $name);
|
||||
|
||||
return call_user_func_array([$this, 'aggregate'], $arguments);
|
||||
}
|
||||
}
|
||||
|
||||
public function query($query, $map = [])
|
||||
{
|
||||
$raw = $this->raw($query, $map);
|
||||
@@ -265,6 +335,8 @@ class Medoo
|
||||
|
||||
public function exec($query, $map = [])
|
||||
{
|
||||
$this->statement = null;
|
||||
|
||||
if ($this->debug_mode)
|
||||
{
|
||||
echo $this->generate($query, $map);
|
||||
@@ -285,28 +357,37 @@ class Medoo
|
||||
|
||||
$statement = $this->pdo->prepare($query);
|
||||
|
||||
if ($statement)
|
||||
if (!$statement)
|
||||
{
|
||||
foreach ($map as $key => $value)
|
||||
{
|
||||
$statement->bindValue($key, $value[ 0 ], $value[ 1 ]);
|
||||
}
|
||||
$this->errorInfo = $this->pdo->errorInfo();
|
||||
$this->statement = null;
|
||||
|
||||
$statement->execute();
|
||||
|
||||
$this->statement = $statement;
|
||||
|
||||
return $statement;
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
$this->statement = $statement;
|
||||
|
||||
foreach ($map as $key => $value)
|
||||
{
|
||||
$statement->bindValue($key, $value[ 0 ], $value[ 1 ]);
|
||||
}
|
||||
|
||||
$execute = $statement->execute();
|
||||
|
||||
$this->errorInfo = $statement->errorInfo();
|
||||
|
||||
if (!$execute)
|
||||
{
|
||||
$this->statement = null;
|
||||
}
|
||||
|
||||
return $statement;
|
||||
}
|
||||
|
||||
protected function generate($query, $map)
|
||||
{
|
||||
$identifier = [
|
||||
'mysql' => '`$1`',
|
||||
'mariadb' => '`$1`',
|
||||
'mssql' => '[$1]'
|
||||
];
|
||||
|
||||
@@ -396,6 +477,11 @@ class Medoo
|
||||
|
||||
protected function tableQuote($table)
|
||||
{
|
||||
if (!preg_match('/^[a-zA-Z0-9_]+$/i', $table))
|
||||
{
|
||||
throw new InvalidArgumentException("Incorrect table name \"$table\"");
|
||||
}
|
||||
|
||||
return '"' . $this->prefix . $table . '"';
|
||||
}
|
||||
|
||||
@@ -430,6 +516,11 @@ class Medoo
|
||||
|
||||
protected function columnQuote($string)
|
||||
{
|
||||
if (!preg_match('/^[a-zA-Z0-9_]+(\.?[a-zA-Z0-9_]+)?$/i', $string))
|
||||
{
|
||||
throw new InvalidArgumentException("Incorrect column name \"$string\"");
|
||||
}
|
||||
|
||||
if (strpos($string, '.') !== false)
|
||||
{
|
||||
return '"' . $this->prefix . str_replace('.', '"."', $string) . '"';
|
||||
@@ -438,7 +529,7 @@ class Medoo
|
||||
return '"' . $string . '"';
|
||||
}
|
||||
|
||||
protected function columnPush(&$columns, &$map)
|
||||
protected function columnPush(&$columns, &$map, $root, $is_join = false)
|
||||
{
|
||||
if ($columns === '*')
|
||||
{
|
||||
@@ -454,23 +545,34 @@ class Medoo
|
||||
|
||||
foreach ($columns as $key => $value)
|
||||
{
|
||||
if (is_array($value))
|
||||
if (!is_int($key) && is_array($value) && $root && count(array_keys($columns)) === 1)
|
||||
{
|
||||
$stack[] = $this->columnPush($value, $map);
|
||||
$stack[] = $this->columnQuote($key);
|
||||
|
||||
$stack[] = $this->columnPush($value, $map, false, $is_join);
|
||||
}
|
||||
elseif (is_array($value))
|
||||
{
|
||||
$stack[] = $this->columnPush($value, $map, false, $is_join);
|
||||
}
|
||||
elseif (!is_int($key) && $raw = $this->buildRaw($value, $map))
|
||||
{
|
||||
preg_match('/(?<column>[a-zA-Z0-9_\.]+)(\s*\[(?<type>(String|Bool|Int|Number))\])?/i', $key, $match);
|
||||
|
||||
$stack[] = $raw . ' AS ' . $this->columnQuote( $match[ 'column' ] );
|
||||
$stack[] = $raw . ' AS ' . $this->columnQuote($match[ 'column' ]);
|
||||
}
|
||||
elseif (is_int($key) && is_string($value))
|
||||
{
|
||||
if ($is_join && strpos($value, '*') !== false)
|
||||
{
|
||||
throw new InvalidArgumentException('Cannot use table.* to select all columns while joining table');
|
||||
}
|
||||
|
||||
preg_match('/(?<column>[a-zA-Z0-9_\.]+)(?:\s*\((?<alias>[a-zA-Z0-9_]+)\))?(?:\s*\[(?<type>(?:String|Bool|Int|Number|Object|JSON))\])?/i', $value, $match);
|
||||
|
||||
if (!empty($match[ 'alias' ]))
|
||||
{
|
||||
$stack[] = $this->columnQuote( $match[ 'column' ] ) . ' AS ' . $this->columnQuote( $match[ 'alias' ] );
|
||||
$stack[] = $this->columnQuote($match[ 'column' ]) . ' AS ' . $this->columnQuote($match[ 'alias' ]);
|
||||
|
||||
$columns[ $key ] = $match[ 'alias' ];
|
||||
|
||||
@@ -481,12 +583,12 @@ class Medoo
|
||||
}
|
||||
else
|
||||
{
|
||||
$stack[] = $this->columnQuote( $match[ 'column' ] );
|
||||
$stack[] = $this->columnQuote($match[ 'column' ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return implode($stack, ',');
|
||||
return implode(',', $stack);
|
||||
}
|
||||
|
||||
protected function arrayQuote($array)
|
||||
@@ -498,7 +600,7 @@ class Medoo
|
||||
$stack[] = is_int($value) ? $value : $this->pdo->quote($value);
|
||||
}
|
||||
|
||||
return implode($stack, ',');
|
||||
return implode(',', $stack);
|
||||
}
|
||||
|
||||
protected function innerConjunct($data, $map, $conjunctor, $outer_conjunctor)
|
||||
@@ -560,7 +662,7 @@ class Medoo
|
||||
if (is_numeric($value))
|
||||
{
|
||||
$condition .= $map_key;
|
||||
$map[ $map_key ] = [$value, PDO::PARAM_INT];
|
||||
$map[ $map_key ] = [$value, is_float($value) ? PDO::PARAM_STR : PDO::PARAM_INT];
|
||||
}
|
||||
elseif ($raw = $this->buildRaw($value, $map))
|
||||
{
|
||||
@@ -587,8 +689,10 @@ class Medoo
|
||||
|
||||
foreach ($value as $index => $item)
|
||||
{
|
||||
$placeholders[] = $map_key . $index . '_i';
|
||||
$map[ $map_key . $index . '_i' ] = $this->typeMap($item, gettype($item));
|
||||
$stack_key = $map_key . $index . '_i';
|
||||
|
||||
$placeholders[] = $stack_key;
|
||||
$map[ $stack_key ] = $this->typeMap($item, gettype($item));
|
||||
}
|
||||
|
||||
$stack[] = $column . ' NOT IN (' . implode(', ', $placeholders) . ')';
|
||||
@@ -635,7 +739,7 @@ class Medoo
|
||||
{
|
||||
$item = strval($item);
|
||||
|
||||
if (!preg_match('/(\[.+\]|_|%.+|.+%)/', $item))
|
||||
if (!preg_match('/(\[.+\]|[\*\?\!\%#^-_]|%.+|.+%)/', $item))
|
||||
{
|
||||
$item = '%' . $item . '%';
|
||||
}
|
||||
@@ -682,8 +786,10 @@ class Medoo
|
||||
|
||||
foreach ($value as $index => $item)
|
||||
{
|
||||
$placeholders[] = $map_key . $index . '_i';
|
||||
$map[ $map_key . $index . '_i' ] = $this->typeMap($item, gettype($item));
|
||||
$stack_key = $map_key . $index . '_i';
|
||||
|
||||
$placeholders[] = $stack_key;
|
||||
$map[ $stack_key ] = $this->typeMap($item, gettype($item));
|
||||
}
|
||||
|
||||
$stack[] = $column . ' IN (' . implode(', ', $placeholders) . ')';
|
||||
@@ -728,7 +834,7 @@ class Medoo
|
||||
$where_clause = ' WHERE ' . $this->dataImplode($conditions, $map, ' AND');
|
||||
}
|
||||
|
||||
if (isset($where[ 'MATCH' ]))
|
||||
if (isset($where[ 'MATCH' ]) && $this->type === 'mysql')
|
||||
{
|
||||
$MATCH = $where[ 'MATCH' ];
|
||||
|
||||
@@ -748,7 +854,7 @@ class Medoo
|
||||
$mode = ' ' . $mode_array[ $MATCH[ 'mode' ] ];
|
||||
}
|
||||
|
||||
$columns = implode(array_map([$this, 'columnQuote'], $MATCH[ 'columns' ]), ', ');
|
||||
$columns = implode(', ', array_map([$this, 'columnQuote'], $MATCH[ 'columns' ]));
|
||||
$map_key = $this->mapKey();
|
||||
$map[ $map_key ] = [$MATCH[ 'keyword' ], PDO::PARAM_STR];
|
||||
|
||||
@@ -769,7 +875,7 @@ class Medoo
|
||||
$stack[] = $this->columnQuote($value);
|
||||
}
|
||||
|
||||
$where_clause .= ' GROUP BY ' . implode($stack, ',');
|
||||
$where_clause .= ' GROUP BY ' . implode(',', $stack);
|
||||
}
|
||||
elseif ($raw = $this->buildRaw($GROUP, $map))
|
||||
{
|
||||
@@ -817,7 +923,7 @@ class Medoo
|
||||
}
|
||||
}
|
||||
|
||||
$where_clause .= ' ORDER BY ' . implode($stack, ',');
|
||||
$where_clause .= ' ORDER BY ' . implode(',', $stack);
|
||||
}
|
||||
elseif ($raw = $this->buildRaw($ORDER, $map))
|
||||
{
|
||||
@@ -894,6 +1000,7 @@ class Medoo
|
||||
$table_query = $table;
|
||||
}
|
||||
|
||||
$is_join = false;
|
||||
$join_key = is_array($join) ? array_keys($join) : null;
|
||||
|
||||
if (
|
||||
@@ -901,67 +1008,8 @@ class Medoo
|
||||
strpos($join_key[ 0 ], '[') === 0
|
||||
)
|
||||
{
|
||||
$table_join = [];
|
||||
|
||||
$join_array = [
|
||||
'>' => 'LEFT',
|
||||
'<' => 'RIGHT',
|
||||
'<>' => 'FULL',
|
||||
'><' => 'INNER'
|
||||
];
|
||||
|
||||
foreach($join as $sub_table => $relation)
|
||||
{
|
||||
preg_match('/(\[(?<join>\<\>?|\>\<?)\])?(?<table>[a-zA-Z0-9_]+)\s?(\((?<alias>[a-zA-Z0-9_]+)\))?/', $sub_table, $match);
|
||||
|
||||
if ($match[ 'join' ] !== '' && $match[ 'table' ] !== '')
|
||||
{
|
||||
if (is_string($relation))
|
||||
{
|
||||
$relation = 'USING ("' . $relation . '")';
|
||||
}
|
||||
|
||||
if (is_array($relation))
|
||||
{
|
||||
// For ['column1', 'column2']
|
||||
if (isset($relation[ 0 ]))
|
||||
{
|
||||
$relation = 'USING ("' . implode($relation, '", "') . '")';
|
||||
}
|
||||
else
|
||||
{
|
||||
$joins = [];
|
||||
|
||||
foreach ($relation as $key => $value)
|
||||
{
|
||||
$joins[] = (
|
||||
strpos($key, '.') > 0 ?
|
||||
// For ['tableB.column' => 'column']
|
||||
$this->columnQuote($key) :
|
||||
|
||||
// For ['column1' => 'column2']
|
||||
$table . '."' . $key . '"'
|
||||
) .
|
||||
' = ' .
|
||||
$this->tableQuote(isset($match[ 'alias' ]) ? $match[ 'alias' ] : $match[ 'table' ]) . '."' . $value . '"';
|
||||
}
|
||||
|
||||
$relation = 'ON ' . implode($joins, ' AND ');
|
||||
}
|
||||
}
|
||||
|
||||
$table_name = $this->tableQuote($match[ 'table' ]) . ' ';
|
||||
|
||||
if (isset($match[ 'alias' ]))
|
||||
{
|
||||
$table_name .= 'AS ' . $this->tableQuote($match[ 'alias' ]) . ' ';
|
||||
}
|
||||
|
||||
$table_join[] = $join_array[ $match[ 'join' ] ] . ' JOIN ' . $table_name . $relation;
|
||||
}
|
||||
}
|
||||
|
||||
$table_query .= ' ' . implode($table_join, ' ');
|
||||
$is_join = true;
|
||||
$table_query .= ' ' . $this->buildJoin($table, $join);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -999,6 +1047,10 @@ class Medoo
|
||||
$where = $columns;
|
||||
}
|
||||
}
|
||||
elseif ($raw = $this->buildRaw($column_fn, $map))
|
||||
{
|
||||
$column = $raw;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($columns) || $this->isRaw($columns))
|
||||
@@ -1007,18 +1059,83 @@ class Medoo
|
||||
$where = $join;
|
||||
}
|
||||
|
||||
$column = $column_fn . '(' . $this->columnPush($columns, $map) . ')';
|
||||
$column = $column_fn . '(' . $this->columnPush($columns, $map, true) . ')';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$column = $this->columnPush($columns, $map);
|
||||
$column = $this->columnPush($columns, $map, true, $is_join);
|
||||
}
|
||||
|
||||
return 'SELECT ' . $column . ' FROM ' . $table_query . $this->whereClause($where, $map);
|
||||
}
|
||||
|
||||
protected function columnMap($columns, &$stack)
|
||||
protected function buildJoin($table, $join)
|
||||
{
|
||||
$table_join = [];
|
||||
|
||||
$join_array = [
|
||||
'>' => 'LEFT',
|
||||
'<' => 'RIGHT',
|
||||
'<>' => 'FULL',
|
||||
'><' => 'INNER'
|
||||
];
|
||||
|
||||
foreach($join as $sub_table => $relation)
|
||||
{
|
||||
preg_match('/(\[(?<join>\<\>?|\>\<?)\])?(?<table>[a-zA-Z0-9_]+)\s?(\((?<alias>[a-zA-Z0-9_]+)\))?/', $sub_table, $match);
|
||||
|
||||
if ($match[ 'join' ] !== '' && $match[ 'table' ] !== '')
|
||||
{
|
||||
if (is_string($relation))
|
||||
{
|
||||
$relation = 'USING ("' . $relation . '")';
|
||||
}
|
||||
|
||||
if (is_array($relation))
|
||||
{
|
||||
// For ['column1', 'column2']
|
||||
if (isset($relation[ 0 ]))
|
||||
{
|
||||
$relation = 'USING ("' . implode('", "', $relation) . '")';
|
||||
}
|
||||
else
|
||||
{
|
||||
$joins = [];
|
||||
|
||||
foreach ($relation as $key => $value)
|
||||
{
|
||||
$joins[] = (
|
||||
strpos($key, '.') > 0 ?
|
||||
// For ['tableB.column' => 'column']
|
||||
$this->columnQuote($key) :
|
||||
|
||||
// For ['column1' => 'column2']
|
||||
$table . '."' . $key . '"'
|
||||
) .
|
||||
' = ' .
|
||||
$this->tableQuote(isset($match[ 'alias' ]) ? $match[ 'alias' ] : $match[ 'table' ]) . '."' . $value . '"';
|
||||
}
|
||||
|
||||
$relation = 'ON ' . implode(' AND ', $joins);
|
||||
}
|
||||
}
|
||||
|
||||
$table_name = $this->tableQuote($match[ 'table' ]) . ' ';
|
||||
|
||||
if (isset($match[ 'alias' ]))
|
||||
{
|
||||
$table_name .= 'AS ' . $this->tableQuote($match[ 'alias' ]) . ' ';
|
||||
}
|
||||
|
||||
$table_join[] = $join_array[ $match[ 'join' ] ] . ' JOIN ' . $table_name . $relation;
|
||||
}
|
||||
}
|
||||
|
||||
return implode(' ', $table_join);
|
||||
}
|
||||
|
||||
protected function columnMap($columns, &$stack, $root)
|
||||
{
|
||||
if ($columns === '*')
|
||||
{
|
||||
@@ -1061,15 +1178,52 @@ class Medoo
|
||||
}
|
||||
elseif (!is_int($key) && is_array($value))
|
||||
{
|
||||
$this->columnMap($value, $stack);
|
||||
if ($root && count(array_keys($columns)) === 1)
|
||||
{
|
||||
$stack[ $key ] = [$key, 'String'];
|
||||
}
|
||||
|
||||
$this->columnMap($value, $stack, false);
|
||||
}
|
||||
}
|
||||
|
||||
return $stack;
|
||||
}
|
||||
|
||||
protected function dataMap($data, $columns, $column_map, &$stack)
|
||||
protected function dataMap($data, $columns, $column_map, &$stack, $root, &$result)
|
||||
{
|
||||
if ($root)
|
||||
{
|
||||
$columns_key = array_keys($columns);
|
||||
|
||||
if (count($columns_key) === 1 && is_array($columns[$columns_key[0]]))
|
||||
{
|
||||
$index_key = array_keys($columns)[0];
|
||||
$data_key = preg_replace("/^[a-zA-Z0-9_]+\./i", "", $index_key);
|
||||
|
||||
$current_stack = [];
|
||||
|
||||
foreach ($data as $item)
|
||||
{
|
||||
$this->dataMap($data, $columns[ $index_key ], $column_map, $current_stack, false, $result);
|
||||
|
||||
$index = $data[ $data_key ];
|
||||
|
||||
$result[ $index ] = $current_stack;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$current_stack = [];
|
||||
|
||||
$this->dataMap($data, $columns, $column_map, $current_stack, false, $result);
|
||||
|
||||
$result[] = $current_stack;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($columns as $key => $value)
|
||||
{
|
||||
$isRaw = $this->isRaw($value);
|
||||
@@ -1080,7 +1234,7 @@ class Medoo
|
||||
|
||||
$column_key = $map[ 0 ];
|
||||
|
||||
$result = $data[ $column_key ];
|
||||
$item = $data[ $column_key ];
|
||||
|
||||
if (isset($map[ 1 ]))
|
||||
{
|
||||
@@ -1089,7 +1243,7 @@ class Medoo
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_null($result))
|
||||
if (is_null($item))
|
||||
{
|
||||
$stack[ $column_key ] = null;
|
||||
continue;
|
||||
@@ -1098,50 +1252,103 @@ class Medoo
|
||||
switch ($map[ 1 ])
|
||||
{
|
||||
case 'Number':
|
||||
$stack[ $column_key ] = (double) $result;
|
||||
$stack[ $column_key ] = (double) $item;
|
||||
break;
|
||||
|
||||
case 'Int':
|
||||
$stack[ $column_key ] = (int) $result;
|
||||
$stack[ $column_key ] = (int) $item;
|
||||
break;
|
||||
|
||||
case 'Bool':
|
||||
$stack[ $column_key ] = (bool) $result;
|
||||
$stack[ $column_key ] = (bool) $item;
|
||||
break;
|
||||
|
||||
case 'Object':
|
||||
$stack[ $column_key ] = unserialize($result);
|
||||
$stack[ $column_key ] = unserialize($item);
|
||||
break;
|
||||
|
||||
case 'JSON':
|
||||
$stack[ $column_key ] = json_decode($result, true);
|
||||
$stack[ $column_key ] = json_decode($item, true);
|
||||
break;
|
||||
|
||||
case 'String':
|
||||
$stack[ $column_key ] = $result;
|
||||
$stack[ $column_key ] = $item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stack[ $column_key ] = $result;
|
||||
$stack[ $column_key ] = $item;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$current_stack = [];
|
||||
|
||||
$this->dataMap($data, $value, $column_map, $current_stack);
|
||||
$this->dataMap($data, $value, $column_map, $current_stack, false, $result);
|
||||
|
||||
$stack[ $key ] = $current_stack;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function create($table, $columns, $options = null)
|
||||
{
|
||||
$stack = [];
|
||||
|
||||
$tableName = $this->prefix . $table;
|
||||
|
||||
foreach ($columns as $name => $definition)
|
||||
{
|
||||
if (is_int($name))
|
||||
{
|
||||
$stack[] = preg_replace('/\<([a-zA-Z0-9_]+)\>/i', '"$1"', $definition);
|
||||
}
|
||||
elseif (is_array($definition))
|
||||
{
|
||||
$stack[] = $name . ' ' . implode(' ', $definition);
|
||||
}
|
||||
elseif (is_string($definition))
|
||||
{
|
||||
$stack[] = $name . ' ' . $this->query($definition);
|
||||
}
|
||||
}
|
||||
|
||||
$table_option = '';
|
||||
|
||||
if (is_array($options))
|
||||
{
|
||||
$option_stack = [];
|
||||
|
||||
foreach ($options as $key => $value)
|
||||
{
|
||||
if (is_string($value) || is_int($value))
|
||||
{
|
||||
$option_stack[] = "$key = $value";
|
||||
}
|
||||
}
|
||||
|
||||
$table_option = ' ' . implode(', ', $option_stack);
|
||||
}
|
||||
elseif (is_string($options))
|
||||
{
|
||||
$table_option = ' ' . $options;
|
||||
}
|
||||
|
||||
return $this->exec("CREATE TABLE IF NOT EXISTS $tableName (" . implode(', ', $stack) . ")$table_option");
|
||||
}
|
||||
|
||||
public function drop($table)
|
||||
{
|
||||
$tableName = $this->prefix . $table;
|
||||
|
||||
return $this->exec("DROP TABLE IF EXISTS $tableName");
|
||||
}
|
||||
|
||||
public function select($table, $join, $columns = null, $where = null)
|
||||
{
|
||||
$map = [];
|
||||
$stack = [];
|
||||
$result = [];
|
||||
$column_map = [];
|
||||
|
||||
$index = 0;
|
||||
@@ -1152,9 +1359,9 @@ class Medoo
|
||||
|
||||
$query = $this->exec($this->selectContext($table, $map, $join, $columns, $where), $map);
|
||||
|
||||
$this->columnMap($columns, $column_map);
|
||||
$this->columnMap($columns, $column_map, true);
|
||||
|
||||
if (!$query)
|
||||
if (!$this->statement)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1164,23 +1371,27 @@ class Medoo
|
||||
return $query->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
if ($is_single)
|
||||
{
|
||||
return $query->fetchAll(PDO::FETCH_COLUMN);
|
||||
}
|
||||
|
||||
while ($data = $query->fetch(PDO::FETCH_ASSOC))
|
||||
{
|
||||
$current_stack = [];
|
||||
|
||||
$this->dataMap($data, $columns, $column_map, $current_stack);
|
||||
|
||||
$stack[ $index ] = $current_stack;
|
||||
|
||||
$index++;
|
||||
$this->dataMap($data, $columns, $column_map, $current_stack, true, $result);
|
||||
}
|
||||
|
||||
return $stack;
|
||||
if ($is_single)
|
||||
{
|
||||
$single_result = [];
|
||||
$result_key = $column_map[ $column ][ 0 ];
|
||||
|
||||
foreach ($result as $item)
|
||||
{
|
||||
$single_result[] = $item[ $result_key ];
|
||||
}
|
||||
|
||||
return $single_result;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function insert($table, $datas)
|
||||
@@ -1217,7 +1428,7 @@ class Medoo
|
||||
continue;
|
||||
}
|
||||
|
||||
$map_key =$this->mapKey();
|
||||
$map_key = $this->mapKey();
|
||||
|
||||
$values[] = $map_key;
|
||||
|
||||
@@ -1257,7 +1468,7 @@ class Medoo
|
||||
}
|
||||
}
|
||||
|
||||
$stack[] = '(' . implode($values, ', ') . ')';
|
||||
$stack[] = '(' . implode(', ', $values) . ')';
|
||||
}
|
||||
|
||||
foreach ($columns as $key)
|
||||
@@ -1373,8 +1584,9 @@ class Medoo
|
||||
public function get($table, $join = null, $columns = null, $where = null)
|
||||
{
|
||||
$map = [];
|
||||
$stack = [];
|
||||
$result = [];
|
||||
$column_map = [];
|
||||
$current_stack = [];
|
||||
|
||||
if ($where === null)
|
||||
{
|
||||
@@ -1391,33 +1603,31 @@ class Medoo
|
||||
|
||||
$query = $this->exec($this->selectContext($table, $map, $join, $columns, $where) . ' LIMIT 1', $map);
|
||||
|
||||
if ($query)
|
||||
if (!$this->statement)
|
||||
{
|
||||
$data = $query->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
if (isset($data[ 0 ]))
|
||||
{
|
||||
if ($column === '*')
|
||||
{
|
||||
return $data[ 0 ];
|
||||
}
|
||||
|
||||
$this->columnMap($columns, $column_map);
|
||||
|
||||
$this->dataMap($data[ 0 ], $columns, $column_map, $stack);
|
||||
|
||||
if ($is_single)
|
||||
{
|
||||
return $stack[ $column_map[ $column ][ 0 ] ];
|
||||
}
|
||||
|
||||
return $stack;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
$data = $query->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
if (isset($data[ 0 ]))
|
||||
{
|
||||
if ($column === '*')
|
||||
{
|
||||
return $data[ 0 ];
|
||||
}
|
||||
|
||||
$this->columnMap($columns, $column_map, true);
|
||||
|
||||
$this->dataMap($data[ 0 ], $columns, $column_map, $current_stack, true, $result);
|
||||
|
||||
if ($is_single)
|
||||
{
|
||||
return $result[ 0 ][ $column_map[ $column ][ 0 ] ];
|
||||
}
|
||||
|
||||
return $result[ 0 ];
|
||||
}
|
||||
}
|
||||
|
||||
public function has($table, $join, $where = null)
|
||||
@@ -1425,16 +1635,66 @@ class Medoo
|
||||
$map = [];
|
||||
$column = null;
|
||||
|
||||
$query = $this->exec('SELECT EXISTS(' . $this->selectContext($table, $map, $join, $column, $where, 1) . ')', $map);
|
||||
|
||||
if ($query)
|
||||
if ($this->type === 'mssql')
|
||||
{
|
||||
$result = $query->fetchColumn();
|
||||
|
||||
return $result === '1' || $result === true;
|
||||
$query = $this->exec($this->selectContext($table, $map, $join, $column, $where, Medoo::raw('TOP 1 1')), $map);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query = $this->exec('SELECT EXISTS(' . $this->selectContext($table, $map, $join, $column, $where, 1) . ')', $map);
|
||||
}
|
||||
|
||||
return false;
|
||||
if (!$this->statement)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = $query->fetchColumn();
|
||||
|
||||
return $result === '1' || $result === 1 || $result === true;
|
||||
}
|
||||
|
||||
public function rand($table, $join = null, $columns = null, $where = null)
|
||||
{
|
||||
$type = $this->type;
|
||||
|
||||
$order = 'RANDOM()';
|
||||
|
||||
if ($type === 'mysql')
|
||||
{
|
||||
$order = 'RAND()';
|
||||
}
|
||||
elseif ($type === 'mssql')
|
||||
{
|
||||
$order = 'NEWID()';
|
||||
}
|
||||
|
||||
$order_raw = $this->raw($order);
|
||||
|
||||
if ($where === null)
|
||||
{
|
||||
if ($columns === null)
|
||||
{
|
||||
$columns = [
|
||||
'ORDER' => $order_raw
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
$column = $join;
|
||||
unset($columns[ 'ORDER' ]);
|
||||
|
||||
$columns[ 'ORDER' ] = $order_raw;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($where[ 'ORDER' ]);
|
||||
|
||||
$where[ 'ORDER' ] = $order_raw;
|
||||
}
|
||||
|
||||
return $this->select($table, $join, $columns, $where);
|
||||
}
|
||||
|
||||
private function aggregate($type, $table, $join = null, $column = null, $where = null)
|
||||
@@ -1443,14 +1703,39 @@ class Medoo
|
||||
|
||||
$query = $this->exec($this->selectContext($table, $map, $join, $column, $where, strtoupper($type)), $map);
|
||||
|
||||
if ($query)
|
||||
if (!$this->statement)
|
||||
{
|
||||
$number = $query->fetchColumn();
|
||||
|
||||
return is_numeric($number) ? $number + 0 : $number;
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
$number = $query->fetchColumn();
|
||||
|
||||
return is_numeric($number) ? $number + 0 : $number;
|
||||
}
|
||||
|
||||
public function count($table, $join = null, $column = null, $where = null)
|
||||
{
|
||||
return $this->aggregate('count', $table, $join, $column, $where);
|
||||
}
|
||||
|
||||
public function avg($table, $join, $column = null, $where = null)
|
||||
{
|
||||
return $this->aggregate('avg', $table, $join, $column, $where);
|
||||
}
|
||||
|
||||
public function max($table, $join, $column = null, $where = null)
|
||||
{
|
||||
return $this->aggregate('max', $table, $join, $column, $where);
|
||||
}
|
||||
|
||||
public function min($table, $join, $column = null, $where = null)
|
||||
{
|
||||
return $this->aggregate('min', $table, $join, $column, $where);
|
||||
}
|
||||
|
||||
public function sum($table, $join, $column = null, $where = null)
|
||||
{
|
||||
return $this->aggregate('sum', $table, $join, $column, $where);
|
||||
}
|
||||
|
||||
public function action($actions)
|
||||
@@ -1485,22 +1770,30 @@ class Medoo
|
||||
|
||||
public function id()
|
||||
{
|
||||
if ($this->statement == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$type = $this->type;
|
||||
|
||||
if ($type === 'oracle')
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
elseif ($type === 'mssql')
|
||||
{
|
||||
return $this->pdo->query('SELECT SCOPE_IDENTITY()')->fetchColumn();
|
||||
}
|
||||
elseif ($type === 'pgsql')
|
||||
{
|
||||
return $this->pdo->query('SELECT LASTVAL()')->fetchColumn();
|
||||
}
|
||||
|
||||
return $this->pdo->lastInsertId();
|
||||
$lastId = $this->pdo->lastInsertId();
|
||||
|
||||
if ($lastId != "0" && $lastId != "")
|
||||
{
|
||||
return $lastId;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function debug()
|
||||
@@ -1512,7 +1805,7 @@ class Medoo
|
||||
|
||||
public function error()
|
||||
{
|
||||
return $this->statement ? $this->statement->errorInfo() : null;
|
||||
return $this->errorInfo;
|
||||
}
|
||||
|
||||
public function last()
|
||||
@@ -1547,7 +1840,8 @@ class Medoo
|
||||
$output[ $key ] = @$this->pdo->getAttribute(constant('PDO::ATTR_' . $value));
|
||||
}
|
||||
|
||||
$output[ 'dsn' ] = $this->dsn;
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
Vendored
+2
-2
@@ -279,7 +279,7 @@ class ClassLoader
|
||||
*/
|
||||
public function setApcuPrefix($apcuPrefix)
|
||||
{
|
||||
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
||||
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -377,7 +377,7 @@ class ClassLoader
|
||||
$subPath = $class;
|
||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||
$subPath = substr($subPath, 0, $lastPos);
|
||||
$search = $subPath.'\\';
|
||||
$search = $subPath . '\\';
|
||||
if (isset($this->prefixDirsPsr4[$search])) {
|
||||
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||
|
||||
+29
-5
@@ -11,14 +11,38 @@ return array(
|
||||
'DBTransaction' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php',
|
||||
'FB' => $vendorDir . '/firephp/firephp-core/lib/FirePHPCore/fb.php',
|
||||
'FirePHP' => $vendorDir . '/firephp/firephp-core/lib/FirePHPCore/FirePHP.class.php',
|
||||
'HTMLPurifier_AttrDef_Float' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/Float.php',
|
||||
'HTMLPurifier_AttrDef_HTML5_ARel' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/HTML5/ARel.php',
|
||||
'HTMLPurifier_AttrDef_HTML5_Datetime' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/HTML5/Datetime.php',
|
||||
'HTMLPurifier_AttrDef_HTML5_Duration' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/HTML5/Duration.php',
|
||||
'HTMLPurifier_AttrDef_HTML5_Week' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/HTML5/Week.php',
|
||||
'HTMLPurifier_AttrDef_HTML5_YearlessDate' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/HTML5/YearlessDate.php',
|
||||
'HTMLPurifier_AttrDef_HTML_Bool2' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/HTML/Bool2.php',
|
||||
'HTMLPurifier_AttrDef_Regexp' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/Regexp.php',
|
||||
'HTMLPurifier_ChildDef_Details' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/Details.php',
|
||||
'HTMLPurifier_ChildDef_Figure' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/Figure.php',
|
||||
'HTMLPurifier_ChildDef_Media' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/Media.php',
|
||||
'HTMLPurifier_ChildDef_Picture' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/Picture.php',
|
||||
'HTMLPurifier_AttrTransform_HTML5_Dialog' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrTransform/HTML5/Dialog.php',
|
||||
'HTMLPurifier_AttrTransform_HTML5_Progress' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrTransform/HTML5/Progress.php',
|
||||
'HTMLPurifier_AttrTransform_HTML5_Script' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrTransform/HTML5/Script.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Abstract' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Abstract.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Details' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Details.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Fieldset' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Fieldset.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Figure' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Figure.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Media' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Media.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Picture' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Picture.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Script' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Script.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Time' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Time.php',
|
||||
'HTMLPurifier_HTML5Config' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTML5Config.php',
|
||||
'HTMLPurifier_HTML5Definition' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTML5Definition.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Bdo' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Bdo.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Edit' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Edit.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Forms' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Forms.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Hypertext' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Hypertext.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Iframe' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Iframe.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Interactive' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Interactive.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_List' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/List.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Media' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Media.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Ruby' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Ruby.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_SafeScripting' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/SafeScripting.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Scripting' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Scripting.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Text' => $vendorDir . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Text.php',
|
||||
'MeekroDB' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php',
|
||||
'MeekroDBEval' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php',
|
||||
'MeekroDBException' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php',
|
||||
|
||||
Vendored
+1
@@ -6,6 +6,7 @@ $vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||
'2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
|
||||
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
|
||||
Vendored
+1
-1
@@ -10,6 +10,7 @@ return array(
|
||||
'kakao\\' => array($baseDir . '/src/kakao'),
|
||||
'Valitron\\' => array($vendorDir . '/vlucas/valitron/src/Valitron'),
|
||||
'Symfony\\Component\\Lock\\' => array($vendorDir . '/symfony/lock'),
|
||||
'ScssPhp\\ScssPhp\\' => array($vendorDir . '/scssphp/scssphp/src'),
|
||||
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
||||
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
|
||||
'PhpExtended\\Tail\\' => array($vendorDir . '/php-extended/php-tail/src'),
|
||||
@@ -17,7 +18,6 @@ return array(
|
||||
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
|
||||
'Medoo\\' => array($vendorDir . '/catfan/medoo/src'),
|
||||
'League\\Plates\\' => array($vendorDir . '/league/plates/src'),
|
||||
'Leafo\\ScssPhp\\' => array($vendorDir . '/leafo/scssphp/src'),
|
||||
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
|
||||
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
|
||||
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
|
||||
|
||||
Vendored
+35
-10
@@ -7,6 +7,7 @@ namespace Composer\Autoload;
|
||||
class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a
|
||||
{
|
||||
public static $files = array (
|
||||
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||
'2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
|
||||
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
@@ -31,6 +32,7 @@ class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a
|
||||
'S' =>
|
||||
array (
|
||||
'Symfony\\Component\\Lock\\' => 23,
|
||||
'ScssPhp\\ScssPhp\\' => 16,
|
||||
),
|
||||
'P' =>
|
||||
array (
|
||||
@@ -47,7 +49,6 @@ class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a
|
||||
'L' =>
|
||||
array (
|
||||
'League\\Plates\\' => 14,
|
||||
'Leafo\\ScssPhp\\' => 14,
|
||||
),
|
||||
'G' =>
|
||||
array (
|
||||
@@ -74,6 +75,10 @@ class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/lock',
|
||||
),
|
||||
'ScssPhp\\ScssPhp\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/scssphp/scssphp/src',
|
||||
),
|
||||
'Psr\\Log\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
|
||||
@@ -102,10 +107,6 @@ class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/league/plates/src',
|
||||
),
|
||||
'Leafo\\ScssPhp\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/leafo/scssphp/src',
|
||||
),
|
||||
'GuzzleHttp\\Psr7\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
|
||||
@@ -143,14 +144,38 @@ class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a
|
||||
'DBTransaction' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php',
|
||||
'FB' => __DIR__ . '/..' . '/firephp/firephp-core/lib/FirePHPCore/fb.php',
|
||||
'FirePHP' => __DIR__ . '/..' . '/firephp/firephp-core/lib/FirePHPCore/FirePHP.class.php',
|
||||
'HTMLPurifier_AttrDef_Float' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/Float.php',
|
||||
'HTMLPurifier_AttrDef_HTML5_ARel' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/HTML5/ARel.php',
|
||||
'HTMLPurifier_AttrDef_HTML5_Datetime' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/HTML5/Datetime.php',
|
||||
'HTMLPurifier_AttrDef_HTML5_Duration' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/HTML5/Duration.php',
|
||||
'HTMLPurifier_AttrDef_HTML5_Week' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/HTML5/Week.php',
|
||||
'HTMLPurifier_AttrDef_HTML5_YearlessDate' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/HTML5/YearlessDate.php',
|
||||
'HTMLPurifier_AttrDef_HTML_Bool2' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/HTML/Bool2.php',
|
||||
'HTMLPurifier_AttrDef_Regexp' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrDef/Regexp.php',
|
||||
'HTMLPurifier_ChildDef_Details' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/Details.php',
|
||||
'HTMLPurifier_ChildDef_Figure' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/Figure.php',
|
||||
'HTMLPurifier_ChildDef_Media' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/Media.php',
|
||||
'HTMLPurifier_ChildDef_Picture' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/Picture.php',
|
||||
'HTMLPurifier_AttrTransform_HTML5_Dialog' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrTransform/HTML5/Dialog.php',
|
||||
'HTMLPurifier_AttrTransform_HTML5_Progress' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrTransform/HTML5/Progress.php',
|
||||
'HTMLPurifier_AttrTransform_HTML5_Script' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/AttrTransform/HTML5/Script.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Abstract' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Abstract.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Details' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Details.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Fieldset' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Fieldset.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Figure' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Figure.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Media' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Media.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Picture' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Picture.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Script' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Script.php',
|
||||
'HTMLPurifier_ChildDef_HTML5_Time' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/ChildDef/HTML5/Time.php',
|
||||
'HTMLPurifier_HTML5Config' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTML5Config.php',
|
||||
'HTMLPurifier_HTML5Definition' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTML5Definition.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Bdo' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Bdo.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Edit' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Edit.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Forms' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Forms.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Hypertext' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Hypertext.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Iframe' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Iframe.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Interactive' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Interactive.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_List' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/List.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Media' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Media.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Ruby' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Ruby.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_SafeScripting' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/SafeScripting.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Scripting' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Scripting.php',
|
||||
'HTMLPurifier_HTMLModule_HTML5_Text' => __DIR__ . '/..' . '/xemlock/htmlpurifier-html5/library/HTMLPurifier/HTMLModule/HTML5/Text.php',
|
||||
'MeekroDB' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php',
|
||||
'MeekroDBEval' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php',
|
||||
'MeekroDBException' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php',
|
||||
|
||||
Vendored
+207
-131
@@ -49,17 +49,17 @@
|
||||
},
|
||||
{
|
||||
"name": "catfan/medoo",
|
||||
"version": "v1.5.7",
|
||||
"version_normalized": "1.5.7.0",
|
||||
"version": "v1.7.8",
|
||||
"version_normalized": "1.7.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/catfan/Medoo.git",
|
||||
"reference": "8d90cba0e8ff176028847527d0ea76fe41a06ecf"
|
||||
"reference": "dd9d570584cfb1e09ec470608479b86e41d5b60d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/catfan/Medoo/zipball/8d90cba0e8ff176028847527d0ea76fe41a06ecf",
|
||||
"reference": "8d90cba0e8ff176028847527d0ea76fe41a06ecf",
|
||||
"url": "https://api.github.com/repos/catfan/Medoo/zipball/dd9d570584cfb1e09ec470608479b86e41d5b60d",
|
||||
"reference": "dd9d570584cfb1e09ec470608479b86e41d5b60d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -73,9 +73,9 @@
|
||||
"ext-pdo_oci8": "For Oracle version 8 database",
|
||||
"ext-pdo_pqsql": "For PostgreSQL database",
|
||||
"ext-pdo_sqlite": "For SQLite database",
|
||||
"ext-pdo_sqlsrv": "For MSSQL database"
|
||||
"ext-pdo_sqlsrv": "For MSSQL database on both Window/Liunx platform"
|
||||
},
|
||||
"time": "2018-06-14T18:59:08+00:00",
|
||||
"time": "2019-12-19T05:04:34+00:00",
|
||||
"type": "framework",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@@ -93,10 +93,11 @@
|
||||
"email": "angel@catfan.me"
|
||||
}
|
||||
],
|
||||
"description": "The lightest PHP database framework to accelerate development",
|
||||
"description": "The lightweight PHP database framework to accelerate development",
|
||||
"homepage": "https://medoo.in",
|
||||
"keywords": [
|
||||
"database",
|
||||
"database library",
|
||||
"lightweight",
|
||||
"mariadb",
|
||||
"mssql",
|
||||
@@ -110,26 +111,26 @@
|
||||
},
|
||||
{
|
||||
"name": "ezyang/htmlpurifier",
|
||||
"version": "v4.10.0",
|
||||
"version_normalized": "4.10.0.0",
|
||||
"version": "v4.12.0",
|
||||
"version_normalized": "4.12.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ezyang/htmlpurifier.git",
|
||||
"reference": "d85d39da4576a6934b72480be6978fb10c860021"
|
||||
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d85d39da4576a6934b72480be6978fb10c860021",
|
||||
"reference": "d85d39da4576a6934b72480be6978fb10c860021",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/a617e55bc62a87eec73bd456d146d134ad716f03",
|
||||
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"simpletest/simpletest": "^1.1"
|
||||
"simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd"
|
||||
},
|
||||
"time": "2018-02-23T01:58:20+00:00",
|
||||
"time": "2019-10-28T03:44:26+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@@ -142,7 +143,7 @@
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL"
|
||||
"LGPL-2.1-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
@@ -197,47 +198,49 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "6.3.3",
|
||||
"version_normalized": "6.3.3.0",
|
||||
"version": "6.5.2",
|
||||
"version_normalized": "6.5.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
|
||||
"reference": "43ece0e75098b7ecd8d13918293029e555a50f82"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82",
|
||||
"reference": "43ece0e75098b7ecd8d13918293029e555a50f82",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.4",
|
||||
"guzzlehttp/psr7": "^1.6.1",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
|
||||
"psr/log": "^1.0"
|
||||
"psr/log": "^1.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
|
||||
"psr/log": "Required for using the Log middleware"
|
||||
},
|
||||
"time": "2018-04-22T15:46:56+00:00",
|
||||
"time": "2019-12-23T11:57:10+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "6.3-dev"
|
||||
"dev-master": "6.5-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\": "src/"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
@@ -317,34 +320,39 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.4.2",
|
||||
"version_normalized": "1.4.2.0",
|
||||
"version": "1.6.1",
|
||||
"version_normalized": "1.6.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
|
||||
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
|
||||
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"psr/http-message": "~1.0"
|
||||
"psr/http-message": "~1.0",
|
||||
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/http-message-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
"ext-zlib": "*",
|
||||
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
|
||||
},
|
||||
"time": "2017-03-20T17:10:46+00:00",
|
||||
"suggest": {
|
||||
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
|
||||
},
|
||||
"time": "2019-07-01T23:21:34+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
"dev-master": "1.6-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
@@ -375,6 +383,7 @@
|
||||
"keywords": [
|
||||
"http",
|
||||
"message",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response",
|
||||
"stream",
|
||||
@@ -382,60 +391,6 @@
|
||||
"url"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leafo/scssphp",
|
||||
"version": "v0.7.7",
|
||||
"version_normalized": "0.7.7.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/leafo/scssphp.git",
|
||||
"reference": "1d656f8c02a3a69404bba6b28ec4e06edddf0f49"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/leafo/scssphp/zipball/1d656f8c02a3a69404bba6b28ec4e06edddf0f49",
|
||||
"reference": "1d656f8c02a3a69404bba6b28ec4e06edddf0f49",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.6",
|
||||
"squizlabs/php_codesniffer": "~2.5"
|
||||
},
|
||||
"time": "2018-07-22T01:22:08+00:00",
|
||||
"bin": [
|
||||
"bin/pscss"
|
||||
],
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Leafo\\ScssPhp\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Leaf Corcoran",
|
||||
"email": "leafot@gmail.com",
|
||||
"homepage": "http://leafo.net"
|
||||
}
|
||||
],
|
||||
"description": "scssphp is a compiler for SCSS written in PHP.",
|
||||
"homepage": "http://leafo.github.io/scssphp/",
|
||||
"keywords": [
|
||||
"css",
|
||||
"less",
|
||||
"sass",
|
||||
"scss",
|
||||
"stylesheet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "league/plates",
|
||||
"version": "3.3.0",
|
||||
@@ -495,17 +450,17 @@
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "1.23.0",
|
||||
"version_normalized": "1.23.0.0",
|
||||
"version": "1.25.3",
|
||||
"version_normalized": "1.25.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Seldaek/monolog.git",
|
||||
"reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4"
|
||||
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
|
||||
"reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fa82921994db851a8becaf3787a9e73c5976b6f1",
|
||||
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -541,7 +496,7 @@
|
||||
"ruflin/elastica": "Allow sending log messages to an Elastic Search server",
|
||||
"sentry/sentry": "Allow sending log messages to a Sentry server"
|
||||
},
|
||||
"time": "2017-06-19T01:22:40+00:00",
|
||||
"time": "2019-12-20T14:15:16+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@@ -741,27 +696,27 @@
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.0.2",
|
||||
"version_normalized": "1.0.2.0",
|
||||
"version": "1.1.2",
|
||||
"version_normalized": "1.1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
|
||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"time": "2016-10-10T12:19:37+00:00",
|
||||
"time": "2019-11-01T11:05:21+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
"dev-master": "1.1.x-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
@@ -788,6 +743,111 @@
|
||||
"psr-3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ralouphie/getallheaders",
|
||||
"version": "3.0.3",
|
||||
"version_normalized": "3.0.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ralouphie/getallheaders.git",
|
||||
"reference": "120b605dfeb996808c31b6477290a714d356e822"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
|
||||
"reference": "120b605dfeb996808c31b6477290a714d356e822",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpunit/phpunit": "^5 || ^6.5"
|
||||
},
|
||||
"time": "2019-03-08T08:55:37+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/getallheaders.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ralph Khattar",
|
||||
"email": "ralph.khattar@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A polyfill for getallheaders."
|
||||
},
|
||||
{
|
||||
"name": "scssphp/scssphp",
|
||||
"version": "1.0.6",
|
||||
"version_normalized": "1.0.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/scssphp/scssphp.git",
|
||||
"reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/5b3c9d704950d8f9637f5110c36c281ec47dc13c",
|
||||
"reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-json": "*",
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3",
|
||||
"squizlabs/php_codesniffer": "~2.5",
|
||||
"twbs/bootstrap": "~4.3",
|
||||
"zurb/foundation": "~6.5"
|
||||
},
|
||||
"time": "2019-12-12T05:00:52+00:00",
|
||||
"bin": [
|
||||
"bin/pscss"
|
||||
],
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"ScssPhp\\ScssPhp\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Anthon Pang",
|
||||
"email": "apang@softwaredevelopment.ca",
|
||||
"homepage": "https://github.com/robocoder"
|
||||
},
|
||||
{
|
||||
"name": "Cédric Morin",
|
||||
"email": "cedric@yterium.com",
|
||||
"homepage": "https://github.com/Cerdic"
|
||||
}
|
||||
],
|
||||
"description": "scssphp is a compiler for SCSS written in PHP.",
|
||||
"homepage": "http://scssphp.github.io/scssphp/",
|
||||
"keywords": [
|
||||
"css",
|
||||
"less",
|
||||
"sass",
|
||||
"scss",
|
||||
"stylesheet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sergeytsalkov/meekrodb",
|
||||
"version": "v2.3",
|
||||
@@ -835,31 +895,36 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/lock",
|
||||
"version": "v4.1.1",
|
||||
"version_normalized": "4.1.1.0",
|
||||
"version": "v4.4.3",
|
||||
"version_normalized": "4.4.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/lock.git",
|
||||
"reference": "d508b5dd92272cb74300396ecaadde969d0f7976"
|
||||
"reference": "6c4f5b620871cfef5b004fc57f2ca74572ae03b3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/lock/zipball/d508b5dd92272cb74300396ecaadde969d0f7976",
|
||||
"reference": "d508b5dd92272cb74300396ecaadde969d0f7976",
|
||||
"url": "https://api.github.com/repos/symfony/lock/zipball/6c4f5b620871cfef5b004fc57f2ca74572ae03b3",
|
||||
"reference": "6c4f5b620871cfef5b004fc57f2ca74572ae03b3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"psr/log": "~1.0"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/dbal": "<2.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/dbal": "~2.5",
|
||||
"mongodb/mongodb": "~1.1",
|
||||
"predis/predis": "~1.0"
|
||||
},
|
||||
"time": "2018-06-21T11:15:46+00:00",
|
||||
"time": "2020-01-04T13:00:46+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.1-dev"
|
||||
"dev-master": "4.4-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
@@ -876,13 +941,13 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Jérémy Derussé",
|
||||
"email": "jeremy@derusse.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Lock Component",
|
||||
@@ -898,17 +963,17 @@
|
||||
},
|
||||
{
|
||||
"name": "vlucas/valitron",
|
||||
"version": "v1.4.3",
|
||||
"version_normalized": "1.4.3.0",
|
||||
"version": "v1.4.7",
|
||||
"version_normalized": "1.4.7.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vlucas/valitron.git",
|
||||
"reference": "3c5463315bfa23b17f8949b100a960d035234e43"
|
||||
"reference": "a03072bed1679660200766d134507a30193eaf6d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/3c5463315bfa23b17f8949b100a960d035234e43",
|
||||
"reference": "3c5463315bfa23b17f8949b100a960d035234e43",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/a03072bed1679660200766d134507a30193eaf6d",
|
||||
"reference": "a03072bed1679660200766d134507a30193eaf6d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -920,7 +985,7 @@
|
||||
"suggest": {
|
||||
"ext-mbstring": "It can support the multiple bytes string length."
|
||||
},
|
||||
"time": "2018-05-06T10:45:26+00:00",
|
||||
"time": "2019-08-29T19:49:43+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@@ -949,27 +1014,28 @@
|
||||
},
|
||||
{
|
||||
"name": "xemlock/htmlpurifier-html5",
|
||||
"version": "v0.1.7",
|
||||
"version_normalized": "0.1.7.0",
|
||||
"version": "v0.1.11",
|
||||
"version_normalized": "0.1.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/xemlock/htmlpurifier-html5.git",
|
||||
"reference": "b4b35e51ec75e0207c23035f7d9a354bdcdac359"
|
||||
"reference": "f0d563f9fd4a82a3d759043483f9a94c0d8c2255"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/xemlock/htmlpurifier-html5/zipball/b4b35e51ec75e0207c23035f7d9a354bdcdac359",
|
||||
"reference": "b4b35e51ec75e0207c23035f7d9a354bdcdac359",
|
||||
"url": "https://api.github.com/repos/xemlock/htmlpurifier-html5/zipball/f0d563f9fd4a82a3d759043483f9a94c0d8c2255",
|
||||
"reference": "f0d563f9fd4a82a3d759043483f9a94c0d8c2255",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ezyang/htmlpurifier": "^4.7",
|
||||
"ezyang/htmlpurifier": "^4.8",
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "4.7.*|5.7.*"
|
||||
"php-coveralls/php-coveralls": "^1.1|^2.1",
|
||||
"phpunit/phpunit": ">=4.7 <8.0"
|
||||
},
|
||||
"time": "2018-06-07T14:30:17+00:00",
|
||||
"time": "2019-08-07T17:19:21+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@@ -987,6 +1053,16 @@
|
||||
"email": "xemlock@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "HTML Purifier definitions for HTML5 elements"
|
||||
"description": "HTML5 element definitions for HTML Purifier",
|
||||
"keywords": [
|
||||
"HTML5",
|
||||
"Purifier",
|
||||
"html",
|
||||
"htmlpurifier",
|
||||
"security",
|
||||
"tidy",
|
||||
"validator",
|
||||
"xss"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Vendored
+2
-34
@@ -15,7 +15,7 @@ with these contents.
|
||||
---------------------------------------------------------------------------
|
||||
1. Compatibility
|
||||
|
||||
HTML Purifier is PHP 5 and PHP 7, and is actively tested from PHP 5.0.5
|
||||
HTML Purifier is PHP 5 and PHP 7, and is actively tested from PHP 5.3
|
||||
and up. It has no core dependencies with other libraries.
|
||||
|
||||
These optional extensions can enhance the capabilities of HTML Purifier:
|
||||
@@ -101,31 +101,6 @@ Autoload compatibility
|
||||
autoloader, but there are some cases where you will need to change
|
||||
your own code to accomodate HTML Purifier. These are those cases:
|
||||
|
||||
PHP VERSION IS LESS THAN 5.1.2, AND YOU'VE DEFINED __autoload
|
||||
Because spl_autoload_register() doesn't exist in early versions
|
||||
of PHP 5, HTML Purifier has no way of adding itself to the autoload
|
||||
stack. Modify your __autoload function to test
|
||||
HTMLPurifier_Bootstrap::autoload($class)
|
||||
|
||||
For example, suppose your autoload function looks like this:
|
||||
|
||||
function __autoload($class) {
|
||||
require str_replace('_', '/', $class) . '.php';
|
||||
return true;
|
||||
}
|
||||
|
||||
A modified version with HTML Purifier would look like this:
|
||||
|
||||
function __autoload($class) {
|
||||
if (HTMLPurifier_Bootstrap::autoload($class)) return true;
|
||||
require str_replace('_', '/', $class) . '.php';
|
||||
return true;
|
||||
}
|
||||
|
||||
Note that there *is* some custom behavior in our autoloader; the
|
||||
original autoloader in our example would work for 99% of the time,
|
||||
but would fail when including language files.
|
||||
|
||||
AN __autoload FUNCTION IS DECLARED AFTER OUR AUTOLOADER IS REGISTERED
|
||||
spl_autoload_register() has the curious behavior of disabling
|
||||
the existing __autoload() handler. Users need to explicitly
|
||||
@@ -138,11 +113,6 @@ Autoload compatibility
|
||||
|
||||
spl_autoload_register('__autoload')
|
||||
|
||||
Users should also be on guard if they use a version of PHP previous
|
||||
to 5.1.2 without an autoloader--HTML Purifier will define __autoload()
|
||||
for you, which can collide with an autoloader that was added by *you*
|
||||
later.
|
||||
|
||||
|
||||
For better performance
|
||||
----------------------
|
||||
@@ -204,9 +174,7 @@ For advanced users
|
||||
HTMLPurifier.autoload.php
|
||||
Registers our autoload handler HTMLPurifier_Bootstrap::autoload($class).
|
||||
|
||||
You can do these operations by yourself--in fact, you must modify your own
|
||||
autoload handler if you are using a version of PHP earlier than PHP 5.1.2
|
||||
(See "Autoload compatibility" above).
|
||||
You can do these operations by yourself, if you like.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ pied de page, mais je recommande de lire le document.
|
||||
|
||||
1. Compatibilité
|
||||
|
||||
HTML Purifier fonctionne avec PHP 5. PHP 5.0.5 est la dernière version testée.
|
||||
HTML Purifier fonctionne avec PHP 5. PHP 5.3 est la dernière version testée.
|
||||
Il ne dépend pas d'autres librairies.
|
||||
|
||||
Les extensions optionnelles sont iconv (généralement déjà installée) et tidy
|
||||
|
||||
Vendored
+34
@@ -9,6 +9,40 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
||||
. Internal change
|
||||
==========================
|
||||
|
||||
4.12.0, released 2019-10-27
|
||||
! PHP 7.4 is supported, thank you Witold Wasiczko, Mateuz Turcza and
|
||||
Edi Modrić
|
||||
- PHPDocs for HTMLModule::addElement() and Bool attr are fixed (thanks
|
||||
Mateusz)
|
||||
|
||||
4.11.0, released 2019-07-14
|
||||
# SafeScripting now matches case-sensitively against its whitelist (previously it was
|
||||
case-insensitive.) Thanks Dimitri Gritsajuk <gritsajuk.dimitri@gmail.com>
|
||||
for reporting.
|
||||
! New directive %Core.AllowParseManyTags which allows parsing of many nested tags.
|
||||
Thanks M. Suzuki <msuzuki1986@gmail.com> for contributing the patch.
|
||||
! purifyArray now supports multidimensional arrays. Thanks
|
||||
Sandro Miguel Marques <sandromiguel@sandromiguel.com> for contributing this patch.
|
||||
! initial and inherit settings available for width, height, and the min-/max-
|
||||
versions thereof. Thanks Michael Kliewe <info@phpgansta.de> for contributing
|
||||
this patch.
|
||||
! More color names are supported. Thanks Daijobou for contributing.
|
||||
- Compatibility fixes for PHP 7.3, including new CI for PHP 7.3
|
||||
(thank you Lukas Neumann <lksnmnn@gmail.com>) and removal of
|
||||
reserved words in our constants (thanks Darko Hrgovic <darko@darkodev.com>
|
||||
- Compatibility fixes for HHVM. Thanks Mateusz Turcza for contributing
|
||||
this fix.
|
||||
- HTML Purifier now never defines __autoload, fixing #196. Thanks
|
||||
Michael Kliewe for reporting.
|
||||
- In some situations, Config.php would report an undefined index: class
|
||||
error; this has been fixed. Thanks DiLong Fa for contributing
|
||||
this fix.
|
||||
- We no longer produce <script /> tags; we always explicitly write
|
||||
out the open and close tag. Thanks Dimitri Gritsajuk
|
||||
<gritsajuk.dimitri@gmail.com> for contributing this fix.
|
||||
- Better compatibility when IDNA constants are not present. Thanks
|
||||
Mateusz Turcza <xemlock@gmail.com> for contributing this fix.
|
||||
|
||||
4.10.0, released 2018-02-22
|
||||
# PHP 5.3 is no longer officially supported by HTML Purifier
|
||||
(we did not specifically break support, but we are no longer
|
||||
|
||||
Vendored
+1
-1
@@ -26,4 +26,4 @@ Package available on [Composer](https://packagist.org/packages/ezyang/htmlpurifi
|
||||
|
||||
If you're using Composer to manage dependencies, you can use
|
||||
|
||||
$ composer require "ezyang/htmlpurifier":"dev-master"
|
||||
$ composer require ezyang/htmlpurifier
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
4.10.0
|
||||
4.12.0
|
||||
Vendored
+2
-13
@@ -1,13 +1,2 @@
|
||||
HTML Purifier 4.9.x is a maintenance release, collecting a year
|
||||
of accumulated bug fixes plus a few new features. New features
|
||||
include support for min/max-width/height CSS, and rgba/hsl/hsla
|
||||
in color specifications. Major bugfixes include improvements
|
||||
in the Serializer cache to avoid chmod'ing directories, better
|
||||
entity decoding (we won't accidentally encode entities that occur
|
||||
in URLs) and rel="noopener" on links with target attributes,
|
||||
to prevent them from overwriting the original frame.
|
||||
|
||||
4.9.3 works around an infinite loop bug in PHP 7.1 with the opcode
|
||||
cache (and has one other, minor bugfix, avoiding using autoloading
|
||||
when testing for DOMDocument presence). If these bugs do not
|
||||
affect you, you do not need to upgrade.
|
||||
HTML Purifier 4.12.x is a maintenance release which makes
|
||||
compatibility fixes for PHP 7.4.
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
"type": "library",
|
||||
"keywords": ["html"],
|
||||
"homepage": "http://htmlpurifier.org/",
|
||||
"license": "LGPL",
|
||||
"license": "LGPL-2.1-or-later",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Edward Z. Yang",
|
||||
@@ -16,7 +16,7 @@
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"simpletest/simpletest": "^1.1"
|
||||
"simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": { "HTMLPurifier": "library/" },
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS
|
||||
* FILE, changes will be overwritten the next time the script is run.
|
||||
*
|
||||
* @version 4.10.0
|
||||
* @version 4.12.0
|
||||
*
|
||||
* @warning
|
||||
* You must *not* include any other HTML Purifier files before this file,
|
||||
|
||||
+10
-6
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
HTML Purifier 4.10.0 - Standards Compliant HTML Filtering
|
||||
HTML Purifier 4.12.0 - Standards Compliant HTML Filtering
|
||||
Copyright (C) 2006-2008 Edward Z. Yang
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
@@ -58,12 +58,12 @@ class HTMLPurifier
|
||||
* Version of HTML Purifier.
|
||||
* @type string
|
||||
*/
|
||||
public $version = '4.10.0';
|
||||
public $version = '4.12.0';
|
||||
|
||||
/**
|
||||
* Constant with version of HTML Purifier.
|
||||
*/
|
||||
const VERSION = '4.10.0';
|
||||
const VERSION = '4.12.0';
|
||||
|
||||
/**
|
||||
* Global configuration object.
|
||||
@@ -240,12 +240,16 @@ class HTMLPurifier
|
||||
public function purifyArray($array_of_html, $config = null)
|
||||
{
|
||||
$context_array = array();
|
||||
foreach ($array_of_html as $key => $html) {
|
||||
$array_of_html[$key] = $this->purify($html, $config);
|
||||
foreach($array_of_html as $key=>$value){
|
||||
if (is_array($value)) {
|
||||
$array[$key] = $this->purifyArray($value, $config);
|
||||
} else {
|
||||
$array[$key] = $this->purify($value, $config);
|
||||
}
|
||||
$context_array[$key] = $this->context;
|
||||
}
|
||||
$this->context = $context_array;
|
||||
return $array_of_html;
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,7 @@ class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef
|
||||
{
|
||||
|
||||
/**
|
||||
* @type bool
|
||||
* @type string
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
@@ -17,7 +17,7 @@ class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef
|
||||
public $minimized = true;
|
||||
|
||||
/**
|
||||
* @param bool $name
|
||||
* @param bool|string $name
|
||||
*/
|
||||
public function __construct($name = false)
|
||||
{
|
||||
|
||||
@@ -97,7 +97,11 @@ class HTMLPurifier_AttrDef_URI_Host extends HTMLPurifier_AttrDef
|
||||
|
||||
// PHP 5.3 and later support this functionality natively
|
||||
if (function_exists('idn_to_ascii')) {
|
||||
$string = idn_to_ascii($string, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
|
||||
if (defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46')) {
|
||||
$string = idn_to_ascii($string, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
|
||||
} else {
|
||||
$string = idn_to_ascii($string);
|
||||
}
|
||||
|
||||
// If we have Net_IDNA2 support, we can support IRIs by
|
||||
// punycoding them. (This is the most portable thing to do,
|
||||
|
||||
@@ -220,15 +220,25 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition
|
||||
array(
|
||||
new HTMLPurifier_AttrDef_CSS_Length('0'),
|
||||
new HTMLPurifier_AttrDef_CSS_Percentage(true),
|
||||
new HTMLPurifier_AttrDef_Enum(array('auto'))
|
||||
new HTMLPurifier_AttrDef_Enum(array('auto', 'initial', 'inherit'))
|
||||
)
|
||||
);
|
||||
$trusted_min_wh = new HTMLPurifier_AttrDef_CSS_Composite(
|
||||
array(
|
||||
new HTMLPurifier_AttrDef_CSS_Length('0'),
|
||||
new HTMLPurifier_AttrDef_CSS_Percentage(true),
|
||||
new HTMLPurifier_AttrDef_Enum(array('initial', 'inherit'))
|
||||
)
|
||||
);
|
||||
$trusted_max_wh = new HTMLPurifier_AttrDef_CSS_Composite(
|
||||
array(
|
||||
new HTMLPurifier_AttrDef_CSS_Length('0'),
|
||||
new HTMLPurifier_AttrDef_CSS_Percentage(true),
|
||||
new HTMLPurifier_AttrDef_Enum(array('none', 'initial', 'inherit'))
|
||||
)
|
||||
);
|
||||
$max = $config->get('CSS.MaxImgLength');
|
||||
|
||||
$this->info['min-width'] =
|
||||
$this->info['max-width'] =
|
||||
$this->info['min-height'] =
|
||||
$this->info['max-height'] =
|
||||
$this->info['width'] =
|
||||
$this->info['height'] =
|
||||
$max === null ?
|
||||
@@ -245,6 +255,38 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition
|
||||
// For everyone else:
|
||||
$trusted_wh
|
||||
);
|
||||
$this->info['min-width'] =
|
||||
$this->info['min-height'] =
|
||||
$max === null ?
|
||||
$trusted_min_wh :
|
||||
new HTMLPurifier_AttrDef_Switch(
|
||||
'img',
|
||||
// For img tags:
|
||||
new HTMLPurifier_AttrDef_CSS_Composite(
|
||||
array(
|
||||
new HTMLPurifier_AttrDef_CSS_Length('0', $max),
|
||||
new HTMLPurifier_AttrDef_Enum(array('initial', 'inherit'))
|
||||
)
|
||||
),
|
||||
// For everyone else:
|
||||
$trusted_min_wh
|
||||
);
|
||||
$this->info['max-width'] =
|
||||
$this->info['max-height'] =
|
||||
$max === null ?
|
||||
$trusted_max_wh :
|
||||
new HTMLPurifier_AttrDef_Switch(
|
||||
'img',
|
||||
// For img tags:
|
||||
new HTMLPurifier_AttrDef_CSS_Composite(
|
||||
array(
|
||||
new HTMLPurifier_AttrDef_CSS_Length('0', $max),
|
||||
new HTMLPurifier_AttrDef_Enum(array('none', 'initial', 'inherit'))
|
||||
)
|
||||
),
|
||||
// For everyone else:
|
||||
$trusted_max_wh
|
||||
);
|
||||
|
||||
$this->info['text-decoration'] = new HTMLPurifier_AttrDef_CSS_TextDecoration();
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class HTMLPurifier_ChildDef_Custom extends HTMLPurifier_ChildDef
|
||||
protected function _compileRegex()
|
||||
{
|
||||
$raw = str_replace(' ', '', $this->dtd_regex);
|
||||
if ($raw{0} != '(') {
|
||||
if ($raw[0] != '(') {
|
||||
$raw = "($raw)";
|
||||
}
|
||||
$el = '[#a-zA-Z0-9_.-]+';
|
||||
|
||||
@@ -21,7 +21,7 @@ class HTMLPurifier_Config
|
||||
* HTML Purifier's version
|
||||
* @type string
|
||||
*/
|
||||
public $version = '4.10.0';
|
||||
public $version = '4.12.0';
|
||||
|
||||
/**
|
||||
* Whether or not to automatically finalize
|
||||
@@ -890,7 +890,7 @@ class HTMLPurifier_Config
|
||||
// zip(tail(trace), trace) -- but PHP is not Haskell har har
|
||||
for ($i = 0, $c = count($trace); $i < $c - 1; $i++) {
|
||||
// XXX this is not correct on some versions of HTML Purifier
|
||||
if ($trace[$i + 1]['class'] === 'HTMLPurifier_Config') {
|
||||
if (isset($trace[$i + 1]['class']) && $trace[$i + 1]['class'] === 'HTMLPurifier_Config') {
|
||||
continue;
|
||||
}
|
||||
$frame = $trace[$i];
|
||||
|
||||
@@ -100,7 +100,7 @@ class HTMLPurifier_ConfigSchema
|
||||
* @param string $key Name of directive
|
||||
* @param mixed $default Default value of directive
|
||||
* @param string $type Allowed type of the directive. See
|
||||
* HTMLPurifier_DirectiveDef::$type for allowed values
|
||||
* HTMLPurifier_VarParser::$types for allowed values
|
||||
* @param bool $allow_null Whether or not to allow null values
|
||||
*/
|
||||
public function add($key, $default, $type, $allow_null)
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -6,7 +6,7 @@ DEFAULT: false
|
||||
<p>
|
||||
When enabled, HTML Purifier will treat any elements that contain only
|
||||
non-breaking spaces as well as regular whitespace as empty, and remove
|
||||
them when %AutoForamt.RemoveEmpty is enabled.
|
||||
them when %AutoFormat.RemoveEmpty is enabled.
|
||||
</p>
|
||||
<p>
|
||||
See %AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions for a list of elements
|
||||
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
Core.AllowParseManyTags
|
||||
TYPE: bool
|
||||
DEFAULT: false
|
||||
VERSION: 4.10.1
|
||||
--DESCRIPTION--
|
||||
<p>
|
||||
This directive allows parsing of many nested tags.
|
||||
If you set true, relaxes any hardcoded limit from the parser.
|
||||
However, in that case it may cause a Dos attack.
|
||||
Be careful when enabling it.
|
||||
</p>
|
||||
--# vim: et sw=4 sts=4
|
||||
+145
-14
@@ -3,23 +3,154 @@ TYPE: hash
|
||||
VERSION: 2.0.0
|
||||
--DEFAULT--
|
||||
array (
|
||||
'maroon' => '#800000',
|
||||
'red' => '#FF0000',
|
||||
'orange' => '#FFA500',
|
||||
'yellow' => '#FFFF00',
|
||||
'olive' => '#808000',
|
||||
'purple' => '#800080',
|
||||
'fuchsia' => '#FF00FF',
|
||||
'white' => '#FFFFFF',
|
||||
'lime' => '#00FF00',
|
||||
'green' => '#008000',
|
||||
'navy' => '#000080',
|
||||
'blue' => '#0000FF',
|
||||
'aliceblue' => '#F0F8FF',
|
||||
'antiquewhite' => '#FAEBD7',
|
||||
'aqua' => '#00FFFF',
|
||||
'teal' => '#008080',
|
||||
'aquamarine' => '#7FFFD4',
|
||||
'azure' => '#F0FFFF',
|
||||
'beige' => '#F5F5DC',
|
||||
'bisque' => '#FFE4C4',
|
||||
'black' => '#000000',
|
||||
'silver' => '#C0C0C0',
|
||||
'blanchedalmond' => '#FFEBCD',
|
||||
'blue' => '#0000FF',
|
||||
'blueviolet' => '#8A2BE2',
|
||||
'brown' => '#A52A2A',
|
||||
'burlywood' => '#DEB887',
|
||||
'cadetblue' => '#5F9EA0',
|
||||
'chartreuse' => '#7FFF00',
|
||||
'chocolate' => '#D2691E',
|
||||
'coral' => '#FF7F50',
|
||||
'cornflowerblue' => '#6495ED',
|
||||
'cornsilk' => '#FFF8DC',
|
||||
'crimson' => '#DC143C',
|
||||
'cyan' => '#00FFFF',
|
||||
'darkblue' => '#00008B',
|
||||
'darkcyan' => '#008B8B',
|
||||
'darkgoldenrod' => '#B8860B',
|
||||
'darkgray' => '#A9A9A9',
|
||||
'darkgrey' => '#A9A9A9',
|
||||
'darkgreen' => '#006400',
|
||||
'darkkhaki' => '#BDB76B',
|
||||
'darkmagenta' => '#8B008B',
|
||||
'darkolivegreen' => '#556B2F',
|
||||
'darkorange' => '#FF8C00',
|
||||
'darkorchid' => '#9932CC',
|
||||
'darkred' => '#8B0000',
|
||||
'darksalmon' => '#E9967A',
|
||||
'darkseagreen' => '#8FBC8F',
|
||||
'darkslateblue' => '#483D8B',
|
||||
'darkslategray' => '#2F4F4F',
|
||||
'darkslategrey' => '#2F4F4F',
|
||||
'darkturquoise' => '#00CED1',
|
||||
'darkviolet' => '#9400D3',
|
||||
'deeppink' => '#FF1493',
|
||||
'deepskyblue' => '#00BFFF',
|
||||
'dimgray' => '#696969',
|
||||
'dimgrey' => '#696969',
|
||||
'dodgerblue' => '#1E90FF',
|
||||
'firebrick' => '#B22222',
|
||||
'floralwhite' => '#FFFAF0',
|
||||
'forestgreen' => '#228B22',
|
||||
'fuchsia' => '#FF00FF',
|
||||
'gainsboro' => '#DCDCDC',
|
||||
'ghostwhite' => '#F8F8FF',
|
||||
'gold' => '#FFD700',
|
||||
'goldenrod' => '#DAA520',
|
||||
'gray' => '#808080',
|
||||
'grey' => '#808080',
|
||||
'green' => '#008000',
|
||||
'greenyellow' => '#ADFF2F',
|
||||
'honeydew' => '#F0FFF0',
|
||||
'hotpink' => '#FF69B4',
|
||||
'indianred' => '#CD5C5C',
|
||||
'indigo' => '#4B0082',
|
||||
'ivory' => '#FFFFF0',
|
||||
'khaki' => '#F0E68C',
|
||||
'lavender' => '#E6E6FA',
|
||||
'lavenderblush' => '#FFF0F5',
|
||||
'lawngreen' => '#7CFC00',
|
||||
'lemonchiffon' => '#FFFACD',
|
||||
'lightblue' => '#ADD8E6',
|
||||
'lightcoral' => '#F08080',
|
||||
'lightcyan' => '#E0FFFF',
|
||||
'lightgoldenrodyellow' => '#FAFAD2',
|
||||
'lightgray' => '#D3D3D3',
|
||||
'lightgrey' => '#D3D3D3',
|
||||
'lightgreen' => '#90EE90',
|
||||
'lightpink' => '#FFB6C1',
|
||||
'lightsalmon' => '#FFA07A',
|
||||
'lightseagreen' => '#20B2AA',
|
||||
'lightskyblue' => '#87CEFA',
|
||||
'lightslategray' => '#778899',
|
||||
'lightslategrey' => '#778899',
|
||||
'lightsteelblue' => '#B0C4DE',
|
||||
'lightyellow' => '#FFFFE0',
|
||||
'lime' => '#00FF00',
|
||||
'limegreen' => '#32CD32',
|
||||
'linen' => '#FAF0E6',
|
||||
'magenta' => '#FF00FF',
|
||||
'maroon' => '#800000',
|
||||
'mediumaquamarine' => '#66CDAA',
|
||||
'mediumblue' => '#0000CD',
|
||||
'mediumorchid' => '#BA55D3',
|
||||
'mediumpurple' => '#9370DB',
|
||||
'mediumseagreen' => '#3CB371',
|
||||
'mediumslateblue' => '#7B68EE',
|
||||
'mediumspringgreen' => '#00FA9A',
|
||||
'mediumturquoise' => '#48D1CC',
|
||||
'mediumvioletred' => '#C71585',
|
||||
'midnightblue' => '#191970',
|
||||
'mintcream' => '#F5FFFA',
|
||||
'mistyrose' => '#FFE4E1',
|
||||
'moccasin' => '#FFE4B5',
|
||||
'navajowhite' => '#FFDEAD',
|
||||
'navy' => '#000080',
|
||||
'oldlace' => '#FDF5E6',
|
||||
'olive' => '#808000',
|
||||
'olivedrab' => '#6B8E23',
|
||||
'orange' => '#FFA500',
|
||||
'orangered' => '#FF4500',
|
||||
'orchid' => '#DA70D6',
|
||||
'palegoldenrod' => '#EEE8AA',
|
||||
'palegreen' => '#98FB98',
|
||||
'paleturquoise' => '#AFEEEE',
|
||||
'palevioletred' => '#DB7093',
|
||||
'papayawhip' => '#FFEFD5',
|
||||
'peachpuff' => '#FFDAB9',
|
||||
'peru' => '#CD853F',
|
||||
'pink' => '#FFC0CB',
|
||||
'plum' => '#DDA0DD',
|
||||
'powderblue' => '#B0E0E6',
|
||||
'purple' => '#800080',
|
||||
'rebeccapurple' => '#663399',
|
||||
'red' => '#FF0000',
|
||||
'rosybrown' => '#BC8F8F',
|
||||
'royalblue' => '#4169E1',
|
||||
'saddlebrown' => '#8B4513',
|
||||
'salmon' => '#FA8072',
|
||||
'sandybrown' => '#F4A460',
|
||||
'seagreen' => '#2E8B57',
|
||||
'seashell' => '#FFF5EE',
|
||||
'sienna' => '#A0522D',
|
||||
'silver' => '#C0C0C0',
|
||||
'skyblue' => '#87CEEB',
|
||||
'slateblue' => '#6A5ACD',
|
||||
'slategray' => '#708090',
|
||||
'slategrey' => '#708090',
|
||||
'snow' => '#FFFAFA',
|
||||
'springgreen' => '#00FF7F',
|
||||
'steelblue' => '#4682B4',
|
||||
'tan' => '#D2B48C',
|
||||
'teal' => '#008080',
|
||||
'thistle' => '#D8BFD8',
|
||||
'tomato' => '#FF6347',
|
||||
'turquoise' => '#40E0D0',
|
||||
'violet' => '#EE82EE',
|
||||
'wheat' => '#F5DEB3',
|
||||
'white' => '#FFFFFF',
|
||||
'whitesmoke' => '#F5F5F5',
|
||||
'yellow' => '#FFFF00',
|
||||
'yellowgreen' => '#9ACD32'
|
||||
)
|
||||
--DESCRIPTION--
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ class HTMLPurifier_Encoder
|
||||
|
||||
$len = strlen($str);
|
||||
for ($i = 0; $i < $len; $i++) {
|
||||
$in = ord($str{$i});
|
||||
$in = ord($str[$i]);
|
||||
$char .= $str[$i]; // append byte to char
|
||||
if (0 == $mState) {
|
||||
// When mState is zero we expect either a US-ASCII character
|
||||
|
||||
@@ -118,7 +118,7 @@ class HTMLPurifier_EntityParser
|
||||
$entity = $matches[0];
|
||||
$hex_part = @$matches[1];
|
||||
$dec_part = @$matches[2];
|
||||
$named_part = empty($matches[3]) ? @$matches[4] : $matches[3];
|
||||
$named_part = empty($matches[3]) ? (empty($matches[4]) ? "" : $matches[4]) : $matches[3];
|
||||
if ($hex_part !== NULL && $hex_part !== "") {
|
||||
return HTMLPurifier_Encoder::unichr(hexdec($hex_part));
|
||||
} elseif ($dec_part !== NULL && $dec_part !== "") {
|
||||
|
||||
@@ -132,9 +132,9 @@ class HTMLPurifier_HTMLModule
|
||||
* @param string $element Name of element to add
|
||||
* @param string|bool $type What content set should element be registered to?
|
||||
* Set as false to skip this step.
|
||||
* @param string $contents Allowed children in form of:
|
||||
* @param string|HTMLPurifier_ChildDef $contents Allowed children in form of:
|
||||
* "$content_model_type: $content_model"
|
||||
* @param array $attr_includes What attribute collections to register to
|
||||
* @param array|string $attr_includes What attribute collections to register to
|
||||
* element?
|
||||
* @param array $attr What unique attributes does the element define?
|
||||
* @see HTMLPurifier_ElementDef:: for in-depth descriptions of these parameters.
|
||||
|
||||
+2
-2
@@ -23,13 +23,13 @@ class HTMLPurifier_HTMLModule_SafeScripting extends HTMLPurifier_HTMLModule
|
||||
$script = $this->addElement(
|
||||
'script',
|
||||
'Inline',
|
||||
'Empty',
|
||||
'Optional:', // Not `Empty` to not allow to autoclose the <script /> tag @see https://www.w3.org/TR/html4/interact/scripts.html
|
||||
null,
|
||||
array(
|
||||
// While technically not required by the spec, we're forcing
|
||||
// it to this value.
|
||||
'type' => 'Enum#text/javascript',
|
||||
'src*' => new HTMLPurifier_AttrDef_Enum(array_keys($allowed))
|
||||
'src*' => new HTMLPurifier_AttrDef_Enum(array_keys($allowed), /*case sensitive*/ true)
|
||||
)
|
||||
);
|
||||
$script->attr_transform_pre[] =
|
||||
|
||||
+2
@@ -8,4 +8,6 @@ $messages = array(
|
||||
'HTMLPurifier' => 'HTML Purifier X'
|
||||
);
|
||||
|
||||
$errorNames = array();
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
|
||||
+2
@@ -9,4 +9,6 @@ $messages = array(
|
||||
'HTMLPurifier' => 'HTML Purifier XNone'
|
||||
);
|
||||
|
||||
$errorNames = array();
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
|
||||
@@ -68,8 +68,18 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer
|
||||
$doc = new DOMDocument();
|
||||
$doc->encoding = 'UTF-8'; // theoretically, the above has this covered
|
||||
|
||||
$options = 0;
|
||||
if ($config->get('Core.AllowParseManyTags') && defined('LIBXML_PARSEHUGE')) {
|
||||
$options |= LIBXML_PARSEHUGE;
|
||||
}
|
||||
|
||||
set_error_handler(array($this, 'muteErrorHandler'));
|
||||
$doc->loadHTML($html);
|
||||
// loadHTML() fails on PHP 5.3 when second parameter is given
|
||||
if ($options) {
|
||||
$doc->loadHTML($html, $options);
|
||||
} else {
|
||||
$doc->loadHTML($html);
|
||||
}
|
||||
restore_error_handler();
|
||||
|
||||
$body = $doc->getElementsByTagName('html')->item(0)-> // <html>
|
||||
@@ -133,11 +143,11 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer
|
||||
*/
|
||||
protected function getTagName($node)
|
||||
{
|
||||
if (property_exists($node, 'tagName')) {
|
||||
if (isset($node->tagName)) {
|
||||
return $node->tagName;
|
||||
} else if (property_exists($node, 'nodeName')) {
|
||||
} else if (isset($node->nodeName)) {
|
||||
return $node->nodeName;
|
||||
} else if (property_exists($node, 'localName')) {
|
||||
} else if (isset($node->localName)) {
|
||||
return $node->localName;
|
||||
}
|
||||
return null;
|
||||
@@ -150,11 +160,11 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer
|
||||
*/
|
||||
protected function getData($node)
|
||||
{
|
||||
if (property_exists($node, 'data')) {
|
||||
if (isset($node->data)) {
|
||||
return $node->data;
|
||||
} else if (property_exists($node, 'nodeValue')) {
|
||||
} else if (isset($node->nodeValue)) {
|
||||
return $node->nodeValue;
|
||||
} else if (property_exists($node, 'textContent')) {
|
||||
} else if (isset($node->textContent)) {
|
||||
return $node->textContent;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -48,7 +48,7 @@ class HTMLPurifier_Printer_ConfigForm extends HTMLPurifier_Printer
|
||||
$this->compress = $compress;
|
||||
// initialize sub-printers
|
||||
$this->fields[0] = new HTMLPurifier_Printer_ConfigForm_default();
|
||||
$this->fields[HTMLPurifier_VarParser::BOOL] = new HTMLPurifier_Printer_ConfigForm_bool();
|
||||
$this->fields[HTMLPurifier_VarParser::C_BOOL] = new HTMLPurifier_Printer_ConfigForm_bool();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -339,7 +339,7 @@ class HTMLPurifier_Printer_ConfigForm_default extends HTMLPurifier_Printer
|
||||
$value = '';
|
||||
}
|
||||
}
|
||||
if ($type === HTMLPurifier_VarParser::MIXED) {
|
||||
if ($type === HTMLPurifier_VarParser::C_MIXED) {
|
||||
return 'Not supported';
|
||||
$value = serialize($value);
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class HTMLPurifier_TagTransform_Font extends HTMLPurifier_TagTransform
|
||||
if (isset($attr['size'])) {
|
||||
// normalize large numbers
|
||||
if ($attr['size'] !== '') {
|
||||
if ($attr['size']{0} == '+' || $attr['size']{0} == '-') {
|
||||
if ($attr['size'][0] == '+' || $attr['size'][0] == '-') {
|
||||
$size = (int)$attr['size'];
|
||||
if ($size < -2) {
|
||||
$attr['size'] = '-2';
|
||||
|
||||
+16
-16
@@ -7,34 +7,34 @@
|
||||
class HTMLPurifier_VarParser
|
||||
{
|
||||
|
||||
const STRING = 1;
|
||||
const C_STRING = 1;
|
||||
const ISTRING = 2;
|
||||
const TEXT = 3;
|
||||
const ITEXT = 4;
|
||||
const INT = 5;
|
||||
const FLOAT = 6;
|
||||
const BOOL = 7;
|
||||
const C_INT = 5;
|
||||
const C_FLOAT = 6;
|
||||
const C_BOOL = 7;
|
||||
const LOOKUP = 8;
|
||||
const ALIST = 9;
|
||||
const HASH = 10;
|
||||
const MIXED = 11;
|
||||
const C_MIXED = 11;
|
||||
|
||||
/**
|
||||
* Lookup table of allowed types. Mainly for backwards compatibility, but
|
||||
* also convenient for transforming string type names to the integer constants.
|
||||
*/
|
||||
public static $types = array(
|
||||
'string' => self::STRING,
|
||||
'string' => self::C_STRING,
|
||||
'istring' => self::ISTRING,
|
||||
'text' => self::TEXT,
|
||||
'itext' => self::ITEXT,
|
||||
'int' => self::INT,
|
||||
'float' => self::FLOAT,
|
||||
'bool' => self::BOOL,
|
||||
'int' => self::C_INT,
|
||||
'float' => self::C_FLOAT,
|
||||
'bool' => self::C_BOOL,
|
||||
'lookup' => self::LOOKUP,
|
||||
'list' => self::ALIST,
|
||||
'hash' => self::HASH,
|
||||
'mixed' => self::MIXED
|
||||
'mixed' => self::C_MIXED
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ class HTMLPurifier_VarParser
|
||||
* allowed value lists.
|
||||
*/
|
||||
public static $stringTypes = array(
|
||||
self::STRING => true,
|
||||
self::C_STRING => true,
|
||||
self::ISTRING => true,
|
||||
self::TEXT => true,
|
||||
self::ITEXT => true,
|
||||
@@ -74,7 +74,7 @@ class HTMLPurifier_VarParser
|
||||
// These are basic checks, to make sure nothing horribly wrong
|
||||
// happened in our implementations.
|
||||
switch ($type) {
|
||||
case (self::STRING):
|
||||
case (self::C_STRING):
|
||||
case (self::ISTRING):
|
||||
case (self::TEXT):
|
||||
case (self::ITEXT):
|
||||
@@ -85,17 +85,17 @@ class HTMLPurifier_VarParser
|
||||
$var = strtolower($var);
|
||||
}
|
||||
return $var;
|
||||
case (self::INT):
|
||||
case (self::C_INT):
|
||||
if (!is_int($var)) {
|
||||
break;
|
||||
}
|
||||
return $var;
|
||||
case (self::FLOAT):
|
||||
case (self::C_FLOAT):
|
||||
if (!is_float($var)) {
|
||||
break;
|
||||
}
|
||||
return $var;
|
||||
case (self::BOOL):
|
||||
case (self::C_BOOL):
|
||||
if (!is_bool($var)) {
|
||||
break;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ class HTMLPurifier_VarParser
|
||||
}
|
||||
}
|
||||
return $var;
|
||||
case (self::MIXED):
|
||||
case (self::C_MIXED):
|
||||
return $var;
|
||||
default:
|
||||
$this->errorInconsistent(get_class($this), $type);
|
||||
|
||||
@@ -23,23 +23,23 @@ class HTMLPurifier_VarParser_Flexible extends HTMLPurifier_VarParser
|
||||
// Note: if code "breaks" from the switch, it triggers a generic
|
||||
// exception to be thrown. Specific errors can be specifically
|
||||
// done here.
|
||||
case self::MIXED:
|
||||
case self::C_MIXED:
|
||||
case self::ISTRING:
|
||||
case self::STRING:
|
||||
case self::C_STRING:
|
||||
case self::TEXT:
|
||||
case self::ITEXT:
|
||||
return $var;
|
||||
case self::INT:
|
||||
case self::C_INT:
|
||||
if (is_string($var) && ctype_digit($var)) {
|
||||
$var = (int)$var;
|
||||
}
|
||||
return $var;
|
||||
case self::FLOAT:
|
||||
case self::C_FLOAT:
|
||||
if ((is_string($var) && is_numeric($var)) || is_int($var)) {
|
||||
$var = (float)$var;
|
||||
}
|
||||
return $var;
|
||||
case self::BOOL:
|
||||
case self::C_BOOL:
|
||||
if (is_int($var) && ($var === 0 || $var === 1)) {
|
||||
$var = (bool)$var;
|
||||
} elseif (is_string($var)) {
|
||||
|
||||
+7
-1
@@ -1 +1,7 @@
|
||||
Deny from all
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
|
||||
<IfModule !mod_authz_core.c>
|
||||
Deny from all
|
||||
</ifModule>
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
assertCli();
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Runs all generation/flush cache scripts to ensure that somewhat volatile
|
||||
* generated files are up-to-date.
|
||||
*/
|
||||
|
||||
function e($cmd)
|
||||
{
|
||||
echo "\$ $cmd\n";
|
||||
passthru($cmd, $status);
|
||||
echo "\n";
|
||||
if ($status) exit($status);
|
||||
}
|
||||
|
||||
$php = empty($_SERVER['argv'][1]) ? 'php' : $_SERVER['argv'][1];
|
||||
|
||||
e($php . ' generate-includes.php');
|
||||
e($php . ' generate-schema-cache.php');
|
||||
e($php . ' flush-definition-cache.php');
|
||||
e($php . ' generate-standalone.php');
|
||||
e($php . ' config-scanner.php');
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
php "$DIR/generate-includes.php"
|
||||
php "$DIR/generate-schema-cache.php"
|
||||
php "$DIR/flush-definition-cache.php"
|
||||
php "$DIR/generate-standalone.php"
|
||||
php "$DIR/config-scanner.php"
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
require_once 'common.php';
|
||||
assertCli();
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Converts all instances of $config->set and $config->get to the new
|
||||
* format, as described by docs/dev-config-bcbreaks.txt
|
||||
*/
|
||||
|
||||
$FS = new FSTools();
|
||||
chdir(dirname(__FILE__) . '/..');
|
||||
$raw_files = $FS->globr('.', '*.php');
|
||||
foreach ($raw_files as $file) {
|
||||
$file = substr($file, 2); // rm leading './'
|
||||
if (strpos($file, 'library/standalone/') === 0) continue;
|
||||
if (strpos($file, 'maintenance/update-config.php') === 0) continue;
|
||||
if (strpos($file, 'test-settings.php') === 0) continue;
|
||||
if (substr_count($file, '.') > 1) continue; // rm meta files
|
||||
// process the file
|
||||
$contents = file_get_contents($file);
|
||||
$contents = preg_replace(
|
||||
"#config->(set|get)\('(.+?)', '(.+?)'#",
|
||||
"config->\\1('\\2.\\3'",
|
||||
$contents
|
||||
);
|
||||
if ($contents === '') continue;
|
||||
file_put_contents($file, $contents);
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
@@ -53,5 +53,6 @@ $config->set('Core.Encoding', $GLOBALS['PHORUM']['DATA']['CHARSET']); // we'll c
|
||||
if (strtolower($GLOBALS['PHORUM']['DATA']['CHARSET']) !== 'utf-8') {
|
||||
$config->set('Core.EscapeNonASCIICharacters', true);
|
||||
}
|
||||
$config->set('Core.AllowParseManyTags', false);
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
// Tags releases
|
||||
|
||||
if (php_sapi_name() != 'cli') {
|
||||
echo 'Release script cannot be called from web-browser.';
|
||||
exit;
|
||||
}
|
||||
|
||||
require 'svn.php';
|
||||
|
||||
$svn_info = my_svn_info('.');
|
||||
|
||||
$version = trim(file_get_contents('VERSION'));
|
||||
|
||||
$trunk_url = $svn_info['Repository Root'] . '/htmlpurifier/trunk';
|
||||
$trunk_tag_url = $svn_info['Repository Root'] . '/htmlpurifier/tags/' . $version;
|
||||
|
||||
echo "Tagging trunk to tags/$version...";
|
||||
passthru("svn copy --message \"Tag $version release.\" $trunk_url $trunk_tag_url");
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
Vendored
+1
-1
@@ -102,7 +102,7 @@ if (!$c) {
|
||||
}
|
||||
file_put_contents('library/HTMLPurifier/Config.php', $config_c);
|
||||
|
||||
passthru('php maintenance/flush.php');
|
||||
passthru('maintenance/flush.sh');
|
||||
|
||||
if ($is_dev) echo "Review changes, write something in WHATSNEW and FOCUS, and then commit with log 'Release $version.'" . PHP_EOL;
|
||||
else echo "Numbers updated to dev, no other modifications necessary!";
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
$config = PhpCsFixer\Config::create()
|
||||
->setRiskyAllowed(true)
|
||||
->setRules([
|
||||
'@PSR2' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'declare_strict_types' => false,
|
||||
'concat_space' => ['spacing'=>'one'],
|
||||
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
|
||||
'ordered_imports' => true,
|
||||
// 'phpdoc_align' => ['align'=>'vertical'],
|
||||
// 'native_function_invocation' => true,
|
||||
])
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
->in(__DIR__.'/src')
|
||||
->in(__DIR__.'/tests')
|
||||
->name('*.php')
|
||||
)
|
||||
;
|
||||
|
||||
return $config;
|
||||
+35
@@ -1,5 +1,40 @@
|
||||
# Change Log
|
||||
|
||||
## 6.5.2 - 2019-12-23
|
||||
|
||||
* idn_to_ascii() fix for old PHP versions [#2489](https://github.com/guzzle/guzzle/pull/2489)
|
||||
|
||||
## 6.5.1 - 2019-12-21
|
||||
|
||||
* Better defaults for PHP installations with old ICU lib [#2454](https://github.com/guzzle/guzzle/pull/2454)
|
||||
* IDN support for redirects [#2424](https://github.com/guzzle/guzzle/pull/2424)
|
||||
|
||||
## 6.5.0 - 2019-12-07
|
||||
|
||||
* Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143)
|
||||
* Improvement: Added support to pass arbitrary options to `curl_multi_init`. [#2287](https://github.com/guzzle/guzzle/pull/2287)
|
||||
* Fix: Gracefully handle passing `null` to the `header` option. [#2132](https://github.com/guzzle/guzzle/pull/2132)
|
||||
* Fix: `RetryMiddleware` did not do exponential delay between retires due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132)
|
||||
* Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348)
|
||||
* Deprecated `ClientInterface::VERSION`
|
||||
|
||||
## 6.4.1 - 2019-10-23
|
||||
|
||||
* No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that
|
||||
* Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
|
||||
|
||||
## 6.4.0 - 2019-10-23
|
||||
|
||||
* Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108)
|
||||
* Fix: Test if response is readable before returning a summary in `RequestException::getResponseBodySummary()` [#2081](https://github.com/guzzle/guzzle/pull/2081)
|
||||
* Fix: Add support for GUZZLE_CURL_SELECT_TIMEOUT environment variable [#2161](https://github.com/guzzle/guzzle/pull/2161)
|
||||
* Improvement: Added `GuzzleHttp\Exception\InvalidArgumentException` [#2163](https://github.com/guzzle/guzzle/pull/2163)
|
||||
* Improvement: Added `GuzzleHttp\_current_time()` to use `hrtime()` if that function exists. [#2242](https://github.com/guzzle/guzzle/pull/2242)
|
||||
* Improvement: Added curl's `appconnect_time` in `TransferStats` [#2284](https://github.com/guzzle/guzzle/pull/2284)
|
||||
* Improvement: Make GuzzleException extend Throwable wherever it's available [#2273](https://github.com/guzzle/guzzle/pull/2273)
|
||||
* Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335)
|
||||
* Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362)
|
||||
|
||||
## 6.3.3 - 2018-04-22
|
||||
|
||||
* Fix: Default headers when decode_content is specified
|
||||
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
FROM composer:latest as setup
|
||||
|
||||
RUN mkdir /guzzle
|
||||
|
||||
WORKDIR /guzzle
|
||||
|
||||
RUN set -xe \
|
||||
&& composer init --name=guzzlehttp/test --description="Simple project for testing Guzzle scripts" --author="Márk Sági-Kazár <mark.sagikazar@gmail.com>" --no-interaction \
|
||||
&& composer require guzzlehttp/guzzle
|
||||
|
||||
|
||||
FROM php:7.3
|
||||
|
||||
RUN mkdir /guzzle
|
||||
|
||||
WORKDIR /guzzle
|
||||
|
||||
COPY --from=setup /guzzle /guzzle
|
||||
Vendored
+11
-12
@@ -21,19 +21,18 @@ trivial to integrate with web services.
|
||||
|
||||
```php
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$res = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
|
||||
echo $res->getStatusCode();
|
||||
// 200
|
||||
echo $res->getHeaderLine('content-type');
|
||||
// 'application/json; charset=utf8'
|
||||
echo $res->getBody();
|
||||
// '{"id": 1420053, "name": "guzzle", ...}'
|
||||
$response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
|
||||
|
||||
// Send an asynchronous request.
|
||||
echo $response->getStatusCode(); # 200
|
||||
echo $response->getHeaderLine('content-type'); # 'application/json; charset=utf8'
|
||||
echo $response->getBody(); # '{"id": 1420053, "name": "guzzle", ...}'
|
||||
|
||||
# Send an asynchronous request.
|
||||
$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
|
||||
$promise = $client->sendAsync($request)->then(function ($response) {
|
||||
echo 'I completed! ' . $response->getBody();
|
||||
});
|
||||
|
||||
$promise->wait();
|
||||
```
|
||||
|
||||
@@ -57,7 +56,7 @@ curl -sS https://getcomposer.org/installer | php
|
||||
Next, run the Composer command to install the latest stable version of Guzzle:
|
||||
|
||||
```bash
|
||||
php composer.phar require guzzlehttp/guzzle
|
||||
composer require guzzlehttp/guzzle
|
||||
```
|
||||
|
||||
After installing, you need to require Composer's autoloader:
|
||||
@@ -69,7 +68,7 @@ require 'vendor/autoload.php';
|
||||
You can then later update Guzzle using composer:
|
||||
|
||||
```bash
|
||||
composer.phar update
|
||||
composer update
|
||||
```
|
||||
|
||||
|
||||
@@ -79,13 +78,13 @@ composer.phar update
|
||||
|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------|
|
||||
| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 |
|
||||
| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 |
|
||||
| 5.x | Maintained | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 |
|
||||
| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 |
|
||||
| 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 |
|
||||
|
||||
[guzzle-3-repo]: https://github.com/guzzle/guzzle3
|
||||
[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x
|
||||
[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
|
||||
[guzzle-6-repo]: https://github.com/guzzle/guzzle
|
||||
[guzzle-3-docs]: http://guzzle3.readthedocs.org/en/latest/
|
||||
[guzzle-3-docs]: http://guzzle3.readthedocs.org
|
||||
[guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/
|
||||
[guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/
|
||||
|
||||
+29
-14
@@ -2,7 +2,15 @@
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"type": "library",
|
||||
"description": "Guzzle is a PHP HTTP client library",
|
||||
"keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"],
|
||||
"keywords": [
|
||||
"framework",
|
||||
"http",
|
||||
"rest",
|
||||
"web service",
|
||||
"curl",
|
||||
"client",
|
||||
"HTTP client"
|
||||
],
|
||||
"homepage": "http://guzzlephp.org/",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
@@ -14,31 +22,38 @@
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"guzzlehttp/psr7": "^1.4",
|
||||
"guzzlehttp/promises": "^1.0"
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.6.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
|
||||
"psr/log": "^1.0"
|
||||
"psr/log": "^1.1"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log": "Required for using the Log middleware",
|
||||
"ext-intl": "Required for Internationalized Domain Name (IDN) support"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "6.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": ["src/functions_include.php"],
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\": "src/"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log": "Required for using the Log middleware"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "6.3-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+95
-6
@@ -2,11 +2,12 @@
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Cookie\CookieJar;
|
||||
use GuzzleHttp\Exception\InvalidArgumentException;
|
||||
use GuzzleHttp\Promise;
|
||||
use GuzzleHttp\Psr7;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
|
||||
/**
|
||||
* @method ResponseInterface get(string|UriInterface $uri, array $options = [])
|
||||
@@ -75,6 +76,12 @@ class Client implements ClientInterface
|
||||
$this->configureDefaults($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $method
|
||||
* @param array $args
|
||||
*
|
||||
* @return Promise\PromiseInterface
|
||||
*/
|
||||
public function __call($method, $args)
|
||||
{
|
||||
if (count($args) < 1) {
|
||||
@@ -89,6 +96,14 @@ class Client implements ClientInterface
|
||||
: $this->request($method, $uri, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Asynchronously send an HTTP request.
|
||||
*
|
||||
* @param array $options Request options to apply to the given
|
||||
* request and to the transfer. See \GuzzleHttp\RequestOptions.
|
||||
*
|
||||
* @return Promise\PromiseInterface
|
||||
*/
|
||||
public function sendAsync(RequestInterface $request, array $options = [])
|
||||
{
|
||||
// Merge the base URI into the request URI if needed.
|
||||
@@ -100,12 +115,35 @@ class Client implements ClientInterface
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an HTTP request.
|
||||
*
|
||||
* @param array $options Request options to apply to the given
|
||||
* request and to the transfer. See \GuzzleHttp\RequestOptions.
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function send(RequestInterface $request, array $options = [])
|
||||
{
|
||||
$options[RequestOptions::SYNCHRONOUS] = true;
|
||||
return $this->sendAsync($request, $options)->wait();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and send an asynchronous HTTP request.
|
||||
*
|
||||
* Use an absolute path to override the base path of the client, or a
|
||||
* relative path to append to the base path of the client. The URL can
|
||||
* contain the query string as well. Use an array to provide a URL
|
||||
* template and additional variables to use in the URL template expansion.
|
||||
*
|
||||
* @param string $method HTTP method
|
||||
* @param string|UriInterface $uri URI object or string.
|
||||
* @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
|
||||
*
|
||||
* @return Promise\PromiseInterface
|
||||
*/
|
||||
public function requestAsync($method, $uri = '', array $options = [])
|
||||
{
|
||||
$options = $this->prepareDefaults($options);
|
||||
@@ -125,12 +163,37 @@ class Client implements ClientInterface
|
||||
return $this->transfer($request, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and send an HTTP request.
|
||||
*
|
||||
* Use an absolute path to override the base path of the client, or a
|
||||
* relative path to append to the base path of the client. The URL can
|
||||
* contain the query string as well.
|
||||
*
|
||||
* @param string $method HTTP method.
|
||||
* @param string|UriInterface $uri URI object or string.
|
||||
* @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function request($method, $uri = '', array $options = [])
|
||||
{
|
||||
$options[RequestOptions::SYNCHRONOUS] = true;
|
||||
return $this->requestAsync($method, $uri, $options)->wait();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a client configuration option.
|
||||
*
|
||||
* These options include default request options of the client, a "handler"
|
||||
* (if utilized by the concrete client), and a "base_uri" if utilized by
|
||||
* the concrete client.
|
||||
*
|
||||
* @param string|null $option The config option to retrieve.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getConfig($option = null)
|
||||
{
|
||||
return $option === null
|
||||
@@ -138,6 +201,11 @@ class Client implements ClientInterface
|
||||
: (isset($this->config[$option]) ? $this->config[$option] : null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $uri
|
||||
*
|
||||
* @return UriInterface
|
||||
*/
|
||||
private function buildUri($uri, array $config)
|
||||
{
|
||||
// for BC we accept null which would otherwise fail in uri_for
|
||||
@@ -147,6 +215,11 @@ class Client implements ClientInterface
|
||||
$uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri);
|
||||
}
|
||||
|
||||
if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) {
|
||||
$idnOptions = ($config['idn_conversion'] === true) ? IDNA_DEFAULT : $config['idn_conversion'];
|
||||
$uri = _idn_uri_convert($uri, $idnOptions);
|
||||
}
|
||||
|
||||
return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri;
|
||||
}
|
||||
|
||||
@@ -154,6 +227,7 @@ class Client implements ClientInterface
|
||||
* Configures the default options for a client.
|
||||
*
|
||||
* @param array $config
|
||||
* @return void
|
||||
*/
|
||||
private function configureDefaults(array $config)
|
||||
{
|
||||
@@ -165,12 +239,22 @@ class Client implements ClientInterface
|
||||
'cookies' => false
|
||||
];
|
||||
|
||||
// idn_to_ascii() is a part of ext-intl and might be not available
|
||||
$defaults['idn_conversion'] = function_exists('idn_to_ascii')
|
||||
// Old ICU versions don't have this constant, so we are basically stuck (see https://github.com/guzzle/guzzle/pull/2424
|
||||
// and https://github.com/guzzle/guzzle/issues/2448 for details)
|
||||
&& (
|
||||
defined('INTL_IDNA_VARIANT_UTS46')
|
||||
||
|
||||
PHP_VERSION_ID < 70200
|
||||
);
|
||||
|
||||
// Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
|
||||
|
||||
// We can only trust the HTTP_PROXY environment variable in a CLI
|
||||
// process due to the fact that PHP has no reliable mechanism to
|
||||
// get environment variables that start with "HTTP_".
|
||||
if (php_sapi_name() == 'cli' && getenv('HTTP_PROXY')) {
|
||||
if (php_sapi_name() === 'cli' && getenv('HTTP_PROXY')) {
|
||||
$defaults['proxy']['http'] = getenv('HTTP_PROXY');
|
||||
}
|
||||
|
||||
@@ -210,7 +294,7 @@ class Client implements ClientInterface
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function prepareDefaults($options)
|
||||
private function prepareDefaults(array $options)
|
||||
{
|
||||
$defaults = $this->config;
|
||||
|
||||
@@ -225,7 +309,7 @@ class Client implements ClientInterface
|
||||
if (array_key_exists('headers', $options)) {
|
||||
// Allows default headers to be unset.
|
||||
if ($options['headers'] === null) {
|
||||
$defaults['_conditional'] = null;
|
||||
$defaults['_conditional'] = [];
|
||||
unset($options['headers']);
|
||||
} elseif (!is_array($options['headers'])) {
|
||||
throw new \InvalidArgumentException('headers must be an array');
|
||||
@@ -251,8 +335,7 @@ class Client implements ClientInterface
|
||||
* The URI of the request is not modified and the request options are used
|
||||
* as-is without merging in default options.
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @param array $options
|
||||
* @param array $options See \GuzzleHttp\RequestOptions.
|
||||
*
|
||||
* @return Promise\PromiseInterface
|
||||
*/
|
||||
@@ -271,6 +354,7 @@ class Client implements ClientInterface
|
||||
}
|
||||
|
||||
$request = $this->applyOptions($request, $options);
|
||||
/** @var HandlerStack $handler */
|
||||
$handler = $options['handler'];
|
||||
|
||||
try {
|
||||
@@ -411,6 +495,11 @@ class Client implements ClientInterface
|
||||
return $request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throw Exception with pre-set message.
|
||||
* @return void
|
||||
* @throws InvalidArgumentException Invalid body.
|
||||
*/
|
||||
private function invalidBody()
|
||||
{
|
||||
throw new \InvalidArgumentException('Passing in the "body" request '
|
||||
|
||||
+5
-2
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
@@ -12,7 +12,10 @@ use Psr\Http\Message\UriInterface;
|
||||
*/
|
||||
interface ClientInterface
|
||||
{
|
||||
const VERSION = '6.3.3';
|
||||
/**
|
||||
* @deprecated Will be removed in Guzzle 7.0.0
|
||||
*/
|
||||
const VERSION = '6.5.1';
|
||||
|
||||
/**
|
||||
* Send an HTTP request.
|
||||
|
||||
+5
-3
@@ -94,8 +94,8 @@ class CookieJar implements CookieJarInterface
|
||||
*/
|
||||
public function getCookieByName($name)
|
||||
{
|
||||
// don't allow a null name
|
||||
if ($name === null) {
|
||||
// don't allow a non string name
|
||||
if ($name === null || !is_scalar($name)) {
|
||||
return null;
|
||||
}
|
||||
foreach ($this->cookies as $cookie) {
|
||||
@@ -103,6 +103,8 @@ class CookieJar implements CookieJarInterface
|
||||
return $cookie;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function toArray()
|
||||
@@ -120,7 +122,7 @@ class CookieJar implements CookieJarInterface
|
||||
} elseif (!$path) {
|
||||
$this->cookies = array_filter(
|
||||
$this->cookies,
|
||||
function (SetCookie $cookie) use ($path, $domain) {
|
||||
function (SetCookie $cookie) use ($domain) {
|
||||
return !$cookie->matchesDomain($domain);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -58,9 +58,9 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
|
||||
* arguments, then the cookie with the specified name, path and domain is
|
||||
* removed.
|
||||
*
|
||||
* @param string $domain Clears cookies matching a domain
|
||||
* @param string $path Clears cookies matching a domain and path
|
||||
* @param string $name Clears cookies matching a domain, path, and name
|
||||
* @param string|null $domain Clears cookies matching a domain
|
||||
* @param string|null $path Clears cookies matching a domain and path
|
||||
* @param string|null $name Clears cookies matching a domain, path, and name
|
||||
*
|
||||
* @return CookieJarInterface
|
||||
*/
|
||||
|
||||
+2
-1
@@ -23,6 +23,7 @@ class FileCookieJar extends CookieJar
|
||||
*/
|
||||
public function __construct($cookieFile, $storeSessionCookies = false)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->filename = $cookieFile;
|
||||
$this->storeSessionCookies = $storeSessionCookies;
|
||||
|
||||
@@ -56,7 +57,7 @@ class FileCookieJar extends CookieJar
|
||||
}
|
||||
|
||||
$jsonStr = \GuzzleHttp\json_encode($json);
|
||||
if (false === file_put_contents($filename, $jsonStr)) {
|
||||
if (false === file_put_contents($filename, $jsonStr, LOCK_EX)) {
|
||||
throw new \RuntimeException("Unable to save file {$filename}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ class SessionCookieJar extends CookieJar
|
||||
*/
|
||||
public function __construct($sessionKey, $storeSessionCookies = false)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->sessionKey = $sessionKey;
|
||||
$this->storeSessionCookies = $storeSessionCookies;
|
||||
$this->load();
|
||||
|
||||
+2
-2
@@ -227,7 +227,7 @@ class SetCookie
|
||||
/**
|
||||
* Get whether or not this is a secure cookie
|
||||
*
|
||||
* @return null|bool
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getSecure()
|
||||
{
|
||||
@@ -247,7 +247,7 @@ class SetCookie
|
||||
/**
|
||||
* Get whether or not this is a session cookie
|
||||
*
|
||||
* @return null|bool
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getDiscard()
|
||||
{
|
||||
|
||||
@@ -4,4 +4,6 @@ namespace GuzzleHttp\Exception;
|
||||
/**
|
||||
* Exception when a client error is encountered (4xx codes)
|
||||
*/
|
||||
class ClientException extends BadResponseException {}
|
||||
class ClientException extends BadResponseException
|
||||
{
|
||||
}
|
||||
|
||||
+20
-10
@@ -1,13 +1,23 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
/**
|
||||
* @method string getMessage()
|
||||
* @method \Throwable|null getPrevious()
|
||||
* @method mixed getCode()
|
||||
* @method string getFile()
|
||||
* @method int getLine()
|
||||
* @method array getTrace()
|
||||
* @method string getTraceAsString()
|
||||
*/
|
||||
interface GuzzleException {}
|
||||
use Throwable;
|
||||
|
||||
if (interface_exists(Throwable::class)) {
|
||||
interface GuzzleException extends Throwable
|
||||
{
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* @method string getMessage()
|
||||
* @method \Throwable|null getPrevious()
|
||||
* @method mixed getCode()
|
||||
* @method string getFile()
|
||||
* @method int getLine()
|
||||
* @method array getTrace()
|
||||
* @method string getTraceAsString()
|
||||
*/
|
||||
interface GuzzleException
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
final class InvalidArgumentException extends \InvalidArgumentException implements GuzzleException
|
||||
{
|
||||
}
|
||||
+5
-30
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
|
||||
/**
|
||||
@@ -14,7 +14,7 @@ class RequestException extends TransferException
|
||||
/** @var RequestInterface */
|
||||
private $request;
|
||||
|
||||
/** @var ResponseInterface */
|
||||
/** @var ResponseInterface|null */
|
||||
private $response;
|
||||
|
||||
/** @var array */
|
||||
@@ -124,42 +124,17 @@ class RequestException extends TransferException
|
||||
*/
|
||||
public static function getResponseBodySummary(ResponseInterface $response)
|
||||
{
|
||||
$body = $response->getBody();
|
||||
|
||||
if (!$body->isSeekable()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$size = $body->getSize();
|
||||
|
||||
if ($size === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$summary = $body->read(120);
|
||||
$body->rewind();
|
||||
|
||||
if ($size > 120) {
|
||||
$summary .= ' (truncated...)';
|
||||
}
|
||||
|
||||
// Matches any printable character, including unicode characters:
|
||||
// letters, marks, numbers, punctuation, spacing, and separators.
|
||||
if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $summary;
|
||||
return \GuzzleHttp\Psr7\get_message_body_summary($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Obfuscates URI if there is an username and a password present
|
||||
* Obfuscates URI if there is a username and a password present
|
||||
*
|
||||
* @param UriInterface $uri
|
||||
*
|
||||
* @return UriInterface
|
||||
*/
|
||||
private static function obfuscateUri($uri)
|
||||
private static function obfuscateUri(UriInterface $uri)
|
||||
{
|
||||
$userInfo = $uri->getUserInfo();
|
||||
|
||||
|
||||
@@ -4,4 +4,6 @@ namespace GuzzleHttp\Exception;
|
||||
/**
|
||||
* Exception when a server error is encountered (5xx codes)
|
||||
*/
|
||||
class ServerException extends BadResponseException {}
|
||||
class ServerException extends BadResponseException
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
class TooManyRedirectsException extends RequestException {}
|
||||
class TooManyRedirectsException extends RequestException
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
class TransferException extends \RuntimeException implements GuzzleException {}
|
||||
class TransferException extends \RuntimeException implements GuzzleException
|
||||
{
|
||||
}
|
||||
|
||||
+32
-12
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Handler;
|
||||
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Exception\ConnectException;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Promise\FulfilledPromise;
|
||||
use GuzzleHttp\Psr7;
|
||||
use GuzzleHttp\Psr7\LazyOpenStream;
|
||||
@@ -14,6 +14,9 @@ use Psr\Http\Message\RequestInterface;
|
||||
*/
|
||||
class CurlFactory implements CurlFactoryInterface
|
||||
{
|
||||
const CURL_VERSION_STR = 'curl_version';
|
||||
const LOW_CURL_VERSION_NUMBER = '7.21.2';
|
||||
|
||||
/** @var array */
|
||||
private $handles = [];
|
||||
|
||||
@@ -117,6 +120,7 @@ class CurlFactory implements CurlFactoryInterface
|
||||
private static function invokeStats(EasyHandle $easy)
|
||||
{
|
||||
$curlStats = curl_getinfo($easy->handle);
|
||||
$curlStats['appconnect_time'] = curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME);
|
||||
$stats = new TransferStats(
|
||||
$easy->request,
|
||||
$easy->response,
|
||||
@@ -136,7 +140,9 @@ class CurlFactory implements CurlFactoryInterface
|
||||
$ctx = [
|
||||
'errno' => $easy->errno,
|
||||
'error' => curl_error($easy->handle),
|
||||
'appconnect_time' => curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME),
|
||||
] + curl_getinfo($easy->handle);
|
||||
$ctx[self::CURL_VERSION_STR] = curl_version()['version'];
|
||||
$factory->release($easy);
|
||||
|
||||
// Retry when nothing is present or when curl failed to rewind.
|
||||
@@ -172,13 +178,22 @@ class CurlFactory implements CurlFactoryInterface
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$message = sprintf(
|
||||
'cURL error %s: %s (%s)',
|
||||
$ctx['errno'],
|
||||
$ctx['error'],
|
||||
'see http://curl.haxx.se/libcurl/c/libcurl-errors.html'
|
||||
);
|
||||
if (version_compare($ctx[self::CURL_VERSION_STR], self::LOW_CURL_VERSION_NUMBER)) {
|
||||
$message = sprintf(
|
||||
'cURL error %s: %s (%s)',
|
||||
$ctx['errno'],
|
||||
$ctx['error'],
|
||||
'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'
|
||||
);
|
||||
} else {
|
||||
$message = sprintf(
|
||||
'cURL error %s: %s (%s) for %s',
|
||||
$ctx['errno'],
|
||||
$ctx['error'],
|
||||
'see https://curl.haxx.se/libcurl/c/libcurl-errors.html',
|
||||
$easy->request->getUri()
|
||||
);
|
||||
}
|
||||
|
||||
// Create a connection exception if it was a specific error code.
|
||||
$error = isset($connectionErrors[$easy->errno])
|
||||
@@ -439,11 +454,16 @@ class CurlFactory implements CurlFactoryInterface
|
||||
}
|
||||
|
||||
if (isset($options['ssl_key'])) {
|
||||
$sslKey = $options['ssl_key'];
|
||||
if (is_array($sslKey)) {
|
||||
$conf[CURLOPT_SSLKEYPASSWD] = $sslKey[1];
|
||||
$sslKey = $sslKey[0];
|
||||
if (is_array($options['ssl_key'])) {
|
||||
if (count($options['ssl_key']) === 2) {
|
||||
list($sslKey, $conf[CURLOPT_SSLKEYPASSWD]) = $options['ssl_key'];
|
||||
} else {
|
||||
list($sslKey) = $options['ssl_key'];
|
||||
}
|
||||
}
|
||||
|
||||
$sslKey = isset($sslKey) ? $sslKey: $options['ssl_key'];
|
||||
|
||||
if (!file_exists($sslKey)) {
|
||||
throw new \InvalidArgumentException(
|
||||
"SSL private key not found: {$sslKey}"
|
||||
|
||||
+27
-7
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Handler;
|
||||
|
||||
use GuzzleHttp\Exception\InvalidArgumentException;
|
||||
use GuzzleHttp\Promise as P;
|
||||
use GuzzleHttp\Promise\Promise;
|
||||
use GuzzleHttp\Psr7;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
|
||||
/**
|
||||
@@ -23,6 +23,7 @@ class CurlMultiHandler
|
||||
private $active;
|
||||
private $handles = [];
|
||||
private $delays = [];
|
||||
private $options = [];
|
||||
|
||||
/**
|
||||
* This handler accepts the following options:
|
||||
@@ -30,6 +31,8 @@ class CurlMultiHandler
|
||||
* - handle_factory: An optional factory used to create curl handles
|
||||
* - select_timeout: Optional timeout (in seconds) to block before timing
|
||||
* out while selecting curl handles. Defaults to 1 second.
|
||||
* - options: An associative array of CURLMOPT_* options and
|
||||
* corresponding values for curl_multi_setopt()
|
||||
*
|
||||
* @param array $options
|
||||
*/
|
||||
@@ -37,14 +40,31 @@ class CurlMultiHandler
|
||||
{
|
||||
$this->factory = isset($options['handle_factory'])
|
||||
? $options['handle_factory'] : new CurlFactory(50);
|
||||
$this->selectTimeout = isset($options['select_timeout'])
|
||||
? $options['select_timeout'] : 1;
|
||||
|
||||
if (isset($options['select_timeout'])) {
|
||||
$this->selectTimeout = $options['select_timeout'];
|
||||
} elseif ($selectTimeout = getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
|
||||
$this->selectTimeout = $selectTimeout;
|
||||
} else {
|
||||
$this->selectTimeout = 1;
|
||||
}
|
||||
|
||||
$this->options = isset($options['options']) ? $options['options'] : [];
|
||||
}
|
||||
|
||||
public function __get($name)
|
||||
{
|
||||
if ($name === '_mh') {
|
||||
return $this->_mh = curl_multi_init();
|
||||
$this->_mh = curl_multi_init();
|
||||
|
||||
foreach ($this->options as $option => $value) {
|
||||
// A warning is raised in case of a wrong option.
|
||||
curl_multi_setopt($this->_mh, $option, $value);
|
||||
}
|
||||
|
||||
// Further calls to _mh will return the value directly, without entering the
|
||||
// __get() method at all.
|
||||
return $this->_mh;
|
||||
}
|
||||
|
||||
throw new \BadMethodCallException();
|
||||
@@ -82,7 +102,7 @@ class CurlMultiHandler
|
||||
{
|
||||
// Add any delayed handles if needed.
|
||||
if ($this->delays) {
|
||||
$currentTime = microtime(true);
|
||||
$currentTime = \GuzzleHttp\_current_time();
|
||||
foreach ($this->delays as $id => $delay) {
|
||||
if ($currentTime >= $delay) {
|
||||
unset($this->delays[$id]);
|
||||
@@ -134,7 +154,7 @@ class CurlMultiHandler
|
||||
if (empty($easy->options['delay'])) {
|
||||
curl_multi_add_handle($this->_mh, $easy->handle);
|
||||
} else {
|
||||
$this->delays[$id] = microtime(true) + ($easy->options['delay'] / 1000);
|
||||
$this->delays[$id] = \GuzzleHttp\_current_time() + ($easy->options['delay'] / 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +206,7 @@ class CurlMultiHandler
|
||||
|
||||
private function timeToNext()
|
||||
{
|
||||
$currentTime = microtime(true);
|
||||
$currentTime = \GuzzleHttp\_current_time();
|
||||
$nextTime = PHP_INT_MAX;
|
||||
foreach ($this->delays as $time) {
|
||||
if ($time < $nextTime) {
|
||||
|
||||
+8
-2
@@ -66,7 +66,7 @@ class MockHandler implements \Countable
|
||||
throw new \OutOfBoundsException('Mock queue is empty');
|
||||
}
|
||||
|
||||
if (isset($options['delay'])) {
|
||||
if (isset($options['delay']) && is_numeric($options['delay'])) {
|
||||
usleep($options['delay'] * 1000);
|
||||
}
|
||||
|
||||
@@ -175,6 +175,11 @@ class MockHandler implements \Countable
|
||||
return count($this->queue);
|
||||
}
|
||||
|
||||
public function reset()
|
||||
{
|
||||
$this->queue = [];
|
||||
}
|
||||
|
||||
private function invokeStats(
|
||||
RequestInterface $request,
|
||||
array $options,
|
||||
@@ -182,7 +187,8 @@ class MockHandler implements \Countable
|
||||
$reason = null
|
||||
) {
|
||||
if (isset($options['on_stats'])) {
|
||||
$stats = new TransferStats($request, $response, 0, $reason);
|
||||
$transferTime = isset($options['transfer_time']) ? $options['transfer_time'] : 0;
|
||||
$stats = new TransferStats($request, $response, $transferTime, $reason);
|
||||
call_user_func($options['on_stats'], $stats);
|
||||
}
|
||||
}
|
||||
|
||||
+18
-6
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Handler;
|
||||
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Exception\ConnectException;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Promise\FulfilledPromise;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use GuzzleHttp\Psr7;
|
||||
@@ -33,7 +33,7 @@ class StreamHandler
|
||||
usleep($options['delay'] * 1000);
|
||||
}
|
||||
|
||||
$startTime = isset($options['on_stats']) ? microtime(true) : null;
|
||||
$startTime = isset($options['on_stats']) ? \GuzzleHttp\_current_time() : null;
|
||||
|
||||
try {
|
||||
// Does not support the expect header.
|
||||
@@ -42,7 +42,7 @@ class StreamHandler
|
||||
// Append a content-length header if body size is zero to match
|
||||
// cURL's behavior.
|
||||
if (0 === $request->getBody()->getSize()) {
|
||||
$request = $request->withHeader('Content-Length', 0);
|
||||
$request = $request->withHeader('Content-Length', '0');
|
||||
}
|
||||
|
||||
return $this->createResponse(
|
||||
@@ -82,7 +82,7 @@ class StreamHandler
|
||||
$stats = new TransferStats(
|
||||
$request,
|
||||
$response,
|
||||
microtime(true) - $startTime,
|
||||
\GuzzleHttp\_current_time() - $startTime,
|
||||
$error,
|
||||
[]
|
||||
);
|
||||
@@ -343,13 +343,25 @@ class StreamHandler
|
||||
if ('v4' === $options['force_ip_resolve']) {
|
||||
$records = dns_get_record($uri->getHost(), DNS_A);
|
||||
if (!isset($records[0]['ip'])) {
|
||||
throw new ConnectException(sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request);
|
||||
throw new ConnectException(
|
||||
sprintf(
|
||||
"Could not resolve IPv4 address for host '%s'",
|
||||
$uri->getHost()
|
||||
),
|
||||
$request
|
||||
);
|
||||
}
|
||||
$uri = $uri->withHost($records[0]['ip']);
|
||||
} elseif ('v6' === $options['force_ip_resolve']) {
|
||||
$records = dns_get_record($uri->getHost(), DNS_AAAA);
|
||||
if (!isset($records[0]['ipv6'])) {
|
||||
throw new ConnectException(sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request);
|
||||
throw new ConnectException(
|
||||
sprintf(
|
||||
"Could not resolve IPv6 address for host '%s'",
|
||||
$uri->getHost()
|
||||
),
|
||||
$request
|
||||
);
|
||||
}
|
||||
$uri = $uri->withHost('[' . $records[0]['ipv6'] . ']');
|
||||
}
|
||||
|
||||
+9
-5
@@ -1,7 +1,9 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Creates a composed Guzzle handler function by stacking middlewares on top of
|
||||
@@ -9,7 +11,7 @@ use Psr\Http\Message\RequestInterface;
|
||||
*/
|
||||
class HandlerStack
|
||||
{
|
||||
/** @var callable */
|
||||
/** @var callable|null */
|
||||
private $handler;
|
||||
|
||||
/** @var array */
|
||||
@@ -59,6 +61,8 @@ class HandlerStack
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @param array $options
|
||||
*
|
||||
* @return ResponseInterface|PromiseInterface
|
||||
*/
|
||||
public function __invoke(RequestInterface $request, array $options)
|
||||
{
|
||||
@@ -206,7 +210,7 @@ class HandlerStack
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param string $name
|
||||
* @return int
|
||||
*/
|
||||
private function findByName($name)
|
||||
@@ -223,10 +227,10 @@ class HandlerStack
|
||||
/**
|
||||
* Splices a function into the middleware list at a specific position.
|
||||
*
|
||||
* @param $findName
|
||||
* @param $withName
|
||||
* @param string $findName
|
||||
* @param string $withName
|
||||
* @param callable $middleware
|
||||
* @param $before
|
||||
* @param bool $before
|
||||
*/
|
||||
private function splice($findName, $withName, callable $middleware, $before)
|
||||
{
|
||||
|
||||
@@ -168,6 +168,11 @@ class MessageFormatter
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get headers from message as string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function headers(MessageInterface $message)
|
||||
{
|
||||
$result = '';
|
||||
|
||||
+3
-4
@@ -7,7 +7,6 @@ use GuzzleHttp\Promise\RejectedPromise;
|
||||
use GuzzleHttp\Psr7;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\LogLevel;
|
||||
|
||||
/**
|
||||
* Functions used to create and wrap handlers with handler middleware.
|
||||
@@ -39,7 +38,7 @@ final class Middleware
|
||||
$cookieJar->extractCookies($request, $response);
|
||||
return $response;
|
||||
}
|
||||
);
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -58,7 +57,7 @@ final class Middleware
|
||||
return $handler($request, $options);
|
||||
}
|
||||
return $handler($request, $options)->then(
|
||||
function (ResponseInterface $response) use ($request, $handler) {
|
||||
function (ResponseInterface $response) use ($request) {
|
||||
$code = $response->getStatusCode();
|
||||
if ($code < 400) {
|
||||
return $response;
|
||||
@@ -183,7 +182,7 @@ final class Middleware
|
||||
*
|
||||
* @return callable Returns a function that accepts the next handler.
|
||||
*/
|
||||
public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = LogLevel::INFO)
|
||||
public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = 'info' /* \Psr\Log\LogLevel::INFO */)
|
||||
{
|
||||
return function (callable $handler) use ($logger, $formatter, $logLevel) {
|
||||
return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) {
|
||||
|
||||
+13
-2
@@ -1,12 +1,13 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Promise\EachPromise;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use GuzzleHttp\Promise\PromisorInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use GuzzleHttp\Promise\EachPromise;
|
||||
|
||||
/**
|
||||
* Sends and iterator of requests concurrently using a capped pool size.
|
||||
* Sends an iterator of requests concurrently using a capped pool size.
|
||||
*
|
||||
* The pool will read from an iterator until it is cancelled or until the
|
||||
* iterator is consumed. When a request is yielded, the request is sent after
|
||||
@@ -69,6 +70,11 @@ class Pool implements PromisorInterface
|
||||
$this->each = new EachPromise($requests(), $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get promise
|
||||
*
|
||||
* @return PromiseInterface
|
||||
*/
|
||||
public function promise()
|
||||
{
|
||||
return $this->each->promise();
|
||||
@@ -106,6 +112,11 @@ class Pool implements PromisorInterface
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute callback(s)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private static function cmpCallback(array &$options, $name, array &$results)
|
||||
{
|
||||
if (!isset($options[$name])) {
|
||||
|
||||
@@ -66,6 +66,11 @@ class PrepareBodyMiddleware
|
||||
return $fn(Psr7\modify_request($request, $modify), $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add expect header
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addExpectHeader(
|
||||
RequestInterface $request,
|
||||
array $options,
|
||||
|
||||
+23
-5
@@ -13,7 +13,7 @@ use Psr\Http\Message\UriInterface;
|
||||
* Request redirect middleware.
|
||||
*
|
||||
* Apply this middleware like other middleware using
|
||||
* {@see GuzzleHttp\Middleware::redirect()}.
|
||||
* {@see \GuzzleHttp\Middleware::redirect()}.
|
||||
*/
|
||||
class RedirectMiddleware
|
||||
{
|
||||
@@ -76,7 +76,7 @@ class RedirectMiddleware
|
||||
/**
|
||||
* @param RequestInterface $request
|
||||
* @param array $options
|
||||
* @param ResponseInterface|PromiseInterface $response
|
||||
* @param ResponseInterface $response
|
||||
*
|
||||
* @return ResponseInterface|PromiseInterface
|
||||
*/
|
||||
@@ -118,6 +118,11 @@ class RedirectMiddleware
|
||||
return $promise;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable tracking on promise.
|
||||
*
|
||||
* @return PromiseInterface
|
||||
*/
|
||||
private function withTracking(PromiseInterface $promise, $uri, $statusCode)
|
||||
{
|
||||
return $promise->then(
|
||||
@@ -135,6 +140,13 @@ class RedirectMiddleware
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for too many redirects
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws TooManyRedirectsException Too many redirects.
|
||||
*/
|
||||
private function guardMax(RequestInterface $request, array &$options)
|
||||
{
|
||||
$current = isset($options['__redirect_count'])
|
||||
@@ -172,13 +184,19 @@ class RedirectMiddleware
|
||||
// would do.
|
||||
$statusCode = $response->getStatusCode();
|
||||
if ($statusCode == 303 ||
|
||||
($statusCode <= 302 && $request->getBody() && !$options['allow_redirects']['strict'])
|
||||
($statusCode <= 302 && !$options['allow_redirects']['strict'])
|
||||
) {
|
||||
$modify['method'] = 'GET';
|
||||
$modify['body'] = '';
|
||||
}
|
||||
|
||||
$modify['uri'] = $this->redirectUri($request, $response, $protocols);
|
||||
$uri = $this->redirectUri($request, $response, $protocols);
|
||||
if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) {
|
||||
$idnOptions = ($options['idn_conversion'] === true) ? IDNA_DEFAULT : $options['idn_conversion'];
|
||||
$uri = _idn_uri_convert($uri, $idnOptions);
|
||||
}
|
||||
|
||||
$modify['uri'] = $uri;
|
||||
Psr7\rewind_body($request);
|
||||
|
||||
// Add the Referer header if it is told to do so and only
|
||||
@@ -186,7 +204,7 @@ class RedirectMiddleware
|
||||
if ($options['allow_redirects']['referer']
|
||||
&& $modify['uri']->getScheme() === $request->getUri()->getScheme()
|
||||
) {
|
||||
$uri = $request->getUri()->withUserInfo('', '');
|
||||
$uri = $request->getUri()->withUserInfo('');
|
||||
$modify['set_headers']['Referer'] = (string) $uri;
|
||||
} else {
|
||||
$modify['remove_headers'][] = 'Referer';
|
||||
|
||||
+9
-1
@@ -22,7 +22,7 @@ final class RequestOptions
|
||||
* - strict: (bool, default=false) Set to true to use strict redirects
|
||||
* meaning redirect POST requests with POST requests vs. doing what most
|
||||
* browsers do which is redirect POST requests with GET requests
|
||||
* - referer: (bool, default=true) Set to false to disable the Referer
|
||||
* - referer: (bool, default=false) Set to true to enable the Referer
|
||||
* header.
|
||||
* - protocols: (array, default=['http', 'https']) Allowed redirect
|
||||
* protocols.
|
||||
@@ -132,6 +132,14 @@ final class RequestOptions
|
||||
*/
|
||||
const HTTP_ERRORS = 'http_errors';
|
||||
|
||||
/**
|
||||
* idn: (bool|int, default=true) A combination of IDNA_* constants for
|
||||
* idn_to_ascii() PHP's function (see "options" parameter). Set to false to
|
||||
* disable IDN support completely, or to true to use the default
|
||||
* configuration (IDNA_DEFAULT constant).
|
||||
*/
|
||||
const IDN_CONVERSION = 'idn_conversion';
|
||||
|
||||
/**
|
||||
* json: (mixed) Adds JSON data to a request. The provided value is JSON
|
||||
* encoded and a Content-Type header of application/json will be added to
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user