20201112
This commit is contained in:
3
vendor/PHPExcel/PHPExcel/Shared/OLE.php
vendored
3
vendor/PHPExcel/PHPExcel/Shared/OLE.php
vendored
@@ -285,7 +285,8 @@ class PHPExcel_Shared_OLE
|
|||||||
$pps = new PHPExcel_Shared_OLE_PPS_File($name);
|
$pps = new PHPExcel_Shared_OLE_PPS_File($name);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
continue;
|
break;
|
||||||
|
// continue;
|
||||||
}
|
}
|
||||||
fseek($fh, 1, SEEK_CUR);
|
fseek($fh, 1, SEEK_CUR);
|
||||||
$pps->Type = $type;
|
$pps->Type = $type;
|
||||||
|
|||||||
59
vendor/composer/InstalledVersions.php
vendored
59
vendor/composer/InstalledVersions.php
vendored
@@ -14,33 +14,51 @@ class InstalledVersions
|
|||||||
private static $installed = array (
|
private static $installed = array (
|
||||||
'root' =>
|
'root' =>
|
||||||
array (
|
array (
|
||||||
'pretty_version' => '1.0.0+no-version-set',
|
'pretty_version' => 'dev-master',
|
||||||
'version' => '1.0.0.0',
|
'version' => 'dev-master',
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => NULL,
|
'reference' => 'c80c9f8da7e4389667bd87ee94956885c5b6dbbb',
|
||||||
'name' => 'topthink/think',
|
'name' => 'topthink/think',
|
||||||
),
|
),
|
||||||
'versions' =>
|
'versions' =>
|
||||||
array (
|
array (
|
||||||
'phpmailer/phpmailer' =>
|
'lampol/phpmail' =>
|
||||||
array (
|
array (
|
||||||
'pretty_version' => 'v6.1.8',
|
'pretty_version' => '1.0',
|
||||||
'version' => '6.1.8.0',
|
'version' => '1.0.0.0',
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => '917ab212fa00dc6eacbb26e8bc387ebe40993bc1',
|
'reference' => '2aa6a69636702548bf684071ffbc8d1cafb85bbc',
|
||||||
|
),
|
||||||
|
'phpmailer/phpmailer' =>
|
||||||
|
array (
|
||||||
|
'pretty_version' => 'v6.5.1',
|
||||||
|
'version' => '6.5.1.0',
|
||||||
|
'aliases' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'reference' => 'dd803df5ad7492e1b40637f7ebd258fee5ca7355',
|
||||||
|
),
|
||||||
|
'phpoffice/phpexcel' =>
|
||||||
|
array (
|
||||||
|
'pretty_version' => '1.8.2',
|
||||||
|
'version' => '1.8.2.0',
|
||||||
|
'aliases' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'reference' => '1441011fb7ecdd8cc689878f54f8b58a6805f870',
|
||||||
),
|
),
|
||||||
'tecnickcom/tcpdf' =>
|
'tecnickcom/tcpdf' =>
|
||||||
array (
|
array (
|
||||||
'pretty_version' => '6.3.5',
|
'pretty_version' => '6.4.2',
|
||||||
'version' => '6.3.5.0',
|
'version' => '6.4.2.0',
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => '19a535eaa7fb1c1cac499109deeb1a7a201b4549',
|
'reference' => '172540dcbfdf8dc983bc2fe78feff48ff7ec1c76',
|
||||||
),
|
),
|
||||||
'topthink/framework' =>
|
'topthink/framework' =>
|
||||||
array (
|
array (
|
||||||
@@ -53,12 +71,12 @@ private static $installed = array (
|
|||||||
),
|
),
|
||||||
'topthink/think' =>
|
'topthink/think' =>
|
||||||
array (
|
array (
|
||||||
'pretty_version' => '1.0.0+no-version-set',
|
'pretty_version' => 'dev-master',
|
||||||
'version' => '1.0.0.0',
|
'version' => 'dev-master',
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => NULL,
|
'reference' => 'c80c9f8da7e4389667bd87ee94956885c5b6dbbb',
|
||||||
),
|
),
|
||||||
'topthink/think-captcha' =>
|
'topthink/think-captcha' =>
|
||||||
array (
|
array (
|
||||||
@@ -80,12 +98,21 @@ private static $installed = array (
|
|||||||
),
|
),
|
||||||
'topthink/think-installer' =>
|
'topthink/think-installer' =>
|
||||||
array (
|
array (
|
||||||
'pretty_version' => 'v1.0.13',
|
'pretty_version' => 'v1.0.14',
|
||||||
'version' => '1.0.13.0',
|
'version' => '1.0.14.0',
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => '532dc02efb3d8332b36fd8f63fc4f56aeb1987e7',
|
'reference' => 'eae1740ac264a55c06134b6685dfb9f837d004d1',
|
||||||
|
),
|
||||||
|
'topthink/think-queue' =>
|
||||||
|
array (
|
||||||
|
'pretty_version' => 'v1.1.4',
|
||||||
|
'version' => '1.1.4.0',
|
||||||
|
'aliases' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'reference' => 'ad709611d516e13d6760234bc98e91faa901cae8',
|
||||||
),
|
),
|
||||||
'weiwei/api-doc' =>
|
'weiwei/api-doc' =>
|
||||||
array (
|
array (
|
||||||
|
|||||||
1
vendor/composer/autoload_files.php
vendored
1
vendor/composer/autoload_files.php
vendored
@@ -8,5 +8,6 @@ $baseDir = dirname($vendorDir);
|
|||||||
return array(
|
return array(
|
||||||
'9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php',
|
'9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php',
|
||||||
'1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
|
'1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
|
||||||
|
'cc56288302d9df745d97c934d6a6e5f0' => $vendorDir . '/topthink/think-queue/src/common.php',
|
||||||
'644e9cafc67b331e17cc7661548f33d0' => $vendorDir . '/weiwei/api-doc/src/helper.php',
|
'644e9cafc67b331e17cc7661548f33d0' => $vendorDir . '/weiwei/api-doc/src/helper.php',
|
||||||
);
|
);
|
||||||
|
|||||||
1
vendor/composer/autoload_namespaces.php
vendored
1
vendor/composer/autoload_namespaces.php
vendored
@@ -6,4 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
|
|||||||
$baseDir = dirname($vendorDir);
|
$baseDir = dirname($vendorDir);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
'PHPExcel' => array($vendorDir . '/phpoffice/phpexcel/Classes'),
|
||||||
);
|
);
|
||||||
|
|||||||
3
vendor/composer/autoload_psr4.php
vendored
3
vendor/composer/autoload_psr4.php
vendored
@@ -9,7 +9,8 @@ return array(
|
|||||||
'think\\helper\\' => array($vendorDir . '/topthink/think-helper/src'),
|
'think\\helper\\' => array($vendorDir . '/topthink/think-helper/src'),
|
||||||
'think\\composer\\' => array($vendorDir . '/topthink/think-installer/src'),
|
'think\\composer\\' => array($vendorDir . '/topthink/think-installer/src'),
|
||||||
'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'),
|
'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'),
|
||||||
'think\\' => array($baseDir . '/thinkphp/library/think'),
|
'think\\' => array($baseDir . '/thinkphp/library/think', $vendorDir . '/topthink/think-queue/src'),
|
||||||
|
'lampol\\' => array($vendorDir . '/lampol/phpmail/src'),
|
||||||
'app\\' => array($baseDir . '/application'),
|
'app\\' => array($baseDir . '/application'),
|
||||||
'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'),
|
'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'),
|
||||||
'Api\\Doc\\' => array($vendorDir . '/weiwei/api-doc/src'),
|
'Api\\Doc\\' => array($vendorDir . '/weiwei/api-doc/src'),
|
||||||
|
|||||||
21
vendor/composer/autoload_static.php
vendored
21
vendor/composer/autoload_static.php
vendored
@@ -9,6 +9,7 @@ class ComposerStaticInit2bc4f313dba415539e266f7ac2c87dcd
|
|||||||
public static $files = array (
|
public static $files = array (
|
||||||
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
|
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
|
||||||
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
|
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
|
||||||
|
'cc56288302d9df745d97c934d6a6e5f0' => __DIR__ . '/..' . '/topthink/think-queue/src/common.php',
|
||||||
'644e9cafc67b331e17cc7661548f33d0' => __DIR__ . '/..' . '/weiwei/api-doc/src/helper.php',
|
'644e9cafc67b331e17cc7661548f33d0' => __DIR__ . '/..' . '/weiwei/api-doc/src/helper.php',
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -20,6 +21,10 @@ class ComposerStaticInit2bc4f313dba415539e266f7ac2c87dcd
|
|||||||
'think\\captcha\\' => 14,
|
'think\\captcha\\' => 14,
|
||||||
'think\\' => 6,
|
'think\\' => 6,
|
||||||
),
|
),
|
||||||
|
'l' =>
|
||||||
|
array (
|
||||||
|
'lampol\\' => 7,
|
||||||
|
),
|
||||||
'a' =>
|
'a' =>
|
||||||
array (
|
array (
|
||||||
'app\\' => 4,
|
'app\\' => 4,
|
||||||
@@ -50,6 +55,11 @@ class ComposerStaticInit2bc4f313dba415539e266f7ac2c87dcd
|
|||||||
'think\\' =>
|
'think\\' =>
|
||||||
array (
|
array (
|
||||||
0 => __DIR__ . '/../..' . '/thinkphp/library/think',
|
0 => __DIR__ . '/../..' . '/thinkphp/library/think',
|
||||||
|
1 => __DIR__ . '/..' . '/topthink/think-queue/src',
|
||||||
|
),
|
||||||
|
'lampol\\' =>
|
||||||
|
array (
|
||||||
|
0 => __DIR__ . '/..' . '/lampol/phpmail/src',
|
||||||
),
|
),
|
||||||
'app\\' =>
|
'app\\' =>
|
||||||
array (
|
array (
|
||||||
@@ -65,6 +75,16 @@ class ComposerStaticInit2bc4f313dba415539e266f7ac2c87dcd
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public static $prefixesPsr0 = array (
|
||||||
|
'P' =>
|
||||||
|
array (
|
||||||
|
'PHPExcel' =>
|
||||||
|
array (
|
||||||
|
0 => __DIR__ . '/..' . '/phpoffice/phpexcel/Classes',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
public static $classMap = array (
|
public static $classMap = array (
|
||||||
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
||||||
'Datamatrix' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php',
|
'Datamatrix' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php',
|
||||||
@@ -88,6 +108,7 @@ class ComposerStaticInit2bc4f313dba415539e266f7ac2c87dcd
|
|||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInit2bc4f313dba415539e266f7ac2c87dcd::$prefixLengthsPsr4;
|
$loader->prefixLengthsPsr4 = ComposerStaticInit2bc4f313dba415539e266f7ac2c87dcd::$prefixLengthsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInit2bc4f313dba415539e266f7ac2c87dcd::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInit2bc4f313dba415539e266f7ac2c87dcd::$prefixDirsPsr4;
|
||||||
|
$loader->prefixesPsr0 = ComposerStaticInit2bc4f313dba415539e266f7ac2c87dcd::$prefixesPsr0;
|
||||||
$loader->classMap = ComposerStaticInit2bc4f313dba415539e266f7ac2c87dcd::$classMap;
|
$loader->classMap = ComposerStaticInit2bc4f313dba415539e266f7ac2c87dcd::$classMap;
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
}, null, ClassLoader::class);
|
||||||
|
|||||||
239
vendor/composer/installed.json
vendored
239
vendor/composer/installed.json
vendored
@@ -1,18 +1,58 @@
|
|||||||
{
|
{
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "phpmailer/phpmailer",
|
"name": "lampol/phpmail",
|
||||||
"version": "v6.1.8",
|
"version": "1.0",
|
||||||
"version_normalized": "6.1.8.0",
|
"version_normalized": "1.0.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
"url": "https://github.com/lampol/phpmail.git",
|
||||||
"reference": "917ab212fa00dc6eacbb26e8bc387ebe40993bc1"
|
"reference": "2aa6a69636702548bf684071ffbc8d1cafb85bbc"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/917ab212fa00dc6eacbb26e8bc387ebe40993bc1",
|
"url": "https://api.github.com/repos/lampol/phpmail/zipball/2aa6a69636702548bf684071ffbc8d1cafb85bbc",
|
||||||
"reference": "917ab212fa00dc6eacbb26e8bc387ebe40993bc1",
|
"reference": "2aa6a69636702548bf684071ffbc8d1cafb85bbc",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"time": "2017-10-31T15:29:14+00:00",
|
||||||
|
"type": "library",
|
||||||
|
"installation-source": "dist",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"lampol\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "lampol",
|
||||||
|
"email": "807968192@qq.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "this is send mail library",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/lampol/phpmail/issues",
|
||||||
|
"source": "https://github.com/lampol/phpmail/tree/master"
|
||||||
|
},
|
||||||
|
"install-path": "../lampol/phpmail"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "phpmailer/phpmailer",
|
||||||
|
"version": "v6.5.1",
|
||||||
|
"version_normalized": "6.5.1.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||||
|
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||||
|
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -22,19 +62,24 @@
|
|||||||
"php": ">=5.5.0"
|
"php": ">=5.5.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||||
"doctrine/annotations": "^1.2",
|
"doctrine/annotations": "^1.2",
|
||||||
"friendsofphp/php-cs-fixer": "^2.2",
|
"php-parallel-lint/php-console-highlighter": "^0.5.0",
|
||||||
"phpunit/phpunit": "^4.8 || ^5.7"
|
"php-parallel-lint/php-parallel-lint": "^1.3",
|
||||||
|
"phpcompatibility/php-compatibility": "^9.3.5",
|
||||||
|
"roave/security-advisories": "dev-latest",
|
||||||
|
"squizlabs/php_codesniffer": "^3.6.0",
|
||||||
|
"yoast/phpunit-polyfills": "^1.0.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-mbstring": "Needed to send email in multibyte encoding charset",
|
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
|
||||||
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
|
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
|
||||||
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
|
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
|
||||||
"psr/log": "For optional PSR-3 debug logging",
|
"psr/log": "For optional PSR-3 debug logging",
|
||||||
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
|
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
|
||||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
||||||
},
|
},
|
||||||
"time": "2020-10-09T14:55:58+00:00",
|
"time": "2021-08-18T09:14:16+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -66,41 +111,105 @@
|
|||||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.1.8"
|
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"url": "https://github.com/synchro",
|
"url": "https://github.com/Synchro",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"install-path": "../phpmailer/phpmailer"
|
"install-path": "../phpmailer/phpmailer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "tecnickcom/tcpdf",
|
"name": "phpoffice/phpexcel",
|
||||||
"version": "6.3.5",
|
"version": "1.8.2",
|
||||||
"version_normalized": "6.3.5.0",
|
"version_normalized": "1.8.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/tecnickcom/TCPDF.git",
|
"url": "https://github.com/PHPOffice/PHPExcel.git",
|
||||||
"reference": "19a535eaa7fb1c1cac499109deeb1a7a201b4549"
|
"reference": "1441011fb7ecdd8cc689878f54f8b58a6805f870"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/19a535eaa7fb1c1cac499109deeb1a7a201b4549",
|
"url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/1441011fb7ecdd8cc689878f54f8b58a6805f870",
|
||||||
"reference": "19a535eaa7fb1c1cac499109deeb1a7a201b4549",
|
"reference": "1441011fb7ecdd8cc689878f54f8b58a6805f870",
|
||||||
"shasum": "",
|
"shasum": ""
|
||||||
"mirrors": [
|
},
|
||||||
{
|
"require": {
|
||||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
"ext-mbstring": "*",
|
||||||
"preferred": true
|
"ext-xml": "*",
|
||||||
|
"ext-xmlwriter": "*",
|
||||||
|
"php": "^5.2|^7.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"squizlabs/php_codesniffer": "2.*"
|
||||||
|
},
|
||||||
|
"time": "2018-11-22T23:07:24+00:00",
|
||||||
|
"type": "library",
|
||||||
|
"installation-source": "dist",
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"PHPExcel": "Classes/"
|
||||||
}
|
}
|
||||||
]
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"LGPL-2.1"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Maarten Balliauw",
|
||||||
|
"homepage": "http://blog.maartenballiauw.be"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Erik Tilt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Franck Lefevre",
|
||||||
|
"homepage": "http://rootslabs.net"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Mark Baker",
|
||||||
|
"homepage": "http://markbakeruk.net"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
|
||||||
|
"homepage": "https://github.com/PHPOffice/PHPExcel",
|
||||||
|
"keywords": [
|
||||||
|
"OpenXML",
|
||||||
|
"excel",
|
||||||
|
"php",
|
||||||
|
"spreadsheet",
|
||||||
|
"xls",
|
||||||
|
"xlsx"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/PHPOffice/PHPExcel/issues",
|
||||||
|
"source": "https://github.com/PHPOffice/PHPExcel/tree/master"
|
||||||
|
},
|
||||||
|
"abandoned": "phpoffice/phpspreadsheet",
|
||||||
|
"install-path": "../phpoffice/phpexcel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tecnickcom/tcpdf",
|
||||||
|
"version": "6.4.2",
|
||||||
|
"version_normalized": "6.4.2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/tecnickcom/TCPDF.git",
|
||||||
|
"reference": "172540dcbfdf8dc983bc2fe78feff48ff7ec1c76"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/172540dcbfdf8dc983bc2fe78feff48ff7ec1c76",
|
||||||
|
"reference": "172540dcbfdf8dc983bc2fe78feff48ff7ec1c76",
|
||||||
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.0"
|
"php": ">=5.3.0"
|
||||||
},
|
},
|
||||||
"time": "2020-02-14T14:20:12+00:00",
|
"time": "2021-07-20T14:43:20+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -145,6 +254,16 @@
|
|||||||
"pdf417",
|
"pdf417",
|
||||||
"qrcode"
|
"qrcode"
|
||||||
],
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/tecnickcom/TCPDF/issues",
|
||||||
|
"source": "https://github.com/tecnickcom/TCPDF/tree/6.4.2"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project",
|
||||||
|
"type": "custom"
|
||||||
|
}
|
||||||
|
],
|
||||||
"install-path": "../tecnickcom/tcpdf"
|
"install-path": "../tecnickcom/tcpdf"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -299,17 +418,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-installer",
|
"name": "topthink/think-installer",
|
||||||
"version": "v1.0.13",
|
"version": "v1.0.14",
|
||||||
"version_normalized": "1.0.13.0",
|
"version_normalized": "1.0.14.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/think-installer.git",
|
"url": "https://github.com/top-think/think-installer.git",
|
||||||
"reference": "532dc02efb3d8332b36fd8f63fc4f56aeb1987e7"
|
"reference": "eae1740ac264a55c06134b6685dfb9f837d004d1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/think-installer/zipball/532dc02efb3d8332b36fd8f63fc4f56aeb1987e7",
|
"url": "https://api.github.com/repos/top-think/think-installer/zipball/eae1740ac264a55c06134b6685dfb9f837d004d1",
|
||||||
"reference": "532dc02efb3d8332b36fd8f63fc4f56aeb1987e7",
|
"reference": "eae1740ac264a55c06134b6685dfb9f837d004d1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -318,7 +437,7 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"composer/composer": "^1.0||^2.0"
|
"composer/composer": "^1.0||^2.0"
|
||||||
},
|
},
|
||||||
"time": "2020-10-27T05:39:37+00:00",
|
"time": "2021-03-25T08:34:02+00:00",
|
||||||
"type": "composer-plugin",
|
"type": "composer-plugin",
|
||||||
"extra": {
|
"extra": {
|
||||||
"class": "think\\composer\\Plugin"
|
"class": "think\\composer\\Plugin"
|
||||||
@@ -341,10 +460,62 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/top-think/think-installer/issues",
|
"issues": "https://github.com/top-think/think-installer/issues",
|
||||||
"source": "https://github.com/top-think/think-installer/tree/v1.0.13"
|
"source": "https://github.com/top-think/think-installer/tree/v1.0.14"
|
||||||
},
|
},
|
||||||
"install-path": "../topthink/think-installer"
|
"install-path": "../topthink/think-installer"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-queue",
|
||||||
|
"version": "v1.1.4",
|
||||||
|
"version_normalized": "1.1.4.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-queue.git",
|
||||||
|
"reference": "ad709611d516e13d6760234bc98e91faa901cae8"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-queue/zipball/ad709611d516e13d6760234bc98e91faa901cae8",
|
||||||
|
"reference": "ad709611d516e13d6760234bc98e91faa901cae8",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"topthink/think-helper": ">=1.0.4",
|
||||||
|
"topthink/think-installer": ">=1.0.10"
|
||||||
|
},
|
||||||
|
"time": "2017-06-25T00:49:56+00:00",
|
||||||
|
"type": "think-extend",
|
||||||
|
"extra": {
|
||||||
|
"think-config": {
|
||||||
|
"queue": "src/config.php"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"installation-source": "dist",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"think\\": "src"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/common.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "yunwuxin",
|
||||||
|
"email": "448901948@qq.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The ThinkPHP5 Queue Package",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-queue/issues",
|
||||||
|
"source": "https://github.com/top-think/think-queue/tree/master"
|
||||||
|
},
|
||||||
|
"install-path": "../topthink/think-queue"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "weiwei/api-doc",
|
"name": "weiwei/api-doc",
|
||||||
"version": "1.6.2",
|
"version": "1.6.2",
|
||||||
|
|||||||
59
vendor/composer/installed.php
vendored
59
vendor/composer/installed.php
vendored
@@ -1,33 +1,51 @@
|
|||||||
<?php return array (
|
<?php return array (
|
||||||
'root' =>
|
'root' =>
|
||||||
array (
|
array (
|
||||||
'pretty_version' => '1.0.0+no-version-set',
|
'pretty_version' => 'dev-master',
|
||||||
'version' => '1.0.0.0',
|
'version' => 'dev-master',
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => NULL,
|
'reference' => 'c80c9f8da7e4389667bd87ee94956885c5b6dbbb',
|
||||||
'name' => 'topthink/think',
|
'name' => 'topthink/think',
|
||||||
),
|
),
|
||||||
'versions' =>
|
'versions' =>
|
||||||
array (
|
array (
|
||||||
'phpmailer/phpmailer' =>
|
'lampol/phpmail' =>
|
||||||
array (
|
array (
|
||||||
'pretty_version' => 'v6.1.8',
|
'pretty_version' => '1.0',
|
||||||
'version' => '6.1.8.0',
|
'version' => '1.0.0.0',
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => '917ab212fa00dc6eacbb26e8bc387ebe40993bc1',
|
'reference' => '2aa6a69636702548bf684071ffbc8d1cafb85bbc',
|
||||||
|
),
|
||||||
|
'phpmailer/phpmailer' =>
|
||||||
|
array (
|
||||||
|
'pretty_version' => 'v6.5.1',
|
||||||
|
'version' => '6.5.1.0',
|
||||||
|
'aliases' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'reference' => 'dd803df5ad7492e1b40637f7ebd258fee5ca7355',
|
||||||
|
),
|
||||||
|
'phpoffice/phpexcel' =>
|
||||||
|
array (
|
||||||
|
'pretty_version' => '1.8.2',
|
||||||
|
'version' => '1.8.2.0',
|
||||||
|
'aliases' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'reference' => '1441011fb7ecdd8cc689878f54f8b58a6805f870',
|
||||||
),
|
),
|
||||||
'tecnickcom/tcpdf' =>
|
'tecnickcom/tcpdf' =>
|
||||||
array (
|
array (
|
||||||
'pretty_version' => '6.3.5',
|
'pretty_version' => '6.4.2',
|
||||||
'version' => '6.3.5.0',
|
'version' => '6.4.2.0',
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => '19a535eaa7fb1c1cac499109deeb1a7a201b4549',
|
'reference' => '172540dcbfdf8dc983bc2fe78feff48ff7ec1c76',
|
||||||
),
|
),
|
||||||
'topthink/framework' =>
|
'topthink/framework' =>
|
||||||
array (
|
array (
|
||||||
@@ -40,12 +58,12 @@
|
|||||||
),
|
),
|
||||||
'topthink/think' =>
|
'topthink/think' =>
|
||||||
array (
|
array (
|
||||||
'pretty_version' => '1.0.0+no-version-set',
|
'pretty_version' => 'dev-master',
|
||||||
'version' => '1.0.0.0',
|
'version' => 'dev-master',
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => NULL,
|
'reference' => 'c80c9f8da7e4389667bd87ee94956885c5b6dbbb',
|
||||||
),
|
),
|
||||||
'topthink/think-captcha' =>
|
'topthink/think-captcha' =>
|
||||||
array (
|
array (
|
||||||
@@ -67,12 +85,21 @@
|
|||||||
),
|
),
|
||||||
'topthink/think-installer' =>
|
'topthink/think-installer' =>
|
||||||
array (
|
array (
|
||||||
'pretty_version' => 'v1.0.13',
|
'pretty_version' => 'v1.0.14',
|
||||||
'version' => '1.0.13.0',
|
'version' => '1.0.14.0',
|
||||||
'aliases' =>
|
'aliases' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
'reference' => '532dc02efb3d8332b36fd8f63fc4f56aeb1987e7',
|
'reference' => 'eae1740ac264a55c06134b6685dfb9f837d004d1',
|
||||||
|
),
|
||||||
|
'topthink/think-queue' =>
|
||||||
|
array (
|
||||||
|
'pretty_version' => 'v1.1.4',
|
||||||
|
'version' => '1.1.4.0',
|
||||||
|
'aliases' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'reference' => 'ad709611d516e13d6760234bc98e91faa901cae8',
|
||||||
),
|
),
|
||||||
'weiwei/api-doc' =>
|
'weiwei/api-doc' =>
|
||||||
array (
|
array (
|
||||||
|
|||||||
108
vendor/phpmailer/phpmailer/README.md
vendored
108
vendor/phpmailer/phpmailer/README.md
vendored
@@ -1,46 +1,50 @@
|
|||||||

|

|
||||||
|
|
||||||
# PHPMailer - A full-featured email creation and transfer class for PHP
|
# PHPMailer – A full-featured email creation and transfer class for PHP
|
||||||
|
|
||||||
Build status: [](https://travis-ci.org/PHPMailer/PHPMailer)
|
[](https://github.com/PHPMailer/PHPMailer/actions)
|
||||||
[](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/)
|
[](https://codecov.io/gh/PHPMailer/PHPMailer)
|
||||||
[](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/)
|
[](https://packagist.org/packages/phpmailer/phpmailer)
|
||||||
|
[](https://packagist.org/packages/phpmailer/phpmailer)
|
||||||
|
[](https://packagist.org/packages/phpmailer/phpmailer)
|
||||||
|
[](https://phpmailer.github.io/PHPMailer/)
|
||||||
|
|
||||||
[](https://packagist.org/packages/phpmailer/phpmailer) [](https://packagist.org/packages/phpmailer/phpmailer) [](https://packagist.org/packages/phpmailer/phpmailer) [](https://packagist.org/packages/phpmailer/phpmailer) [](http://phpmailer.github.io/PHPMailer/)
|
## Features
|
||||||
|
|
||||||
## Class Features
|
|
||||||
- Probably the world's most popular code for sending email from PHP!
|
- Probably the world's most popular code for sending email from PHP!
|
||||||
- Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more
|
- Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more
|
||||||
- Integrated SMTP support - send without a local mail server
|
- Integrated SMTP support – send without a local mail server
|
||||||
- Send emails with multiple To, CC, BCC and Reply-to addresses
|
- Send emails with multiple To, CC, BCC and Reply-to addresses
|
||||||
- Multipart/alternative emails for mail clients that do not read HTML email
|
- Multipart/alternative emails for mail clients that do not read HTML email
|
||||||
- Add attachments, including inline
|
- Add attachments, including inline
|
||||||
- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings
|
- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings
|
||||||
- SMTP authentication with LOGIN, PLAIN, CRAM-MD5, and XOAUTH2 mechanisms over SSL and SMTP+STARTTLS transports
|
- SMTP authentication with LOGIN, PLAIN, CRAM-MD5, and XOAUTH2 mechanisms over SMTPS and SMTP+STARTTLS transports
|
||||||
- Validates email addresses automatically
|
- Validates email addresses automatically
|
||||||
- Protect against header injection attacks
|
- Protects against header injection attacks
|
||||||
- Error messages in over 50 languages!
|
- Error messages in over 50 languages!
|
||||||
- DKIM and S/MIME signing support
|
- DKIM and S/MIME signing support
|
||||||
- Compatible with PHP 5.5 and later
|
- Compatible with PHP 5.5 and later, including PHP 8.1
|
||||||
- Namespaced to prevent name clashes
|
- Namespaced to prevent name clashes
|
||||||
- Much more!
|
- Much more!
|
||||||
|
|
||||||
## Why you might need it
|
## Why you might need it
|
||||||
Many PHP developers need to send email from their code. The only PHP function that supports this is [`mail()`](https://www.php.net/manual/en/function.mail.php). However, it does not provide any assistance for making use of popular features such as encryption, authentication, HTML messages, and attachments.
|
Many PHP developers need to send email from their code. The only PHP function that supports this directly is [`mail()`](https://www.php.net/manual/en/function.mail.php). However, it does not provide any assistance for making use of popular features such as encryption, authentication, HTML messages, and attachments.
|
||||||
|
|
||||||
Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules – the vast majority of code that you'll find online that uses the `mail()` function directly is just plain wrong!
|
Formatting email correctly is surprisingly difficult. There are myriad overlapping (and conflicting) standards, requiring tight adherence to horribly complicated formatting and encoding rules – the vast majority of code that you'll find online that uses the `mail()` function directly is just plain wrong, if not unsafe!
|
||||||
*Please* don't be tempted to do it yourself – if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own. Try [SwiftMailer](https://swiftmailer.symfony.com/), [Zend/Mail](https://zendframework.github.io/zend-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail) etc.
|
|
||||||
|
|
||||||
The PHP `mail()` function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD, and macOS platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server.
|
The PHP `mail()` function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD, and macOS platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP client allows email sending on all platforms without needing a local mail server. Be aware though, that the `mail()` function should be avoided when possible; it's both faster and [safer](https://exploitbox.io/paper/Pwning-PHP-Mail-Function-For-Fun-And-RCE.html) to use SMTP to localhost.
|
||||||
|
|
||||||
|
*Please* don't be tempted to do it yourself – if you don't use PHPMailer, there are many other excellent libraries that
|
||||||
|
you should look at before rolling your own. Try [SwiftMailer](https://swiftmailer.symfony.com/)
|
||||||
|
, [Laminas/Mail](https://docs.laminas.dev/laminas-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail) etc.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read LICENSE for information on the software availability and distribution.
|
This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read [LICENSE](https://github.com/PHPMailer/PHPMailer/blob/master/LICENSE) for information on the software availability and distribution.
|
||||||
|
|
||||||
## Installation & loading
|
## Installation & loading
|
||||||
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
|
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"phpmailer/phpmailer": "~6.1"
|
"phpmailer/phpmailer": "^6.5"
|
||||||
```
|
```
|
||||||
|
|
||||||
or run
|
or run
|
||||||
@@ -53,7 +57,8 @@ Note that the `vendor` folder and the `vendor/autoload.php` script are generated
|
|||||||
|
|
||||||
If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package in your `composer.json`.
|
If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package in your `composer.json`.
|
||||||
|
|
||||||
Alternatively, if you're not using Composer, copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually:
|
Alternatively, if you're not using Composer, you
|
||||||
|
can [download PHPMailer as a zip file](https://github.com/PHPMailer/PHPMailer/archive/master.zip), (note that docs and examples are not included in the zip file), then copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
@@ -65,18 +70,16 @@ require 'path/to/PHPMailer/src/PHPMailer.php';
|
|||||||
require 'path/to/PHPMailer/src/SMTP.php';
|
require 'path/to/PHPMailer/src/SMTP.php';
|
||||||
```
|
```
|
||||||
|
|
||||||
If you're not using the `SMTP` class explicitly (you're probably not), you don't need a `use` line for the SMTP class.
|
If you're not using the `SMTP` class explicitly (you're probably not), you don't need a `use` line for the SMTP class. Even if you're not using exceptions, you do still need to load the `Exception` class as it is used internally.
|
||||||
|
|
||||||
If you don't speak git or just want a tarball, click the 'zip' button on the right of the project page in GitHub, though note that docs and examples are not included in the tarball.
|
|
||||||
|
|
||||||
## Legacy versions
|
## Legacy versions
|
||||||
PHPMailer 5.2 (which is compatible with PHP 5.0 - 7.0) is no longer being supported, even for security updates. You will find the latest version of 5.2 in the [5.2-stable branch](https://github.com/PHPMailer/PHPMailer/tree/5.2-stable). If you're using PHP 5.5 or later (which you should be), switch to the 6.x releases.
|
PHPMailer 5.2 (which is compatible with PHP 5.0 — 7.0) is no longer supported, even for security updates. You will find the latest version of 5.2 in the [5.2-stable branch](https://github.com/PHPMailer/PHPMailer/tree/5.2-stable). If you're using PHP 5.5 or later (which you should be), switch to the 6.x releases.
|
||||||
|
|
||||||
### Upgrading from 5.2
|
### Upgrading from 5.2
|
||||||
The biggest changes are that source files are now in the `src/` folder, and PHPMailer now declares the namespace `PHPMailer\PHPMailer`. This has several important effects – [read the upgrade guide](https://github.com/PHPMailer/PHPMailer/tree/master/UPGRADING.md) for more details.
|
The biggest changes are that source files are now in the `src/` folder, and PHPMailer now declares the namespace `PHPMailer\PHPMailer`. This has several important effects – [read the upgrade guide](https://github.com/PHPMailer/PHPMailer/tree/master/UPGRADING.md) for more details.
|
||||||
|
|
||||||
### Minimal installation
|
### Minimal installation
|
||||||
While installing the entire package manually or with Composer is simple, convenient, and reliable, you may want to include only vital files in your project. At the very least you will need [src/PHPMailer.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/PHPMailer.php). If you're using SMTP, you'll need [src/SMTP.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/SMTP.php), and if you're using POP-before SMTP, you'll need [src/POP3.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/POP3.php). You can skip the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder if you're not showing errors to users and can make do with English-only errors. If you're using XOAUTH2 you will need [src/OAuth.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/OAuth.php) as well as the Composer dependencies for the services you wish to authenticate with. Really, it's much easier to use Composer!
|
While installing the entire package manually or with Composer is simple, convenient, and reliable, you may want to include only vital files in your project. At the very least you will need [src/PHPMailer.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/PHPMailer.php). If you're using SMTP, you'll need [src/SMTP.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/SMTP.php), and if you're using POP-before SMTP (*very* unlikely!), you'll need [src/POP3.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/POP3.php). You can skip the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder if you're not showing errors to users and can make do with English-only errors. If you're using XOAUTH2 you will need [src/OAuth.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/OAuth.php) as well as the Composer dependencies for the services you wish to authenticate with. Really, it's much easier to use Composer!
|
||||||
|
|
||||||
## A Simple Example
|
## A Simple Example
|
||||||
|
|
||||||
@@ -91,19 +94,19 @@ use PHPMailer\PHPMailer\Exception;
|
|||||||
//Load Composer's autoloader
|
//Load Composer's autoloader
|
||||||
require 'vendor/autoload.php';
|
require 'vendor/autoload.php';
|
||||||
|
|
||||||
// Instantiation and passing `true` enables exceptions
|
//Create an instance; passing `true` enables exceptions
|
||||||
$mail = new PHPMailer(true);
|
$mail = new PHPMailer(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//Server settings
|
//Server settings
|
||||||
$mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output
|
$mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output
|
||||||
$mail->isSMTP(); //Send using SMTP
|
$mail->isSMTP(); //Send using SMTP
|
||||||
$mail->Host = 'smtp1.example.com'; // Set the SMTP server to send through
|
$mail->Host = 'smtp.example.com'; //Set the SMTP server to send through
|
||||||
$mail->SMTPAuth = true; //Enable SMTP authentication
|
$mail->SMTPAuth = true; //Enable SMTP authentication
|
||||||
$mail->Username = 'user@example.com'; //SMTP username
|
$mail->Username = 'user@example.com'; //SMTP username
|
||||||
$mail->Password = 'secret'; //SMTP password
|
$mail->Password = 'secret'; //SMTP password
|
||||||
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged
|
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption
|
||||||
$mail->Port = 587; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above
|
$mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
|
||||||
|
|
||||||
//Recipients
|
//Recipients
|
||||||
$mail->setFrom('from@example.com', 'Mailer');
|
$mail->setFrom('from@example.com', 'Mailer');
|
||||||
@@ -130,7 +133,7 @@ try {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
You'll find plenty more to play with in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder.
|
You'll find plenty to play with in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder, which covers many common scenarios including sending through gmail, building contact forms, sending to mailing lists, and more.
|
||||||
|
|
||||||
If you are re-using the instance (e.g. when sending to a mailing list), you may need to clear the recipient list to avoid sending duplicate messages. See [the mailing list example](https://github.com/PHPMailer/PHPMailer/blob/master/examples/mailing_list.phps) for further guidance.
|
If you are re-using the instance (e.g. when sending to a mailing list), you may need to clear the recipient list to avoid sending duplicate messages. See [the mailing list example](https://github.com/PHPMailer/PHPMailer/blob/master/examples/mailing_list.phps) for further guidance.
|
||||||
|
|
||||||
@@ -144,45 +147,39 @@ PHPMailer defaults to English, but in the [language](https://github.com/PHPMaile
|
|||||||
$mail->setLanguage('fr', '/optional/path/to/language/directory/');
|
$mail->setLanguage('fr', '/optional/path/to/language/directory/');
|
||||||
```
|
```
|
||||||
|
|
||||||
We welcome corrections and new languages - if you're looking for corrections to do, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations.
|
We welcome corrections and new languages – if you're looking for corrections, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, this should be the first place you look as it's the most frequently updated.
|
Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, head for [the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting) as it's frequently updated.
|
||||||
|
|
||||||
Examples of how to use PHPMailer for common scenarios can be found in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder. If you're looking for a good starting point, we recommend you start with [the Gmail example](https://github.com/PHPMailer/PHPMailer/tree/master/examples/gmail.phps).
|
Examples of how to use PHPMailer for common scenarios can be found in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder. If you're looking for a good starting point, we recommend you start with [the Gmail example](https://github.com/PHPMailer/PHPMailer/tree/master/examples/gmail.phps).
|
||||||
|
|
||||||
Note that in order to reduce PHPMailer's deployed code footprint, the examples are no longer included if you load PHPMailer via Composer or via [GitHub's zip file download](https://github.com/PHPMailer/PHPMailer/archive/master.zip), so you'll need to either clone the git repository or use the above links to get to the examples directly.
|
To reduce PHPMailer's deployed code footprint, examples are not included if you load PHPMailer via Composer or via [GitHub's zip file download](https://github.com/PHPMailer/PHPMailer/archive/master.zip), so you'll need to either clone the git repository or use the above links to get to the examples directly.
|
||||||
|
|
||||||
Complete generated API documentation is [available online](http://phpmailer.github.io/PHPMailer/).
|
Complete generated API documentation is [available online](https://phpmailer.github.io/PHPMailer/).
|
||||||
|
|
||||||
You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](http://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/blob/master/test/PHPMailerTest.php) a good source of how to do various operations such as encryption.
|
You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](http://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/blob/master/test/PHPMailerTest.php) a good reference for how to do various operations such as encryption.
|
||||||
|
|
||||||
If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting).
|
If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting).
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
There is a PHPUnit test script in the [test](https://github.com/PHPMailer/PHPMailer/tree/master/test/) folder. PHPMailer uses PHPUnit 4.8 - we would use 5.x but we need to run on PHP 5.5.
|
[PHPMailer tests](https://github.com/PHPMailer/PHPMailer/tree/master/test/) use PHPUnit 9, with [a polyfill](https://github.com/Yoast/PHPUnit-Polyfills) to let 9-style tests run on older PHPUnit and PHP versions.
|
||||||
|
|
||||||
Build status: [](https://travis-ci.org/PHPMailer/PHPMailer)
|
[](https://github.com/PHPMailer/PHPMailer/actions)
|
||||||
|
|
||||||
If this isn't passing, is there something you can do to help?
|
If this isn't passing, is there something you can do to help?
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately.
|
Please disclose any vulnerabilities found responsibly – report security issues to the maintainers privately.
|
||||||
|
|
||||||
PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity.
|
See [SECURITY](https://github.com/PHPMailer/PHPMailer/tree/master/SECURITY.md) and [PHPMailer's security advisories on GitHub](https://github.com/PHPMailer/PHPMailer/security).
|
||||||
|
|
||||||
PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer).
|
|
||||||
|
|
||||||
PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a critical remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html).
|
|
||||||
|
|
||||||
See [SECURITY](https://github.com/PHPMailer/PHPMailer/tree/master/SECURITY.md) for more detail on security issues.
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues).
|
Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues).
|
||||||
|
|
||||||
We're particularly interested in fixing edge-cases, expanding test coverage and updating translations.
|
We're particularly interested in fixing edge-cases, expanding test coverage and updating translations.
|
||||||
|
|
||||||
If you found a mistake in the docs, or want to add something, go ahead and amend the wiki - anyone can edit it.
|
If you found a mistake in the docs, or want to add something, go ahead and amend the wiki – anyone can edit it.
|
||||||
|
|
||||||
If you have git clones from prior to the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone:
|
If you have git clones from prior to the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone:
|
||||||
|
|
||||||
@@ -193,27 +190,36 @@ git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git
|
|||||||
Please *don't* use the SourceForge or Google Code projects any more; they are obsolete and no longer maintained.
|
Please *don't* use the SourceForge or Google Code projects any more; they are obsolete and no longer maintained.
|
||||||
|
|
||||||
## Sponsorship
|
## Sponsorship
|
||||||
Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), a powerful email marketing system.
|
Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), the world's only privacy-first email marketing system.
|
||||||
|
|
||||||
<a href="https://info.smartmessages.net/"><img src="https://www.smartmessages.net/img/smartmessages-logo.svg" width="250" height="28" alt="Smartmessages email marketing"></a>
|
<a href="https://info.smartmessages.net/"><img src="https://www.smartmessages.net/img/smartmessages-logo.svg" width="550" alt="Smartmessages.net privacy-first email marketing logo"></a>
|
||||||
|
|
||||||
Other contributions are gladly received, whether in beer 🍺, T-shirts 👕, Amazon wishlist raids, or cold, hard cash 💰. If you'd like to donate to say "thank you" to maintainers or contributors, please contact them through individual profile pages via [the contributors page](https://github.com/PHPMailer/PHPMailer/graphs/contributors).
|
Donations are very welcome, whether in beer 🍺, T-shirts 👕, or cold, hard cash 💰. Sponsorship through GitHub is a simple and convenient way to say "thank you" to PHPMailer's maintainers and contributors – just click the "Sponsor" button [on the project page](https://github.com/PHPMailer/PHPMailer). If your company uses PHPMailer, consider taking part in Tidelift's enterprise support programme.
|
||||||
|
|
||||||
|
## PHPMailer For Enterprise
|
||||||
|
|
||||||
|
Available as part of the Tidelift Subscription.
|
||||||
|
|
||||||
|
The maintainers of PHPMailer and thousands of other packages are working with Tidelift to deliver commercial
|
||||||
|
support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and
|
||||||
|
improve code health, while paying the maintainers of the exact packages you
|
||||||
|
use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-phpmailer-phpmailer?utm_source=packagist-phpmailer-phpmailer&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
See [changelog](changelog.md).
|
See [changelog](changelog.md).
|
||||||
|
|
||||||
## History
|
## History
|
||||||
- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/).
|
- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/).
|
||||||
- Marcus Bointon (coolbru on SF) and Andy Prevost (codeworxtech) took over the project in 2004.
|
- [Marcus Bointon](https://github.com/Synchro) (`coolbru` on SF) and Andy Prevost (`codeworxtech`) took over the project in 2004.
|
||||||
- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski.
|
- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski.
|
||||||
- Marcus created his fork on [GitHub](https://github.com/Synchro/PHPMailer) in 2008.
|
- Marcus created [his fork on GitHub](https://github.com/Synchro/PHPMailer) in 2008.
|
||||||
- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer in 2013.
|
- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer in 2013.
|
||||||
- PHPMailer moves to the [PHPMailer organisation](https://github.com/PHPMailer) on GitHub in 2013.
|
- PHPMailer moves to [the PHPMailer organisation](https://github.com/PHPMailer) on GitHub in 2013.
|
||||||
|
|
||||||
### What's changed since moving from SourceForge?
|
### What's changed since moving from SourceForge?
|
||||||
- Official successor to the SourceForge and Google Code projects.
|
- Official successor to the SourceForge and Google Code projects.
|
||||||
- Test suite.
|
- Test suite.
|
||||||
- Continuous integration with Travis-CI.
|
- Continuous integration with Github Actions.
|
||||||
- Composer support.
|
- Composer support.
|
||||||
- Public development.
|
- Public development.
|
||||||
- Additional languages and language strings.
|
- Additional languages and language strings.
|
||||||
|
|||||||
9
vendor/phpmailer/phpmailer/SECURITY.md
vendored
9
vendor/phpmailer/phpmailer/SECURITY.md
vendored
@@ -1,6 +1,13 @@
|
|||||||
# Security notices relating to PHPMailer
|
# Security notices relating to PHPMailer
|
||||||
|
|
||||||
Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately.
|
Please disclose any security issues or vulnerabilities found through [Tidelift's coordinated disclosure system](https://tidelift.com/security) or to the maintainers privately.
|
||||||
|
|
||||||
|
PHPMailer 6.4.1 and earlier contain a vulnerability that can result in untrusted code being called (if such code is injected into the host project's scope by other means). If the `$patternselect` parameter to `validateAddress()` is set to `'php'` (the default, defined by `PHPMailer::$validator`), and the global namespace contains a function called `php`, it will be called in preference to the built-in validator of the same name. Mitigated in PHPMailer 6.5.0 by denying the use of simple strings as validator function names. Recorded as [CVE-2021-3603](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603). Reported by [Vikrant Singh Chauhan](mailto:vi@hackberry.xyz) via [huntr.dev](https://www.huntr.dev/).
|
||||||
|
|
||||||
|
PHPMailer versions 6.4.1 and earlier contain a possible remote code execution vulnerability through the `$lang_path` parameter of the `setLanguage()` method. If the `$lang_path` parameter is passed unfiltered from user input, it can be set to [a UNC path](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths), and if an attacker is also able to persuade the server to load a file from that UNC path, a script file under their control may be executed. This vulnerability only applies to systems that resolve UNC paths, typically only Microsoft Windows.
|
||||||
|
PHPMailer 6.5.0 mitigates this by no longer treating translation files as PHP code, but by parsing their text content directly. This approach avoids the possibility of executing unknown code while retaining backward compatibility. This isn't ideal, so the current translation format is deprecated and will be replaced in the next major release. Recorded as [CVE-2021-34551](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-34551). Reported by [Jilin Diting Information Technology Co., Ltd](https://listensec.com) via Tidelift.
|
||||||
|
|
||||||
|
PHPMailer versions between 6.1.8 and 6.4.0 contain a regression of the earlier CVE-2018-19296 object injection vulnerability as a result of [a fix for Windows UNC paths in 6.1.8](https://github.com/PHPMailer/PHPMailer/commit/e2e07a355ee8ff36aba21d0242c5950c56e4c6f9). Recorded as [CVE-2020-36326](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-36326). Reported by Fariskhi Vidyan via Tidelift. 6.4.1 fixes this issue, and also enforces stricter checks for URL schemes in local path contexts.
|
||||||
|
|
||||||
PHPMailer versions 6.1.5 and earlier contain an output escaping bug that occurs in `Content-Type` and `Content-Disposition` when filenames passed into `addAttachment` and other methods that accept attachment names contain double quote characters, in contravention of RFC822 3.4.1. No specific vulnerability has been found relating to this, but it could allow file attachments to bypass attachment filters that are based on matching filename extensions. Recorded as [CVE-2020-13625](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-13625). Reported by Elar Lang of Clarified Security.
|
PHPMailer versions 6.1.5 and earlier contain an output escaping bug that occurs in `Content-Type` and `Content-Disposition` when filenames passed into `addAttachment` and other methods that accept attachment names contain double quote characters, in contravention of RFC822 3.4.1. No specific vulnerability has been found relating to this, but it could allow file attachments to bypass attachment filters that are based on matching filename extensions. Recorded as [CVE-2020-13625](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-13625). Reported by Elar Lang of Clarified Security.
|
||||||
|
|
||||||
|
|||||||
2
vendor/phpmailer/phpmailer/VERSION
vendored
2
vendor/phpmailer/phpmailer/VERSION
vendored
@@ -1 +1 @@
|
|||||||
6.1.8
|
6.5.1
|
||||||
29
vendor/phpmailer/phpmailer/composer.json
vendored
29
vendor/phpmailer/phpmailer/composer.json
vendored
@@ -21,7 +21,7 @@
|
|||||||
],
|
],
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"url": "https://github.com/synchro",
|
"url": "https://github.com/Synchro",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -32,16 +32,21 @@
|
|||||||
"ext-hash": "*"
|
"ext-hash": "*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"friendsofphp/php-cs-fixer": "^2.2",
|
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||||
"phpunit/phpunit": "^4.8 || ^5.7",
|
"doctrine/annotations": "^1.2",
|
||||||
"doctrine/annotations": "^1.2"
|
"php-parallel-lint/php-console-highlighter": "^0.5.0",
|
||||||
|
"php-parallel-lint/php-parallel-lint": "^1.3",
|
||||||
|
"phpcompatibility/php-compatibility": "^9.3.5",
|
||||||
|
"roave/security-advisories": "dev-latest",
|
||||||
|
"squizlabs/php_codesniffer": "^3.6.0",
|
||||||
|
"yoast/phpunit-polyfills": "^1.0.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"psr/log": "For optional PSR-3 debug logging",
|
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
|
||||||
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
|
|
||||||
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
|
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
|
||||||
|
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
|
||||||
|
"psr/log": "For optional PSR-3 debug logging",
|
||||||
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
|
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
|
||||||
"ext-mbstring": "Needed to send email in multibyte encoding charset",
|
|
||||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -54,5 +59,13 @@
|
|||||||
"PHPMailer\\Test\\": "test/"
|
"PHPMailer\\Test\\": "test/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"license": "LGPL-2.1-only"
|
"license": "LGPL-2.1-only",
|
||||||
|
"scripts": {
|
||||||
|
"check": "./vendor/bin/phpcs",
|
||||||
|
"test": "./vendor/bin/phpunit --no-coverage",
|
||||||
|
"coverage": "./vendor/bin/phpunit",
|
||||||
|
"lint": [
|
||||||
|
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php,phps --exclude vendor --exclude .git --exclude build"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
vendor/phpmailer/phpmailer/get_oauth_token.php
vendored
10
vendor/phpmailer/phpmailer/get_oauth_token.php
vendored
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPMailer - PHP email creation and transport class.
|
* PHPMailer - PHP email creation and transport class.
|
||||||
* PHP Version 5.5
|
* PHP Version 5.5
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get an OAuth2 token from an OAuth2 provider.
|
* Get an OAuth2 token from an OAuth2 provider.
|
||||||
* * Install this script on your server so that it's accessible
|
* * Install this script on your server so that it's accessible
|
||||||
@@ -46,10 +48,10 @@ use Stevenmaguire\OAuth2\Client\Provider\Microsoft;
|
|||||||
if (!isset($_GET['code']) && !isset($_GET['provider'])) {
|
if (!isset($_GET['code']) && !isset($_GET['provider'])) {
|
||||||
?>
|
?>
|
||||||
<html>
|
<html>
|
||||||
<body>Select Provider:<br/>
|
<body>Select Provider:<br>
|
||||||
<a href='?provider=Google'>Google</a><br/>
|
<a href='?provider=Google'>Google</a><br>
|
||||||
<a href='?provider=Yahoo'>Yahoo</a><br/>
|
<a href='?provider=Yahoo'>Yahoo</a><br>
|
||||||
<a href='?provider=Microsoft'>Microsoft/Outlook/Hotmail/Live/Office365</a><br/>
|
<a href='?provider=Microsoft'>Microsoft/Outlook/Hotmail/Live/Office365</a><br>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Afrikaans PHPMailer language file: refer to English translation for definitive list
|
* Afrikaans PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Arabic PHPMailer language file: refer to English translation for definitive list
|
* Arabic PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
@@ -18,8 +19,7 @@ $PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة ا
|
|||||||
$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: ';
|
$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: ';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
|
||||||
$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
|
$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' .
|
$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية فشل في الارسال لكل من : ';
|
||||||
'فشل في الارسال لكل من : ';
|
|
||||||
$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: ';
|
$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: ';
|
||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: ';
|
$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: ';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Azerbaijani PHPMailer language file: refer to English translation for definitive list
|
* Azerbaijani PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bosnian PHPMailer language file: refer to English translation for definitive list
|
* Bosnian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Belarusian PHPMailer language file: refer to English translation for definitive list
|
* Belarusian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bulgarian PHPMailer language file: refer to English translation for definitive list
|
* Bulgarian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Catalan PHPMailer language file: refer to English translation for definitive list
|
* Catalan PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Chinese PHPMailer language file: refer to English translation for definitive list
|
* Chinese PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Czech PHPMailer language file: refer to English translation for definitive list
|
* Czech PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
@@ -15,6 +16,8 @@ $PHPMAILER_LANG['file_open'] = 'Chyba souboru: Nelze otevřít soubor
|
|||||||
$PHPMAILER_LANG['from_failed'] = 'Následující adresa odesílatele je nesprávná: ';
|
$PHPMAILER_LANG['from_failed'] = 'Následující adresa odesílatele je nesprávná: ';
|
||||||
$PHPMAILER_LANG['instantiate'] = 'Nelze vytvořit instanci emailové funkce.';
|
$PHPMAILER_LANG['instantiate'] = 'Nelze vytvořit instanci emailové funkce.';
|
||||||
$PHPMAILER_LANG['invalid_address'] = 'Neplatná adresa: ';
|
$PHPMAILER_LANG['invalid_address'] = 'Neplatná adresa: ';
|
||||||
|
$PHPMAILER_LANG['invalid_hostentry'] = 'Záznam hostitele je nesprávný: ';
|
||||||
|
$PHPMAILER_LANG['invalid_host'] = 'Hostitel je nesprávný: ';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer není podporován.';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer není podporován.';
|
||||||
$PHPMAILER_LANG['provide_address'] = 'Musíte zadat alespoň jednu emailovou adresu příjemce.';
|
$PHPMAILER_LANG['provide_address'] = 'Musíte zadat alespoň jednu emailovou adresu příjemce.';
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'Chyba SMTP: Následující adresy příjemců nejsou správně: ';
|
$PHPMAILER_LANG['recipients_failed'] = 'Chyba SMTP: Následující adresy příjemců nejsou správně: ';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Danish PHPMailer language file: refer to English translation for definitive list
|
* Danish PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* German PHPMailer language file: refer to English translation for definitive list
|
* German PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Greek PHPMailer language file: refer to English translation for definitive list
|
* Greek PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Esperanto PHPMailer language file: refer to English translation for definitive list
|
* Esperanto PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Spanish PHPMailer language file: refer to English translation for definitive list
|
* Spanish PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Estonian PHPMailer language file: refer to English translation for definitive list
|
* Estonian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Persian/Farsi PHPMailer language file: refer to English translation for definitive list
|
* Persian/Farsi PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finnish PHPMailer language file: refer to English translation for definitive list
|
* Finnish PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Faroese PHPMailer language file: refer to English translation for definitive list
|
* Faroese PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* French PHPMailer language file: refer to English translation for definitive list
|
* French PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
@@ -19,6 +20,8 @@ $PHPMAILER_LANG['file_open'] = 'Ouverture du fichier impossible : '
|
|||||||
$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a échoué : ';
|
$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a échoué : ';
|
||||||
$PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.';
|
$PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.';
|
||||||
$PHPMAILER_LANG['invalid_address'] = 'L\'adresse courriel n\'est pas valide : ';
|
$PHPMAILER_LANG['invalid_address'] = 'L\'adresse courriel n\'est pas valide : ';
|
||||||
|
$PHPMAILER_LANG['invalid_hostentry'] = 'L\'entrée hôte n\'est pas valide : ';
|
||||||
|
$PHPMAILER_LANG['invalid_host'] = 'L\'hôte n\'est pas valide : ';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.';
|
||||||
$PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.';
|
$PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.';
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : les destinataires suivants sont en erreur : ';
|
$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : les destinataires suivants sont en erreur : ';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Galician PHPMailer language file: refer to English translation for definitive list
|
* Galician PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hebrew PHPMailer language file: refer to English translation for definitive list
|
* Hebrew PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hindi PHPMailer language file: refer to English translation for definitive list
|
* Hindi PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Croatian PHPMailer language file: refer to English translation for definitive list
|
* Croatian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hungarian PHPMailer language file: refer to English translation for definitive list
|
* Hungarian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Armenian PHPMailer language file: refer to English translation for definitive list
|
* Armenian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indonesian PHPMailer language file: refer to English translation for definitive list
|
* Indonesian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Italian PHPMailer language file: refer to English translation for definitive list
|
* Italian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,27 +1,29 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Japanese PHPMailer language file: refer to English translation for definitive list
|
* Japanese PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
* @author Mitsuhiro Yoshida <http://mitstek.com/>
|
* @author Mitsuhiro Yoshida <http://mitstek.com/>
|
||||||
* @author Yoshi Sakai <http://bluemooninc.jp/>
|
* @author Yoshi Sakai <http://bluemooninc.jp/>
|
||||||
|
* @author Arisophy <https://github.com/arisophy/>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。';
|
$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。';
|
||||||
$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。';
|
$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。';
|
||||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。';
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。';
|
||||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
$PHPMAILER_LANG['empty_message'] = 'メール本文が空です。';
|
||||||
$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: ';
|
$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: ';
|
||||||
$PHPMAILER_LANG['execute'] = '実行できませんでした: ';
|
$PHPMAILER_LANG['execute'] = '実行できませんでした: ';
|
||||||
$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: ';
|
$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: ';
|
||||||
$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: ';
|
$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: ';
|
||||||
$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: ';
|
$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: ';
|
||||||
$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。';
|
$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。';
|
||||||
//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
|
$PHPMAILER_LANG['invalid_address'] = '不正なメールアドレス: ';
|
||||||
$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
|
$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。';
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';
|
||||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
$PHPMAILER_LANG['signing'] = '署名エラー: ';
|
||||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP接続に失敗しました。';
|
||||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
$PHPMAILER_LANG['smtp_error'] = 'SMTPサーバーエラー: ';
|
||||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
$PHPMAILER_LANG['variable_set'] = '変数が存在しません: ';
|
||||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
$PHPMAILER_LANG['extension_missing'] = '拡張機能が見つかりません: ';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Georgian PHPMailer language file: refer to English translation for definitive list
|
* Georgian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Korean PHPMailer language file: refer to English translation for definitive list
|
* Korean PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lithuanian PHPMailer language file: refer to English translation for definitive list
|
* Lithuanian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Latvian PHPMailer language file: refer to English translation for definitive list
|
* Latvian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Malagasy PHPMailer language file: refer to English translation for definitive list
|
* Malagasy PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
* @author Hackinet <piyushjha8164@gmail.com>
|
* @author Hackinet <piyushjha8164@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$PHPMAILER_LANG['authenticate'] = 'Hadisoana SMTP: Tsy nahomby ny fanamarinana.';
|
$PHPMAILER_LANG['authenticate'] = 'Hadisoana SMTP: Tsy nahomby ny fanamarinana.';
|
||||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Tsy afaka mampifandray amin\'ny mpampiantrano SMTP.';
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Tsy afaka mampifandray amin\'ny mpampiantrano SMTP.';
|
||||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP diso: tsy voarakitra ny angona.';
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP diso: tsy voarakitra ny angona.';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Malaysian PHPMailer language file: refer to English translation for definitive list
|
* Malaysian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Norwegian Bokmål PHPMailer language file: refer to English translation for definitive list
|
* Norwegian Bokmål PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dutch PHPMailer language file: refer to PHPMailer.php for definitive list.
|
* Dutch PHPMailer language file: refer to PHPMailer.php for definitive list.
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
@@ -6,23 +7,28 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.';
|
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.';
|
||||||
|
$PHPMAILER_LANG['buggy_php'] = 'PHP versie gededecteerd die onderhavig is aan een bug die kan resulteren in gecorrumpeerde berichten. Om dit te voorkomen, gebruik SMTP voor het verzenden van berichten, zet de mail.add_x_header optie in uw php.ini file uit, gebruik MacOS of Linux, of pas de gebruikte PHP versie aan naar versie 7.0.17+ or 7.1.3+.';
|
||||||
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.';
|
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.';
|
||||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.';
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.';
|
||||||
$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg';
|
$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg';
|
||||||
$PHPMAILER_LANG['encoding'] = 'Onbekende codering: ';
|
$PHPMAILER_LANG['encoding'] = 'Onbekende codering: ';
|
||||||
$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: ';
|
$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: ';
|
||||||
|
$PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: ';
|
||||||
$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: ';
|
$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: ';
|
||||||
$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: ';
|
$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: ';
|
||||||
$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: ';
|
$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: ';
|
||||||
$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.';
|
$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.';
|
||||||
$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: ';
|
$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: ';
|
||||||
|
$PHPMAILER_LANG['invalid_header'] = 'Ongeldige header naam of waarde';
|
||||||
$PHPMAILER_LANG['invalid_hostentry'] = 'Ongeldige hostentry: ';
|
$PHPMAILER_LANG['invalid_hostentry'] = 'Ongeldige hostentry: ';
|
||||||
$PHPMAILER_LANG['invalid_host'] = 'Ongeldige host: ';
|
$PHPMAILER_LANG['invalid_host'] = 'Ongeldige host: ';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';
|
||||||
$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.';
|
$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.';
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: ';
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: ';
|
||||||
$PHPMAILER_LANG['signing'] = 'Signeerfout: ';
|
$PHPMAILER_LANG['signing'] = 'Signeerfout: ';
|
||||||
|
$PHPMAILER_LANG['smtp_code'] = 'SMTP code: ';
|
||||||
|
$PHPMAILER_LANG['smtp_code_ex'] = 'Aanvullende SMTP informatie: ';
|
||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.';
|
||||||
|
$PHPMAILER_LANG['smtp_detail'] = 'Detail: ';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: ';
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: ';
|
||||||
$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: ';
|
$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: ';
|
||||||
$PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: ';
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Polish PHPMailer language file: refer to English translation for definitive list
|
* Polish PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Portuguese (European) PHPMailer language file: refer to English translation for definitive list
|
* Portuguese (European) PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Brazilian Portuguese PHPMailer language file: refer to English translation for definitive list
|
* Brazilian Portuguese PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Romanian PHPMailer language file: refer to English translation for definitive list
|
* Romanian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Russian PHPMailer language file: refer to English translation for definitive list
|
* Russian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Slovak PHPMailer language file: refer to English translation for definitive list
|
* Slovak PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
@@ -17,6 +18,8 @@ $PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre č
|
|||||||
$PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: ';
|
$PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: ';
|
||||||
$PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.';
|
$PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.';
|
||||||
$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: ';
|
$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: ';
|
||||||
|
$PHPMAILER_LANG['invalid_hostentry'] = 'Záznam hostiteľa je nesprávny: ';
|
||||||
|
$PHPMAILER_LANG['invalid_host'] = 'Hostiteľ je nesprávny: ';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.';
|
||||||
$PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.';
|
$PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.';
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne ';
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne ';
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Slovene PHPMailer language file: refer to English translation for definitive list
|
* Slovene PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
* @author Klemen Tušar <techouse@gmail.com>
|
* @author Klemen Tušar <techouse@gmail.com>
|
||||||
* @author Filip Š <projects@filips.si>
|
* @author Filip Š <projects@filips.si>
|
||||||
|
* @author Blaž Oražem <blaz@orazem.si>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.';
|
$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.';
|
||||||
@@ -17,8 +19,10 @@ $PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: ';
|
|||||||
$PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: ';
|
$PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: ';
|
||||||
$PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.';
|
$PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.';
|
||||||
$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: ';
|
$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: ';
|
||||||
|
$PHPMAILER_LANG['invalid_hostentry'] = 'Neveljaven vnos gostitelja: ';
|
||||||
|
$PHPMAILER_LANG['invalid_host'] = 'Neveljaven gostitelj: ';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.';
|
||||||
$PHPMAILER_LANG['provide_address'] = 'Prosim vnesite vsaj enega naslovnika.';
|
$PHPMAILER_LANG['provide_address'] = 'Prosimo, vnesite vsaj enega naslovnika.';
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: ';
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: ';
|
||||||
$PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: ';
|
$PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: ';
|
||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Serbian PHPMailer language file: refer to English translation for definitive list
|
* Serbian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swedish PHPMailer language file: refer to English translation for definitive list
|
* Swedish PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tagalog PHPMailer language file: refer to English translation for definitive list
|
* Tagalog PHPMailer language file: refer to English translation for definitive list
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turkish PHPMailer language file: refer to English translation for definitive list
|
* Turkish PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ukrainian PHPMailer language file: refer to English translation for definitive list
|
* Ukrainian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
@@ -15,11 +16,11 @@ $PHPMAILER_LANG['file_access'] = 'Немає доступу до фай
|
|||||||
$PHPMAILER_LANG['file_open'] = 'Помилка файлової системи: не вдається відкрити файл: ';
|
$PHPMAILER_LANG['file_open'] = 'Помилка файлової системи: не вдається відкрити файл: ';
|
||||||
$PHPMAILER_LANG['from_failed'] = 'Невірна адреса відправника: ';
|
$PHPMAILER_LANG['from_failed'] = 'Невірна адреса відправника: ';
|
||||||
$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail().';
|
$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail().';
|
||||||
$PHPMAILER_LANG['provide_address'] = 'Будь-ласка, введіть хоча б одну email-адресу отримувача.';
|
$PHPMAILER_LANG['provide_address'] = 'Будь ласка, введіть хоча б одну email-адресу отримувача.';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.';
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: не вдалося відправлення для таких отримувачів: ';
|
$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: не вдалося відправлення для таких отримувачів: ';
|
||||||
$PHPMAILER_LANG['empty_message'] = 'Пусте повідомлення';
|
$PHPMAILER_LANG['empty_message'] = 'Пусте повідомлення';
|
||||||
$PHPMAILER_LANG['invalid_address'] = 'Не відправлено через невірний формат email-адреси: ';
|
$PHPMAILER_LANG['invalid_address'] = 'Не відправлено через неправильний формат email-адреси: ';
|
||||||
$PHPMAILER_LANG['signing'] = 'Помилка підпису: ';
|
$PHPMAILER_LANG['signing'] = 'Помилка підпису: ';
|
||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання з SMTP-сервером';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання з SMTP-сервером';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: ';
|
$PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: ';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vietnamese (Tiếng Việt) PHPMailer language file: refer to English translation for definitive list.
|
* Vietnamese (Tiếng Việt) PHPMailer language file: refer to English translation for definitive list.
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Traditional Chinese PHPMailer language file: refer to English translation for definitive list
|
* Traditional Chinese PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simplified Chinese PHPMailer language file: refer to English translation for definitive list
|
* Simplified Chinese PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
|
|||||||
3
vendor/phpmailer/phpmailer/src/Exception.php
vendored
3
vendor/phpmailer/phpmailer/src/Exception.php
vendored
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPMailer Exception class.
|
* PHPMailer Exception class.
|
||||||
* PHP Version 5.5.
|
* PHP Version 5.5.
|
||||||
@@ -34,6 +35,6 @@ class Exception extends \Exception
|
|||||||
*/
|
*/
|
||||||
public function errorMessage()
|
public function errorMessage()
|
||||||
{
|
{
|
||||||
return '<strong>' . htmlspecialchars($this->getMessage()) . "</strong><br />\n";
|
return '<strong>' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . "</strong><br />\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1
vendor/phpmailer/phpmailer/src/OAuth.php
vendored
1
vendor/phpmailer/phpmailer/src/OAuth.php
vendored
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPMailer - PHP email creation and transport class.
|
* PHPMailer - PHP email creation and transport class.
|
||||||
* PHP Version 5.5.
|
* PHP Version 5.5.
|
||||||
|
|||||||
351
vendor/phpmailer/phpmailer/src/PHPMailer.php
vendored
351
vendor/phpmailer/phpmailer/src/PHPMailer.php
vendored
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPMailer - PHP email creation and transport class.
|
* PHPMailer - PHP email creation and transport class.
|
||||||
* PHP Version 5.5.
|
* PHP Version 5.5.
|
||||||
@@ -102,14 +103,14 @@ class PHPMailer
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $From = 'root@localhost';
|
public $From = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The From name of the message.
|
* The From name of the message.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $FromName = 'Root User';
|
public $FromName = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The envelope sender of the message.
|
* The envelope sender of the message.
|
||||||
@@ -388,11 +389,11 @@ class PHPMailer
|
|||||||
* SMTP class debug output mode.
|
* SMTP class debug output mode.
|
||||||
* Debug output level.
|
* Debug output level.
|
||||||
* Options:
|
* Options:
|
||||||
* * SMTP::DEBUG_OFF: No output
|
* @see SMTP::DEBUG_OFF: No output
|
||||||
* * SMTP::DEBUG_CLIENT: Client messages
|
* @see SMTP::DEBUG_CLIENT: Client messages
|
||||||
* * SMTP::DEBUG_SERVER: Client and server messages
|
* @see SMTP::DEBUG_SERVER: Client and server messages
|
||||||
* * SMTP::DEBUG_CONNECTION: As SERVER plus connection status
|
* @see SMTP::DEBUG_CONNECTION: As SERVER plus connection status
|
||||||
* * SMTP::DEBUG_LOWLEVEL: Noisy, low-level data output, rarely needed
|
* @see SMTP::DEBUG_LOWLEVEL: Noisy, low-level data output, rarely needed
|
||||||
*
|
*
|
||||||
* @see SMTP::$do_debug
|
* @see SMTP::$do_debug
|
||||||
*
|
*
|
||||||
@@ -427,9 +428,11 @@ class PHPMailer
|
|||||||
public $Debugoutput = 'echo';
|
public $Debugoutput = 'echo';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether to keep SMTP connection open after each message.
|
* Whether to keep the SMTP connection open after each message.
|
||||||
* If this is set to true then to close the connection
|
* If this is set to true then the connection will remain open after a send,
|
||||||
* requires an explicit call to smtpClose().
|
* and closing the connection will require an explicit call to smtpClose().
|
||||||
|
* It's a good idea to use this if you are sending multiple messages as it reduces overhead.
|
||||||
|
* See the mailing list example for how to use it.
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
@@ -686,7 +689,7 @@ class PHPMailer
|
|||||||
protected $boundary = [];
|
protected $boundary = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The array of available languages.
|
* The array of available text strings for the current language.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
@@ -747,7 +750,7 @@ class PHPMailer
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const VERSION = '6.1.8';
|
const VERSION = '6.5.1';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Error severity: message only, continue processing.
|
* Error severity: message only, continue processing.
|
||||||
@@ -861,18 +864,25 @@ class PHPMailer
|
|||||||
$subject = $this->encodeHeader($this->secureHeader($subject));
|
$subject = $this->encodeHeader($this->secureHeader($subject));
|
||||||
}
|
}
|
||||||
//Calling mail() with null params breaks
|
//Calling mail() with null params breaks
|
||||||
|
$this->edebug('Sending with mail()');
|
||||||
|
$this->edebug('Sendmail path: ' . ini_get('sendmail_path'));
|
||||||
|
$this->edebug("Envelope sender: {$this->Sender}");
|
||||||
|
$this->edebug("To: {$to}");
|
||||||
|
$this->edebug("Subject: {$subject}");
|
||||||
|
$this->edebug("Headers: {$header}");
|
||||||
if (!$this->UseSendmailOptions || null === $params) {
|
if (!$this->UseSendmailOptions || null === $params) {
|
||||||
$result = @mail($to, $subject, $body, $header);
|
$result = @mail($to, $subject, $body, $header);
|
||||||
} else {
|
} else {
|
||||||
|
$this->edebug("Additional params: {$params}");
|
||||||
$result = @mail($to, $subject, $body, $header, $params);
|
$result = @mail($to, $subject, $body, $header, $params);
|
||||||
}
|
}
|
||||||
|
$this->edebug('Result: ' . ($result ? 'true' : 'false'));
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output debugging info via user-defined method.
|
* Output debugging info via a user-defined method.
|
||||||
* Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).
|
* Only generates output if debug output is enabled.
|
||||||
*
|
*
|
||||||
* @see PHPMailer::$Debugoutput
|
* @see PHPMailer::$Debugoutput
|
||||||
* @see PHPMailer::$SMTPDebug
|
* @see PHPMailer::$SMTPDebug
|
||||||
@@ -1178,16 +1188,35 @@ class PHPMailer
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function parseAddresses($addrstr, $useimap = true)
|
public static function parseAddresses($addrstr, $useimap = true, $charset = self::CHARSET_ISO88591)
|
||||||
{
|
{
|
||||||
$addresses = [];
|
$addresses = [];
|
||||||
if ($useimap && function_exists('imap_rfc822_parse_adrlist')) {
|
if ($useimap && function_exists('imap_rfc822_parse_adrlist')) {
|
||||||
//Use this built-in parser if it's available
|
//Use this built-in parser if it's available
|
||||||
$list = imap_rfc822_parse_adrlist($addrstr, '');
|
$list = imap_rfc822_parse_adrlist($addrstr, '');
|
||||||
|
// Clear any potential IMAP errors to get rid of notices being thrown at end of script.
|
||||||
|
imap_errors();
|
||||||
foreach ($list as $address) {
|
foreach ($list as $address) {
|
||||||
if (('.SYNTAX-ERROR.' !== $address->host) && static::validateAddress(
|
if (
|
||||||
$address->mailbox . '@' . $address->host
|
'.SYNTAX-ERROR.' !== $address->host &&
|
||||||
)) {
|
static::validateAddress($address->mailbox . '@' . $address->host)
|
||||||
|
) {
|
||||||
|
//Decode the name part if it's present and encoded
|
||||||
|
if (
|
||||||
|
property_exists($address, 'personal') &&
|
||||||
|
//Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled
|
||||||
|
defined('MB_CASE_UPPER') &&
|
||||||
|
preg_match('/^=\?.*\?=$/s', $address->personal)
|
||||||
|
) {
|
||||||
|
$origCharset = mb_internal_encoding();
|
||||||
|
mb_internal_encoding($charset);
|
||||||
|
//Undo any RFC2047-encoded spaces-as-underscores
|
||||||
|
$address->personal = str_replace('_', '=20', $address->personal);
|
||||||
|
//Decode the name
|
||||||
|
$address->personal = mb_decode_mimeheader($address->personal);
|
||||||
|
mb_internal_encoding($origCharset);
|
||||||
|
}
|
||||||
|
|
||||||
$addresses[] = [
|
$addresses[] = [
|
||||||
'name' => (property_exists($address, 'personal') ? $address->personal : ''),
|
'name' => (property_exists($address, 'personal') ? $address->personal : ''),
|
||||||
'address' => $address->mailbox . '@' . $address->host,
|
'address' => $address->mailbox . '@' . $address->host,
|
||||||
@@ -1211,9 +1240,22 @@ class PHPMailer
|
|||||||
} else {
|
} else {
|
||||||
list($name, $email) = explode('<', $address);
|
list($name, $email) = explode('<', $address);
|
||||||
$email = trim(str_replace('>', '', $email));
|
$email = trim(str_replace('>', '', $email));
|
||||||
|
$name = trim($name);
|
||||||
if (static::validateAddress($email)) {
|
if (static::validateAddress($email)) {
|
||||||
|
//Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled
|
||||||
|
//If this name is encoded, decode it
|
||||||
|
if (defined('MB_CASE_UPPER') && preg_match('/^=\?.*\?=$/s', $name)) {
|
||||||
|
$origCharset = mb_internal_encoding();
|
||||||
|
mb_internal_encoding($charset);
|
||||||
|
//Undo any RFC2047-encoded spaces-as-underscores
|
||||||
|
$name = str_replace('_', '=20', $name);
|
||||||
|
//Decode the name
|
||||||
|
$name = mb_decode_mimeheader($name);
|
||||||
|
mb_internal_encoding($origCharset);
|
||||||
|
}
|
||||||
$addresses[] = [
|
$addresses[] = [
|
||||||
'name' => trim(str_replace(['"', "'"], '', $name)),
|
//Remove any surrounding quotes and spaces from the name
|
||||||
|
'name' => trim($name, '\'" '),
|
||||||
'address' => $email,
|
'address' => $email,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -1241,7 +1283,8 @@ class PHPMailer
|
|||||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||||
//Don't validate now addresses with IDN. Will be done in send().
|
//Don't validate now addresses with IDN. Will be done in send().
|
||||||
$pos = strrpos($address, '@');
|
$pos = strrpos($address, '@');
|
||||||
if ((false === $pos)
|
if (
|
||||||
|
(false === $pos)
|
||||||
|| ((!$this->has8bitChars(substr($address, ++$pos)) || !static::idnSupported())
|
|| ((!$this->has8bitChars(substr($address, ++$pos)) || !static::idnSupported())
|
||||||
&& !static::validateAddress($address))
|
&& !static::validateAddress($address))
|
||||||
) {
|
) {
|
||||||
@@ -1309,7 +1352,8 @@ class PHPMailer
|
|||||||
if (null === $patternselect) {
|
if (null === $patternselect) {
|
||||||
$patternselect = static::$validator;
|
$patternselect = static::$validator;
|
||||||
}
|
}
|
||||||
if (is_callable($patternselect)) {
|
//Don't allow strings as callables, see SECURITY.md and CVE-2021-3603
|
||||||
|
if (is_callable($patternselect) && !is_string($patternselect)) {
|
||||||
return call_user_func($patternselect, $address);
|
return call_user_func($patternselect, $address);
|
||||||
}
|
}
|
||||||
//Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
|
//Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
|
||||||
@@ -1393,21 +1437,26 @@ class PHPMailer
|
|||||||
{
|
{
|
||||||
//Verify we have required functions, CharSet, and at-sign.
|
//Verify we have required functions, CharSet, and at-sign.
|
||||||
$pos = strrpos($address, '@');
|
$pos = strrpos($address, '@');
|
||||||
if (!empty($this->CharSet) &&
|
if (
|
||||||
|
!empty($this->CharSet) &&
|
||||||
false !== $pos &&
|
false !== $pos &&
|
||||||
static::idnSupported()
|
static::idnSupported()
|
||||||
) {
|
) {
|
||||||
$domain = substr($address, ++$pos);
|
$domain = substr($address, ++$pos);
|
||||||
//Verify CharSet string is a valid one, and domain properly encoded in this CharSet.
|
//Verify CharSet string is a valid one, and domain properly encoded in this CharSet.
|
||||||
if ($this->has8bitChars($domain) && @mb_check_encoding($domain, $this->CharSet)) {
|
if ($this->has8bitChars($domain) && @mb_check_encoding($domain, $this->CharSet)) {
|
||||||
$domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet);
|
//Convert the domain from whatever charset it's in to UTF-8
|
||||||
|
$domain = mb_convert_encoding($domain, self::CHARSET_UTF8, $this->CharSet);
|
||||||
//Ignore IDE complaints about this line - method signature changed in PHP 5.4
|
//Ignore IDE complaints about this line - method signature changed in PHP 5.4
|
||||||
$errorcode = 0;
|
$errorcode = 0;
|
||||||
if (defined('INTL_IDNA_VARIANT_UTS46')) {
|
if (defined('INTL_IDNA_VARIANT_UTS46')) {
|
||||||
$punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_UTS46);
|
//Use the current punycode standard (appeared in PHP 7.2)
|
||||||
|
$punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_UTS46);
|
||||||
} elseif (defined('INTL_IDNA_VARIANT_2003')) {
|
} elseif (defined('INTL_IDNA_VARIANT_2003')) {
|
||||||
$punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_2003);
|
//Fall back to this old, deprecated/removed encoding
|
||||||
|
$punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_2003);
|
||||||
} else {
|
} else {
|
||||||
|
//Fall back to a default we don't know about
|
||||||
$punycode = idn_to_ascii($domain, $errorcode);
|
$punycode = idn_to_ascii($domain, $errorcode);
|
||||||
}
|
}
|
||||||
if (false !== $punycode) {
|
if (false !== $punycode) {
|
||||||
@@ -1455,8 +1504,9 @@ class PHPMailer
|
|||||||
*/
|
*/
|
||||||
public function preSend()
|
public function preSend()
|
||||||
{
|
{
|
||||||
if ('smtp' === $this->Mailer
|
if (
|
||||||
|| ('mail' === $this->Mailer && stripos(PHP_OS, 'WIN') === 0)
|
'smtp' === $this->Mailer
|
||||||
|
|| ('mail' === $this->Mailer && (\PHP_VERSION_ID >= 80000 || stripos(PHP_OS, 'WIN') === 0))
|
||||||
) {
|
) {
|
||||||
//SMTP mandates RFC-compliant line endings
|
//SMTP mandates RFC-compliant line endings
|
||||||
//and it's also used with mail() on Windows
|
//and it's also used with mail() on Windows
|
||||||
@@ -1466,18 +1516,14 @@ class PHPMailer
|
|||||||
static::setLE(PHP_EOL);
|
static::setLE(PHP_EOL);
|
||||||
}
|
}
|
||||||
//Check for buggy PHP versions that add a header with an incorrect line break
|
//Check for buggy PHP versions that add a header with an incorrect line break
|
||||||
if ('mail' === $this->Mailer
|
if (
|
||||||
&& ((PHP_VERSION_ID >= 70000 && PHP_VERSION_ID < 70017)
|
'mail' === $this->Mailer
|
||||||
|| (PHP_VERSION_ID >= 70100 && PHP_VERSION_ID < 70103))
|
&& ((\PHP_VERSION_ID >= 70000 && \PHP_VERSION_ID < 70017)
|
||||||
|
|| (\PHP_VERSION_ID >= 70100 && \PHP_VERSION_ID < 70103))
|
||||||
&& ini_get('mail.add_x_header') === '1'
|
&& ini_get('mail.add_x_header') === '1'
|
||||||
&& stripos(PHP_OS, 'WIN') === 0
|
&& stripos(PHP_OS, 'WIN') === 0
|
||||||
) {
|
) {
|
||||||
trigger_error(
|
trigger_error($this->lang('buggy_php'), E_USER_WARNING);
|
||||||
'Your version of PHP is affected by a bug that may result in corrupted messages.' .
|
|
||||||
' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' .
|
|
||||||
' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.',
|
|
||||||
E_USER_WARNING
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -1553,7 +1599,8 @@ class PHPMailer
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Sign with DKIM if enabled
|
//Sign with DKIM if enabled
|
||||||
if (!empty($this->DKIM_domain)
|
if (
|
||||||
|
!empty($this->DKIM_domain)
|
||||||
&& !empty($this->DKIM_selector)
|
&& !empty($this->DKIM_selector)
|
||||||
&& (!empty($this->DKIM_private_string)
|
&& (!empty($this->DKIM_private_string)
|
||||||
|| (!empty($this->DKIM_private)
|
|| (!empty($this->DKIM_private)
|
||||||
@@ -1637,22 +1684,44 @@ class PHPMailer
|
|||||||
*/
|
*/
|
||||||
protected function sendmailSend($header, $body)
|
protected function sendmailSend($header, $body)
|
||||||
{
|
{
|
||||||
|
if ($this->Mailer === 'qmail') {
|
||||||
|
$this->edebug('Sending with qmail');
|
||||||
|
} else {
|
||||||
|
$this->edebug('Sending with sendmail');
|
||||||
|
}
|
||||||
$header = static::stripTrailingWSP($header) . static::$LE . static::$LE;
|
$header = static::stripTrailingWSP($header) . static::$LE . static::$LE;
|
||||||
|
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
|
||||||
|
//A space after `-f` is optional, but there is a long history of its presence
|
||||||
|
//causing problems, so we don't use one
|
||||||
|
//Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html
|
||||||
|
//Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html
|
||||||
|
//Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
|
||||||
|
//Example problem: https://www.drupal.org/node/1057954
|
||||||
|
if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) {
|
||||||
|
//PHP config has a sender address we can use
|
||||||
|
$this->Sender = ini_get('sendmail_from');
|
||||||
|
}
|
||||||
//CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
|
//CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
|
||||||
if (!empty($this->Sender) && self::isShellSafe($this->Sender)) {
|
if (!empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) {
|
||||||
if ('qmail' === $this->Mailer) {
|
if ($this->Mailer === 'qmail') {
|
||||||
$sendmailFmt = '%s -f%s';
|
$sendmailFmt = '%s -f%s';
|
||||||
} else {
|
} else {
|
||||||
$sendmailFmt = '%s -oi -f%s -t';
|
$sendmailFmt = '%s -oi -f%s -t';
|
||||||
}
|
}
|
||||||
} elseif ('qmail' === $this->Mailer) {
|
|
||||||
$sendmailFmt = '%s';
|
|
||||||
} else {
|
} else {
|
||||||
|
//allow sendmail to choose a default envelope sender. It may
|
||||||
|
//seem preferable to force it to use the From header as with
|
||||||
|
//SMTP, but that introduces new problems (see
|
||||||
|
//<https://github.com/PHPMailer/PHPMailer/issues/2298>), and
|
||||||
|
//it has historically worked this way.
|
||||||
$sendmailFmt = '%s -oi -t';
|
$sendmailFmt = '%s -oi -t';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender);
|
$sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender);
|
||||||
|
$this->edebug('Sendmail path: ' . $this->Sendmail);
|
||||||
|
$this->edebug('Sendmail command: ' . $sendmail);
|
||||||
|
$this->edebug('Envelope sender: ' . $this->Sender);
|
||||||
|
$this->edebug("Headers: {$header}");
|
||||||
|
|
||||||
if ($this->SingleTo) {
|
if ($this->SingleTo) {
|
||||||
foreach ($this->SingleToArray as $toAddr) {
|
foreach ($this->SingleToArray as $toAddr) {
|
||||||
@@ -1660,13 +1729,15 @@ class PHPMailer
|
|||||||
if (!$mail) {
|
if (!$mail) {
|
||||||
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
|
$this->edebug("To: {$toAddr}");
|
||||||
fwrite($mail, 'To: ' . $toAddr . "\n");
|
fwrite($mail, 'To: ' . $toAddr . "\n");
|
||||||
fwrite($mail, $header);
|
fwrite($mail, $header);
|
||||||
fwrite($mail, $body);
|
fwrite($mail, $body);
|
||||||
$result = pclose($mail);
|
$result = pclose($mail);
|
||||||
|
$addrinfo = static::parseAddresses($toAddr, true, $this->charSet);
|
||||||
$this->doCallback(
|
$this->doCallback(
|
||||||
($result === 0),
|
($result === 0),
|
||||||
[$toAddr],
|
[[$addrinfo['address'], $addrinfo['name']]],
|
||||||
$this->cc,
|
$this->cc,
|
||||||
$this->bcc,
|
$this->bcc,
|
||||||
$this->Subject,
|
$this->Subject,
|
||||||
@@ -1674,6 +1745,7 @@ class PHPMailer
|
|||||||
$this->From,
|
$this->From,
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
$this->edebug("Result: " . ($result === 0 ? 'true' : 'false'));
|
||||||
if (0 !== $result) {
|
if (0 !== $result) {
|
||||||
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
@@ -1696,6 +1768,7 @@ class PHPMailer
|
|||||||
$this->From,
|
$this->From,
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
$this->edebug("Result: " . ($result === 0 ? 'true' : 'false'));
|
||||||
if (0 !== $result) {
|
if (0 !== $result) {
|
||||||
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
@@ -1717,7 +1790,8 @@ class PHPMailer
|
|||||||
protected static function isShellSafe($string)
|
protected static function isShellSafe($string)
|
||||||
{
|
{
|
||||||
//Future-proof
|
//Future-proof
|
||||||
if (escapeshellcmd($string) !== $string
|
if (
|
||||||
|
escapeshellcmd($string) !== $string
|
||||||
|| !in_array(escapeshellarg($string), ["'$string'", "\"$string\""])
|
|| !in_array(escapeshellarg($string), ["'$string'", "\"$string\""])
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
@@ -1750,7 +1824,8 @@ class PHPMailer
|
|||||||
*/
|
*/
|
||||||
protected static function isPermittedPath($path)
|
protected static function isPermittedPath($path)
|
||||||
{
|
{
|
||||||
return !preg_match('#^[a-z]+://#i', $path);
|
//Matches scheme definition from https://tools.ietf.org/html/rfc3986#section-3.1
|
||||||
|
return !preg_match('#^[a-z][a-z\d+.-]*://#i', $path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1762,12 +1837,15 @@ class PHPMailer
|
|||||||
*/
|
*/
|
||||||
protected static function fileIsAccessible($path)
|
protected static function fileIsAccessible($path)
|
||||||
{
|
{
|
||||||
|
if (!static::isPermittedPath($path)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$readable = file_exists($path);
|
$readable = file_exists($path);
|
||||||
//If not a UNC path (expected to start with \\), check read permission, see #2069
|
//If not a UNC path (expected to start with \\), check read permission, see #2069
|
||||||
if (strpos($path, '\\\\') !== 0) {
|
if (strpos($path, '\\\\') !== 0) {
|
||||||
$readable = $readable && is_readable($path);
|
$readable = $readable && is_readable($path);
|
||||||
}
|
}
|
||||||
return static::isPermittedPath($path) && $readable;
|
return $readable;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1801,10 +1879,14 @@ class PHPMailer
|
|||||||
//Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
|
//Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
|
||||||
//Example problem: https://www.drupal.org/node/1057954
|
//Example problem: https://www.drupal.org/node/1057954
|
||||||
//CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
|
//CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
|
||||||
if (!empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) {
|
if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) {
|
||||||
$params = sprintf('-f%s', $this->Sender);
|
//PHP config has a sender address we can use
|
||||||
|
$this->Sender = ini_get('sendmail_from');
|
||||||
}
|
}
|
||||||
if (!empty($this->Sender) && static::validateAddress($this->Sender)) {
|
if (!empty($this->Sender) && static::validateAddress($this->Sender)) {
|
||||||
|
if (self::isShellSafe($this->Sender)) {
|
||||||
|
$params = sprintf('-f%s', $this->Sender);
|
||||||
|
}
|
||||||
$old_from = ini_get('sendmail_from');
|
$old_from = ini_get('sendmail_from');
|
||||||
ini_set('sendmail_from', $this->Sender);
|
ini_set('sendmail_from', $this->Sender);
|
||||||
}
|
}
|
||||||
@@ -1812,7 +1894,17 @@ class PHPMailer
|
|||||||
if ($this->SingleTo && count($toArr) > 1) {
|
if ($this->SingleTo && count($toArr) > 1) {
|
||||||
foreach ($toArr as $toAddr) {
|
foreach ($toArr as $toAddr) {
|
||||||
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
|
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
|
||||||
$this->doCallback($result, [$toAddr], $this->cc, $this->bcc, $this->Subject, $body, $this->From, []);
|
$addrinfo = static::parseAddresses($toAddr, true, $this->charSet);
|
||||||
|
$this->doCallback(
|
||||||
|
$result,
|
||||||
|
[[$addrinfo['address'], $addrinfo['name']]],
|
||||||
|
$this->cc,
|
||||||
|
$this->bcc,
|
||||||
|
$this->Subject,
|
||||||
|
$body,
|
||||||
|
$this->From,
|
||||||
|
[]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$result = $this->mailPassthru($to, $this->Subject, $body, $header, $params);
|
$result = $this->mailPassthru($to, $this->Subject, $body, $header, $params);
|
||||||
@@ -1901,7 +1993,7 @@ class PHPMailer
|
|||||||
$isSent = true;
|
$isSent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$callbacks[] = ['issent'=>$isSent, 'to'=>$to[0]];
|
$callbacks[] = ['issent' => $isSent, 'to' => $to[0], 'name' => $to[1]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1922,7 +2014,7 @@ class PHPMailer
|
|||||||
foreach ($callbacks as $cb) {
|
foreach ($callbacks as $cb) {
|
||||||
$this->doCallback(
|
$this->doCallback(
|
||||||
$cb['issent'],
|
$cb['issent'],
|
||||||
[$cb['to']],
|
[[$cb['to'], $cb['name']]],
|
||||||
[],
|
[],
|
||||||
[],
|
[],
|
||||||
$this->Subject,
|
$this->Subject,
|
||||||
@@ -1981,11 +2073,13 @@ class PHPMailer
|
|||||||
|
|
||||||
foreach ($hosts as $hostentry) {
|
foreach ($hosts as $hostentry) {
|
||||||
$hostinfo = [];
|
$hostinfo = [];
|
||||||
if (!preg_match(
|
if (
|
||||||
|
!preg_match(
|
||||||
'/^(?:(ssl|tls):\/\/)?(.+?)(?::(\d+))?$/',
|
'/^(?:(ssl|tls):\/\/)?(.+?)(?::(\d+))?$/',
|
||||||
trim($hostentry),
|
trim($hostentry),
|
||||||
$hostinfo
|
$hostinfo
|
||||||
)) {
|
)
|
||||||
|
) {
|
||||||
$this->edebug($this->lang('invalid_hostentry') . ' ' . trim($hostentry));
|
$this->edebug($this->lang('invalid_hostentry') . ' ' . trim($hostentry));
|
||||||
//Not a valid host entry
|
//Not a valid host entry
|
||||||
continue;
|
continue;
|
||||||
@@ -2010,7 +2104,7 @@ class PHPMailer
|
|||||||
$secure = static::ENCRYPTION_SMTPS;
|
$secure = static::ENCRYPTION_SMTPS;
|
||||||
} elseif ('tls' === $hostinfo[1]) {
|
} elseif ('tls' === $hostinfo[1]) {
|
||||||
$tls = true;
|
$tls = true;
|
||||||
// tls doesn't use a prefix
|
//TLS doesn't use a prefix
|
||||||
$secure = static::ENCRYPTION_STARTTLS;
|
$secure = static::ENCRYPTION_STARTTLS;
|
||||||
}
|
}
|
||||||
//Do we need the OpenSSL extension?
|
//Do we need the OpenSSL extension?
|
||||||
@@ -2054,12 +2148,14 @@ class PHPMailer
|
|||||||
//We must resend EHLO after TLS negotiation
|
//We must resend EHLO after TLS negotiation
|
||||||
$this->smtp->hello($hello);
|
$this->smtp->hello($hello);
|
||||||
}
|
}
|
||||||
if ($this->SMTPAuth && !$this->smtp->authenticate(
|
if (
|
||||||
|
$this->SMTPAuth && !$this->smtp->authenticate(
|
||||||
$this->Username,
|
$this->Username,
|
||||||
$this->Password,
|
$this->Password,
|
||||||
$this->AuthType,
|
$this->AuthType,
|
||||||
$this->oauth
|
$this->oauth
|
||||||
)) {
|
)
|
||||||
|
) {
|
||||||
throw new Exception($this->lang('authenticate'));
|
throw new Exception($this->lang('authenticate'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2095,13 +2191,15 @@ class PHPMailer
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the language for error messages.
|
* Set the language for error messages.
|
||||||
* Returns false if it cannot load the language file.
|
|
||||||
* The default language is English.
|
* The default language is English.
|
||||||
*
|
*
|
||||||
* @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr")
|
* @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr")
|
||||||
* @param string $lang_path Path to the language file directory, with trailing separator (slash)
|
* Optionally, the language code can be enhanced with a 4-character
|
||||||
|
* script annotation and/or a 2-character country annotation.
|
||||||
|
* @param string $lang_path Path to the language file directory, with trailing separator (slash).D
|
||||||
|
* Do not set this from user input!
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool Returns true if the requested language was loaded, false otherwise.
|
||||||
*/
|
*/
|
||||||
public function setLanguage($langcode = 'en', $lang_path = '')
|
public function setLanguage($langcode = 'en', $lang_path = '')
|
||||||
{
|
{
|
||||||
@@ -2117,58 +2215,109 @@ class PHPMailer
|
|||||||
'am' => 'hy',
|
'am' => 'hy',
|
||||||
];
|
];
|
||||||
|
|
||||||
if (isset($renamed_langcodes[$langcode])) {
|
if (array_key_exists($langcode, $renamed_langcodes)) {
|
||||||
$langcode = $renamed_langcodes[$langcode];
|
$langcode = $renamed_langcodes[$langcode];
|
||||||
}
|
}
|
||||||
|
|
||||||
//Define full set of translatable strings in English
|
//Define full set of translatable strings in English
|
||||||
$PHPMAILER_LANG = [
|
$PHPMAILER_LANG = [
|
||||||
'authenticate' => 'SMTP Error: Could not authenticate.',
|
'authenticate' => 'SMTP Error: Could not authenticate.',
|
||||||
|
'buggy_php' => 'Your version of PHP is affected by a bug that may result in corrupted messages.' .
|
||||||
|
' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' .
|
||||||
|
' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.',
|
||||||
'connect_host' => 'SMTP Error: Could not connect to SMTP host.',
|
'connect_host' => 'SMTP Error: Could not connect to SMTP host.',
|
||||||
'data_not_accepted' => 'SMTP Error: data not accepted.',
|
'data_not_accepted' => 'SMTP Error: data not accepted.',
|
||||||
'empty_message' => 'Message body empty',
|
'empty_message' => 'Message body empty',
|
||||||
'encoding' => 'Unknown encoding: ',
|
'encoding' => 'Unknown encoding: ',
|
||||||
'execute' => 'Could not execute: ',
|
'execute' => 'Could not execute: ',
|
||||||
|
'extension_missing' => 'Extension missing: ',
|
||||||
'file_access' => 'Could not access file: ',
|
'file_access' => 'Could not access file: ',
|
||||||
'file_open' => 'File Error: Could not open file: ',
|
'file_open' => 'File Error: Could not open file: ',
|
||||||
'from_failed' => 'The following From address failed: ',
|
'from_failed' => 'The following From address failed: ',
|
||||||
'instantiate' => 'Could not instantiate mail function.',
|
'instantiate' => 'Could not instantiate mail function.',
|
||||||
'invalid_address' => 'Invalid address: ',
|
'invalid_address' => 'Invalid address: ',
|
||||||
|
'invalid_header' => 'Invalid header name or value',
|
||||||
'invalid_hostentry' => 'Invalid hostentry: ',
|
'invalid_hostentry' => 'Invalid hostentry: ',
|
||||||
'invalid_host' => 'Invalid host: ',
|
'invalid_host' => 'Invalid host: ',
|
||||||
'mailer_not_supported' => ' mailer is not supported.',
|
'mailer_not_supported' => ' mailer is not supported.',
|
||||||
'provide_address' => 'You must provide at least one recipient email address.',
|
'provide_address' => 'You must provide at least one recipient email address.',
|
||||||
'recipients_failed' => 'SMTP Error: The following recipients failed: ',
|
'recipients_failed' => 'SMTP Error: The following recipients failed: ',
|
||||||
'signing' => 'Signing Error: ',
|
'signing' => 'Signing Error: ',
|
||||||
|
'smtp_code' => 'SMTP code: ',
|
||||||
|
'smtp_code_ex' => 'Additional SMTP info: ',
|
||||||
'smtp_connect_failed' => 'SMTP connect() failed.',
|
'smtp_connect_failed' => 'SMTP connect() failed.',
|
||||||
|
'smtp_detail' => 'Detail: ',
|
||||||
'smtp_error' => 'SMTP server error: ',
|
'smtp_error' => 'SMTP server error: ',
|
||||||
'variable_set' => 'Cannot set or reset variable: ',
|
'variable_set' => 'Cannot set or reset variable: ',
|
||||||
'extension_missing' => 'Extension missing: ',
|
|
||||||
];
|
];
|
||||||
if (empty($lang_path)) {
|
if (empty($lang_path)) {
|
||||||
//Calculate an absolute path so it can work if CWD is not here
|
//Calculate an absolute path so it can work if CWD is not here
|
||||||
$lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR;
|
$lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Validate $langcode
|
//Validate $langcode
|
||||||
if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) {
|
$foundlang = true;
|
||||||
|
$langcode = strtolower($langcode);
|
||||||
|
if (
|
||||||
|
!preg_match('/^(?P<lang>[a-z]{2})(?P<script>_[a-z]{4})?(?P<country>_[a-z]{2})?$/', $langcode, $matches)
|
||||||
|
&& $langcode !== 'en'
|
||||||
|
) {
|
||||||
|
$foundlang = false;
|
||||||
$langcode = 'en';
|
$langcode = 'en';
|
||||||
}
|
}
|
||||||
$foundlang = true;
|
|
||||||
$lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
|
|
||||||
//There is no English translation file
|
//There is no English translation file
|
||||||
if ('en' !== $langcode) {
|
if ('en' !== $langcode) {
|
||||||
// Make sure language file path is readable
|
$langcodes = [];
|
||||||
if (!static::fileIsAccessible($lang_file)) {
|
if (!empty($matches['script']) && !empty($matches['country'])) {
|
||||||
|
$langcodes[] = $matches['lang'] . $matches['script'] . $matches['country'];
|
||||||
|
}
|
||||||
|
if (!empty($matches['country'])) {
|
||||||
|
$langcodes[] = $matches['lang'] . $matches['country'];
|
||||||
|
}
|
||||||
|
if (!empty($matches['script'])) {
|
||||||
|
$langcodes[] = $matches['lang'] . $matches['script'];
|
||||||
|
}
|
||||||
|
$langcodes[] = $matches['lang'];
|
||||||
|
|
||||||
|
//Try and find a readable language file for the requested language.
|
||||||
|
$foundFile = false;
|
||||||
|
foreach ($langcodes as $code) {
|
||||||
|
$lang_file = $lang_path . 'phpmailer.lang-' . $code . '.php';
|
||||||
|
if (static::fileIsAccessible($lang_file)) {
|
||||||
|
$foundFile = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($foundFile === false) {
|
||||||
$foundlang = false;
|
$foundlang = false;
|
||||||
} else {
|
} else {
|
||||||
// Overwrite language-specific strings.
|
$lines = file($lang_file);
|
||||||
// This way we'll never have missing translation keys.
|
foreach ($lines as $line) {
|
||||||
$foundlang = include $lang_file;
|
//Translation file lines look like this:
|
||||||
|
//$PHPMAILER_LANG['authenticate'] = 'SMTP-Fehler: Authentifizierung fehlgeschlagen.';
|
||||||
|
//These files are parsed as text and not PHP so as to avoid the possibility of code injection
|
||||||
|
//See https://blog.stevenlevithan.com/archives/match-quoted-string
|
||||||
|
$matches = [];
|
||||||
|
if (
|
||||||
|
preg_match(
|
||||||
|
'/^\$PHPMAILER_LANG\[\'([a-z\d_]+)\'\]\s*=\s*(["\'])(.+)*?\2;/',
|
||||||
|
$line,
|
||||||
|
$matches
|
||||||
|
) &&
|
||||||
|
//Ignore unknown translation keys
|
||||||
|
array_key_exists($matches[1], $PHPMAILER_LANG)
|
||||||
|
) {
|
||||||
|
//Overwrite language-specific strings so we'll never have missing translation keys.
|
||||||
|
$PHPMAILER_LANG[$matches[1]] = (string)$matches[3];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->language = $PHPMAILER_LANG;
|
$this->language = $PHPMAILER_LANG;
|
||||||
|
|
||||||
return (bool) $foundlang; // Returns false if language not found
|
return $foundlang; //Returns false if language not found
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2178,6 +2327,10 @@ class PHPMailer
|
|||||||
*/
|
*/
|
||||||
public function getTranslations()
|
public function getTranslations()
|
||||||
{
|
{
|
||||||
|
if (empty($this->language)) {
|
||||||
|
$this->setLanguage(); // Set the default language.
|
||||||
|
}
|
||||||
|
|
||||||
return $this->language;
|
return $this->language;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2426,7 +2579,8 @@ class PHPMailer
|
|||||||
}
|
}
|
||||||
|
|
||||||
//sendmail and mail() extract Bcc from the header before sending
|
//sendmail and mail() extract Bcc from the header before sending
|
||||||
if ((
|
if (
|
||||||
|
(
|
||||||
'sendmail' === $this->Mailer || 'qmail' === $this->Mailer || 'mail' === $this->Mailer
|
'sendmail' === $this->Mailer || 'qmail' === $this->Mailer || 'mail' === $this->Mailer
|
||||||
)
|
)
|
||||||
&& count($this->bcc) > 0
|
&& count($this->bcc) > 0
|
||||||
@@ -2445,7 +2599,17 @@ class PHPMailer
|
|||||||
|
|
||||||
//Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4
|
//Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4
|
||||||
//https://tools.ietf.org/html/rfc5322#section-3.6.4
|
//https://tools.ietf.org/html/rfc5322#section-3.6.4
|
||||||
if ('' !== $this->MessageID && preg_match('/^<.*@.*>$/', $this->MessageID)) {
|
if (
|
||||||
|
'' !== $this->MessageID &&
|
||||||
|
preg_match(
|
||||||
|
'/^<((([a-z\d!#$%&\'*+\/=?^_`{|}~-]+(\.[a-z\d!#$%&\'*+\/=?^_`{|}~-]+)*)' .
|
||||||
|
'|("(([\x01-\x08\x0B\x0C\x0E-\x1F\x7F]|[\x21\x23-\x5B\x5D-\x7E])' .
|
||||||
|
'|(\\[\x01-\x09\x0B\x0C\x0E-\x7F]))*"))@(([a-z\d!#$%&\'*+\/=?^_`{|}~-]+' .
|
||||||
|
'(\.[a-z\d!#$%&\'*+\/=?^_`{|}~-]+)*)|(\[(([\x01-\x08\x0B\x0C\x0E-\x1F\x7F]' .
|
||||||
|
'|[\x21-\x5A\x5E-\x7E])|(\\[\x01-\x09\x0B\x0C\x0E-\x7F]))*\])))>$/Di',
|
||||||
|
$this->MessageID
|
||||||
|
)
|
||||||
|
) {
|
||||||
$this->lastMessageID = $this->MessageID;
|
$this->lastMessageID = $this->MessageID;
|
||||||
} else {
|
} else {
|
||||||
$this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname());
|
$this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname());
|
||||||
@@ -2530,10 +2694,6 @@ class PHPMailer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('mail' !== $this->Mailer) {
|
|
||||||
// $result .= static::$LE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3833,13 +3993,13 @@ class PHPMailer
|
|||||||
if (!empty($lasterror['error'])) {
|
if (!empty($lasterror['error'])) {
|
||||||
$msg .= $this->lang('smtp_error') . $lasterror['error'];
|
$msg .= $this->lang('smtp_error') . $lasterror['error'];
|
||||||
if (!empty($lasterror['detail'])) {
|
if (!empty($lasterror['detail'])) {
|
||||||
$msg .= ' Detail: ' . $lasterror['detail'];
|
$msg .= ' ' . $this->lang('smtp_detail') . $lasterror['detail'];
|
||||||
}
|
}
|
||||||
if (!empty($lasterror['smtp_code'])) {
|
if (!empty($lasterror['smtp_code'])) {
|
||||||
$msg .= ' SMTP code: ' . $lasterror['smtp_code'];
|
$msg .= ' ' . $this->lang('smtp_code') . $lasterror['smtp_code'];
|
||||||
}
|
}
|
||||||
if (!empty($lasterror['smtp_code_ex'])) {
|
if (!empty($lasterror['smtp_code_ex'])) {
|
||||||
$msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex'];
|
$msg .= ' ' . $this->lang('smtp_code_ex') . $lasterror['smtp_code_ex'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3896,10 +4056,11 @@ class PHPMailer
|
|||||||
public static function isValidHost($host)
|
public static function isValidHost($host)
|
||||||
{
|
{
|
||||||
//Simple syntax limits
|
//Simple syntax limits
|
||||||
if (empty($host)
|
if (
|
||||||
|
empty($host)
|
||||||
|| !is_string($host)
|
|| !is_string($host)
|
||||||
|| strlen($host) > 256
|
|| strlen($host) > 256
|
||||||
|| !preg_match('/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+])$/', $host)
|
|| !preg_match('/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+\])$/', $host)
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -3931,13 +4092,13 @@ class PHPMailer
|
|||||||
protected function lang($key)
|
protected function lang($key)
|
||||||
{
|
{
|
||||||
if (count($this->language) < 1) {
|
if (count($this->language) < 1) {
|
||||||
$this->setLanguage(); // set the default language
|
$this->setLanguage(); //Set the default language
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists($key, $this->language)) {
|
if (array_key_exists($key, $this->language)) {
|
||||||
if ('smtp_connect_failed' === $key) {
|
if ('smtp_connect_failed' === $key) {
|
||||||
//Include a link to troubleshooting docs on SMTP connection failure
|
//Include a link to troubleshooting docs on SMTP connection failure.
|
||||||
//this is by far the biggest cause of support questions
|
//This is by far the biggest cause of support questions
|
||||||
//but it's usually not PHPMailer's fault.
|
//but it's usually not PHPMailer's fault.
|
||||||
return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';
|
return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';
|
||||||
}
|
}
|
||||||
@@ -3976,11 +4137,11 @@ class PHPMailer
|
|||||||
list($name, $value) = explode(':', $name, 2);
|
list($name, $value) = explode(':', $name, 2);
|
||||||
}
|
}
|
||||||
$name = trim($name);
|
$name = trim($name);
|
||||||
$value = trim($value);
|
$value = (null === $value) ? '' : trim($value);
|
||||||
//Ensure name is not empty, and that neither name nor value contain line breaks
|
//Ensure name is not empty, and that neither name nor value contain line breaks
|
||||||
if (empty($name) || strpbrk($name . $value, "\r\n") !== false) {
|
if (empty($name) || strpbrk($name . $value, "\r\n") !== false) {
|
||||||
if ($this->exceptions) {
|
if ($this->exceptions) {
|
||||||
throw new Exception('Invalid header name or value');
|
throw new Exception($this->lang('invalid_header'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -4062,7 +4223,8 @@ class PHPMailer
|
|||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (// Only process relative URLs if a basedir is provided (i.e. no absolute local paths)
|
if (
|
||||||
|
//Only process relative URLs if a basedir is provided (i.e. no absolute local paths)
|
||||||
!empty($basedir)
|
!empty($basedir)
|
||||||
//Ignore URLs containing parent dir traversal (..)
|
//Ignore URLs containing parent dir traversal (..)
|
||||||
&& (strpos($url, '..') === false)
|
&& (strpos($url, '..') === false)
|
||||||
@@ -4084,7 +4246,8 @@ class PHPMailer
|
|||||||
if (strlen($directory) > 1 && '/' !== substr($directory, -1)) {
|
if (strlen($directory) > 1 && '/' !== substr($directory, -1)) {
|
||||||
$directory .= '/';
|
$directory .= '/';
|
||||||
}
|
}
|
||||||
if ($this->addEmbeddedImage(
|
if (
|
||||||
|
$this->addEmbeddedImage(
|
||||||
$basedir . $directory . $filename,
|
$basedir . $directory . $filename,
|
||||||
$cid,
|
$cid,
|
||||||
$filename,
|
$filename,
|
||||||
@@ -4132,7 +4295,8 @@ class PHPMailer
|
|||||||
*
|
*
|
||||||
* @param string $html The HTML text to convert
|
* @param string $html The HTML text to convert
|
||||||
* @param bool|callable $advanced Any boolean value to use the internal converter,
|
* @param bool|callable $advanced Any boolean value to use the internal converter,
|
||||||
* or provide your own callable for custom conversion
|
* or provide your own callable for custom conversion.
|
||||||
|
* *Never* pass user-supplied data into this parameter
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -4509,11 +4673,15 @@ class PHPMailer
|
|||||||
$privKey = openssl_pkey_get_private($privKeyStr);
|
$privKey = openssl_pkey_get_private($privKeyStr);
|
||||||
}
|
}
|
||||||
if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {
|
if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {
|
||||||
|
if (\PHP_MAJOR_VERSION < 8) {
|
||||||
openssl_pkey_free($privKey);
|
openssl_pkey_free($privKey);
|
||||||
|
}
|
||||||
|
|
||||||
return base64_encode($signature);
|
return base64_encode($signature);
|
||||||
}
|
}
|
||||||
|
if (\PHP_MAJOR_VERSION < 8) {
|
||||||
openssl_pkey_free($privKey);
|
openssl_pkey_free($privKey);
|
||||||
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -4701,7 +4869,8 @@ class PHPMailer
|
|||||||
$headerKeys = ' h=' . implode(':', $headersToSignKeys) . ';' . static::$LE;
|
$headerKeys = ' h=' . implode(':', $headersToSignKeys) . ';' . static::$LE;
|
||||||
$headerValues = implode(static::$LE, $headersToSign);
|
$headerValues = implode(static::$LE, $headersToSign);
|
||||||
$body = $this->DKIM_BodyC($body);
|
$body = $this->DKIM_BodyC($body);
|
||||||
$DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body
|
//Base64 of packed binary SHA-256 hash of body
|
||||||
|
$DKIMb64 = base64_encode(pack('H*', hash('sha256', $body)));
|
||||||
$ident = '';
|
$ident = '';
|
||||||
if ('' !== $this->DKIM_identity) {
|
if ('' !== $this->DKIM_identity) {
|
||||||
$ident = ' i=' . $this->DKIM_identity . ';' . static::$LE;
|
$ident = ' i=' . $this->DKIM_identity . ';' . static::$LE;
|
||||||
|
|||||||
45
vendor/phpmailer/phpmailer/src/POP3.php
vendored
45
vendor/phpmailer/phpmailer/src/POP3.php
vendored
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPMailer POP-Before-SMTP Authentication Class.
|
* PHPMailer POP-Before-SMTP Authentication Class.
|
||||||
* PHP Version 5.5.
|
* PHP Version 5.5.
|
||||||
@@ -45,7 +46,7 @@ class POP3
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const VERSION = '6.1.8';
|
const VERSION = '6.5.1';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default POP3 port number.
|
* Default POP3 port number.
|
||||||
@@ -62,12 +63,16 @@ class POP3
|
|||||||
const DEFAULT_TIMEOUT = 30;
|
const DEFAULT_TIMEOUT = 30;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Debug display level.
|
* POP3 class debug output mode.
|
||||||
* Options: 0 = no, 1+ = yes.
|
* Debug output level.
|
||||||
|
* Options:
|
||||||
|
* @see POP3::DEBUG_OFF: No output
|
||||||
|
* @see POP3::DEBUG_SERVER: Server messages, connection/server errors
|
||||||
|
* @see POP3::DEBUG_CLIENT: Client and Server messages, connection/server errors
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $do_debug = 0;
|
public $do_debug = self::DEBUG_OFF;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* POP3 mail server hostname.
|
* POP3 mail server hostname.
|
||||||
@@ -130,6 +135,28 @@ class POP3
|
|||||||
*/
|
*/
|
||||||
const LE = "\r\n";
|
const LE = "\r\n";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debug level for no output.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
const DEBUG_OFF = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debug level to show server -> client messages
|
||||||
|
* also shows clients connection errors or errors from server
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
const DEBUG_SERVER = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debug level to show client -> server and server -> client messages.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
const DEBUG_CLIENT = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple static wrapper for all-in-one POP before SMTP.
|
* Simple static wrapper for all-in-one POP before SMTP.
|
||||||
*
|
*
|
||||||
@@ -189,7 +216,7 @@ class POP3
|
|||||||
$this->password = $password;
|
$this->password = $password;
|
||||||
//Reset the error log
|
//Reset the error log
|
||||||
$this->errors = [];
|
$this->errors = [];
|
||||||
// connect
|
//Connect
|
||||||
$result = $this->connect($this->host, $this->port, $this->tval);
|
$result = $this->connect($this->host, $this->port, $this->tval);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$login_result = $this->login($this->username, $this->password);
|
$login_result = $this->login($this->username, $this->password);
|
||||||
@@ -229,7 +256,7 @@ class POP3
|
|||||||
$port = static::DEFAULT_PORT;
|
$port = static::DEFAULT_PORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// connect to the POP3 server
|
//Connect to the POP3 server
|
||||||
$errno = 0;
|
$errno = 0;
|
||||||
$errstr = '';
|
$errstr = '';
|
||||||
$this->pop_conn = fsockopen(
|
$this->pop_conn = fsockopen(
|
||||||
@@ -329,7 +356,7 @@ class POP3
|
|||||||
protected function getResponse($size = 128)
|
protected function getResponse($size = 128)
|
||||||
{
|
{
|
||||||
$response = fgets($this->pop_conn, $size);
|
$response = fgets($this->pop_conn, $size);
|
||||||
if ($this->do_debug >= 1) {
|
if ($this->do_debug >= self::DEBUG_SERVER) {
|
||||||
echo 'Server -> Client: ', $response;
|
echo 'Server -> Client: ', $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,7 +373,7 @@ class POP3
|
|||||||
protected function sendString($string)
|
protected function sendString($string)
|
||||||
{
|
{
|
||||||
if ($this->pop_conn) {
|
if ($this->pop_conn) {
|
||||||
if ($this->do_debug >= 2) { //Show client messages when debug >= 2
|
if ($this->do_debug >= self::DEBUG_CLIENT) { //Show client messages when debug >= 2
|
||||||
echo 'Client -> Server: ', $string;
|
echo 'Client -> Server: ', $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -384,7 +411,7 @@ class POP3
|
|||||||
protected function setError($error)
|
protected function setError($error)
|
||||||
{
|
{
|
||||||
$this->errors[] = $error;
|
$this->errors[] = $error;
|
||||||
if ($this->do_debug >= 1) {
|
if ($this->do_debug >= self::DEBUG_SERVER) {
|
||||||
echo '<pre>';
|
echo '<pre>';
|
||||||
foreach ($this->errors as $e) {
|
foreach ($this->errors as $e) {
|
||||||
print_r($e);
|
print_r($e);
|
||||||
|
|||||||
48
vendor/phpmailer/phpmailer/src/SMTP.php
vendored
48
vendor/phpmailer/phpmailer/src/SMTP.php
vendored
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPMailer RFC821 SMTP email transport class.
|
* PHPMailer RFC821 SMTP email transport class.
|
||||||
* PHP Version 5.5.
|
* PHP Version 5.5.
|
||||||
@@ -34,7 +35,7 @@ class SMTP
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const VERSION = '6.1.8';
|
const VERSION = '6.5.1';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP line break constant.
|
* SMTP line break constant.
|
||||||
@@ -185,6 +186,7 @@ class SMTP
|
|||||||
'Amazon_SES' => '/[\d]{3} Ok (.*)/',
|
'Amazon_SES' => '/[\d]{3} Ok (.*)/',
|
||||||
'SendGrid' => '/[\d]{3} Ok: queued as (.*)/',
|
'SendGrid' => '/[\d]{3} Ok: queued as (.*)/',
|
||||||
'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/',
|
'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/',
|
||||||
|
'Haraka' => '/[\d]{3} Message Queued \((.*)\)/',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -342,9 +344,21 @@ class SMTP
|
|||||||
//Get any announcement
|
//Get any announcement
|
||||||
$this->last_reply = $this->get_lines();
|
$this->last_reply = $this->get_lines();
|
||||||
$this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);
|
$this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);
|
||||||
|
$responseCode = (int)substr($this->last_reply, 0, 3);
|
||||||
|
if ($responseCode === 220) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
//Anything other than a 220 response means something went wrong
|
||||||
|
//RFC 5321 says the server will wait for us to send a QUIT in response to a 554 error
|
||||||
|
//https://tools.ietf.org/html/rfc5321#section-3.1
|
||||||
|
if ($responseCode === 554) {
|
||||||
|
$this->quit();
|
||||||
|
}
|
||||||
|
//This will handle 421 responses which may not wait for a QUIT (e.g. if the server is being shut down)
|
||||||
|
$this->edebug('Connection: closing due to error', self::DEBUG_CONNECTION);
|
||||||
|
$this->close();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create connection to the SMTP server.
|
* Create connection to the SMTP server.
|
||||||
@@ -539,7 +553,10 @@ class SMTP
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//Send encoded username and password
|
//Send encoded username and password
|
||||||
if (!$this->sendCommand(
|
if (
|
||||||
|
//Format from https://tools.ietf.org/html/rfc4616#section-2
|
||||||
|
//We skip the first field (it's forgery), so the string starts with a null byte
|
||||||
|
!$this->sendCommand(
|
||||||
'User & Password',
|
'User & Password',
|
||||||
base64_encode("\0" . $username . "\0" . $password),
|
base64_encode("\0" . $username . "\0" . $password),
|
||||||
235
|
235
|
||||||
@@ -669,7 +686,7 @@ class SMTP
|
|||||||
$this->server_caps = null;
|
$this->server_caps = null;
|
||||||
$this->helo_rply = null;
|
$this->helo_rply = null;
|
||||||
if (is_resource($this->smtp_conn)) {
|
if (is_resource($this->smtp_conn)) {
|
||||||
// close the connection and cleanup
|
//Close the connection and cleanup
|
||||||
fclose($this->smtp_conn);
|
fclose($this->smtp_conn);
|
||||||
$this->smtp_conn = null; //Makes for cleaner serialization
|
$this->smtp_conn = null; //Makes for cleaner serialization
|
||||||
$this->edebug('Connection: closed', self::DEBUG_CONNECTION);
|
$this->edebug('Connection: closed', self::DEBUG_CONNECTION);
|
||||||
@@ -750,7 +767,8 @@ class SMTP
|
|||||||
|
|
||||||
//Send the lines to the server
|
//Send the lines to the server
|
||||||
foreach ($lines_out as $line_out) {
|
foreach ($lines_out as $line_out) {
|
||||||
//RFC2821 section 4.5.2
|
//Dot-stuffing as per RFC5321 section 4.5.2
|
||||||
|
//https://tools.ietf.org/html/rfc5321#section-4.5.2
|
||||||
if (!empty($line_out) && $line_out[0] === '.') {
|
if (!empty($line_out) && $line_out[0] === '.') {
|
||||||
$line_out = '.' . $line_out;
|
$line_out = '.' . $line_out;
|
||||||
}
|
}
|
||||||
@@ -784,7 +802,16 @@ class SMTP
|
|||||||
public function hello($host = '')
|
public function hello($host = '')
|
||||||
{
|
{
|
||||||
//Try extended hello first (RFC 2821)
|
//Try extended hello first (RFC 2821)
|
||||||
return $this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host);
|
if ($this->sendHello('EHLO', $host)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Some servers shut down the SMTP service here (RFC 5321)
|
||||||
|
if (substr($this->helo_rply, 0, 3) == '421') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->sendHello('HELO', $host);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1086,8 +1113,10 @@ class SMTP
|
|||||||
{
|
{
|
||||||
//If SMTP transcripts are left enabled, or debug output is posted online
|
//If SMTP transcripts are left enabled, or debug output is posted online
|
||||||
//it can leak credentials, so hide credentials in all but lowest level
|
//it can leak credentials, so hide credentials in all but lowest level
|
||||||
if (self::DEBUG_LOWLEVEL > $this->do_debug &&
|
if (
|
||||||
in_array($command, ['User & Password', 'Username', 'Password'], true)) {
|
self::DEBUG_LOWLEVEL > $this->do_debug &&
|
||||||
|
in_array($command, ['User & Password', 'Username', 'Password'], true)
|
||||||
|
) {
|
||||||
$this->edebug('CLIENT -> SERVER: [credentials hidden]', self::DEBUG_CLIENT);
|
$this->edebug('CLIENT -> SERVER: [credentials hidden]', self::DEBUG_CLIENT);
|
||||||
} else {
|
} else {
|
||||||
$this->edebug('CLIENT -> SERVER: ' . $data, self::DEBUG_CLIENT);
|
$this->edebug('CLIENT -> SERVER: ' . $data, self::DEBUG_CLIENT);
|
||||||
@@ -1207,7 +1236,8 @@ class SMTP
|
|||||||
self::DEBUG_LOWLEVEL
|
self::DEBUG_LOWLEVEL
|
||||||
);
|
);
|
||||||
|
|
||||||
//stream_select returns false when the `select` system call is interrupted by an incoming signal, try the select again
|
//stream_select returns false when the `select` system call is interrupted
|
||||||
|
//by an incoming signal, try the select again
|
||||||
if (stripos($message, 'interrupted system call') !== false) {
|
if (stripos($message, 'interrupted system call') !== false) {
|
||||||
$this->edebug(
|
$this->edebug(
|
||||||
'SMTP -> get_lines(): retrying stream_select',
|
'SMTP -> get_lines(): retrying stream_select',
|
||||||
|
|||||||
1
vendor/tecnickcom/tcpdf/.github/FUNDING.yml
vendored
1
vendor/tecnickcom/tcpdf/.github/FUNDING.yml
vendored
@@ -1 +0,0 @@
|
|||||||
custom: ['https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project']
|
|
||||||
1
vendor/tecnickcom/tcpdf/.gitignore
vendored
1
vendor/tecnickcom/tcpdf/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
.idea
|
|
||||||
90
vendor/tecnickcom/tcpdf/CHANGELOG.TXT
vendored
90
vendor/tecnickcom/tcpdf/CHANGELOG.TXT
vendored
@@ -1,16 +1,98 @@
|
|||||||
6.2.25
|
|
||||||
|
6.4.2 (2021-04-02)
|
||||||
|
- Fix PHP 8.1 type error with TCPDF_STATIC::pregSplit on preg_split
|
||||||
|
- Fix a PHP array offset error
|
||||||
|
- Fixed phpdoc blocks
|
||||||
|
- Drop a PHP 4 polyfill and add a .gitattributes file
|
||||||
|
|
||||||
|
6.4.1 (2021-03-27)
|
||||||
|
- Update tcpdf version (no code changes)
|
||||||
|
|
||||||
|
6.4.0 (2021-03-27)
|
||||||
|
- allow styles on <HR> tags
|
||||||
|
- check if file exists before calling unlink
|
||||||
|
- Fix image file type for urls with query params
|
||||||
|
- Fix SVGPath should accept 1.19.30 (equiv 1.19,.30) compacted values list
|
||||||
|
- Fix Second parameter of TCPDF::cell() must be a number
|
||||||
|
- PHP 8.0 function signature fixes
|
||||||
|
- Fix vulnerability to roman numeral bombs
|
||||||
|
- Optimized a regular expression
|
||||||
|
- Cache file get contents calls
|
||||||
|
- Remove mb_internal encoding handling
|
||||||
|
|
||||||
|
6.3.5 (2020-02-14)
|
||||||
|
- Fixed curly braces in pdf417
|
||||||
|
- Fixed a syntax error issue when accessing an index of a casted variable
|
||||||
|
|
||||||
|
6.3.4 (2020-02-12)
|
||||||
|
- Check if imagekeys exist
|
||||||
|
- Unlink only images in cache
|
||||||
|
|
||||||
|
6.3.3 (2020-02-12)
|
||||||
|
- Fixed PHP 7.4 - cannot use array offset on integers
|
||||||
|
- Fixed PDF/A-3B validation issue caused by missing pdfaSchema:property.
|
||||||
|
- Removed backup changelog files from repo
|
||||||
|
- Prevents the deletion of non-existent files in /tmp
|
||||||
|
- Prevent crash in case of no list access in cache path
|
||||||
|
- Check existence of file before delete it
|
||||||
|
- Fixed erase users pictures
|
||||||
|
- Fixed problem with $imagekeys undefined or unlinked
|
||||||
|
- Fix SVGPath elliptical arc with rx/ry=0 + z should return to initial point
|
||||||
|
- Fixed PHP 7.4 errors
|
||||||
|
- handle integers for pages
|
||||||
|
- Fixed background image doesn't work in RTL
|
||||||
|
- Fixed PDF/A validity
|
||||||
|
- Fixed datamatrix.php for PHP 7.4
|
||||||
|
- Fixed deprecated PHP features
|
||||||
|
|
||||||
|
6.3.2 (2019-09-20)
|
||||||
|
- Update ICC profile
|
||||||
|
|
||||||
|
6.3.1 (2019-09-20)
|
||||||
|
- Fix reported version
|
||||||
|
- Fix Undefined property: GLPIPDF::$imagekeys
|
||||||
|
|
||||||
|
6.3.0 (2019-09-19)
|
||||||
|
- fix SpotColor handling in HTML
|
||||||
|
- Add an additional empty test to prevent error in PHP 7.2
|
||||||
|
- Fix the documentation how to calculate the cell height
|
||||||
|
- Drop duplicated array indices
|
||||||
|
- Fix TCPDF_STATIC::fileGetContents()
|
||||||
|
- Introduce other version of pdfA (2 and 3)
|
||||||
|
- Add UF and AFRelationship missing
|
||||||
|
- Fix performance issue of cloned instances
|
||||||
|
- Change glob to readdir which performs better
|
||||||
|
- URI in PDF can result in E_NOTICE
|
||||||
|
- Fix a warning for PHP 7.4
|
||||||
|
- Fixed gradient offsets for percentage-based stops.
|
||||||
|
- Fixed file_get_contents return value should also be checked for a non-empty string
|
||||||
|
- Fix Array and string offset access syntax with curly braces is deprecated
|
||||||
|
- Fix PHP Warning: chr() expects parameter 1 to be int
|
||||||
|
- Add a VERSION file
|
||||||
|
|
||||||
|
6.2.26 (2018-10-16)
|
||||||
|
- Update sRGB.icc with the one from the Debian package icc-profiles-free
|
||||||
|
- Fix unsupported operand types error when codepoints arrays are merged
|
||||||
|
|
||||||
|
6.2.25 (2018-09-23)
|
||||||
- Fix support for image URLs.
|
- Fix support for image URLs.
|
||||||
|
|
||||||
6.2.24
|
6.2.24
|
||||||
- Support remote urls when checking if file exists.
|
- Support remote urls when checking if file exists.
|
||||||
|
|
||||||
6.2.23
|
6.2.23 (2018-09-22)
|
||||||
- Simplify file_exists function.
|
- Simplify file_exists function.
|
||||||
|
|
||||||
6.2.22
|
6.2.22 (2018-09-14)
|
||||||
|
- Fixes on `include/tcpdf_images.php`, `include/tcpdf_static.php` and `tcpdf.php` about file handling
|
||||||
|
|
||||||
|
6.2.21 (2018-09-14)
|
||||||
|
- _no code changes_
|
||||||
|
|
||||||
|
6.2.20 (2018-09-14)
|
||||||
- Fix for security vulnerability: Using the phar:// wrapper it was possible to trigger the unserialization of user provided data.
|
- Fix for security vulnerability: Using the phar:// wrapper it was possible to trigger the unserialization of user provided data.
|
||||||
|
|
||||||
6.2.19
|
6.2.19 (2018-09-14)
|
||||||
- Merge various fixes for PHP 7.3 compatibility and security.
|
- Merge various fixes for PHP 7.3 compatibility and security.
|
||||||
|
|
||||||
6.2.13 (2016-06-10)
|
6.2.13 (2016-06-10)
|
||||||
|
|||||||
2
vendor/tecnickcom/tcpdf/VERSION
vendored
2
vendor/tecnickcom/tcpdf/VERSION
vendored
@@ -1 +1 @@
|
|||||||
6.3.5
|
6.4.2
|
||||||
|
|||||||
4
vendor/tecnickcom/tcpdf/composer.json
vendored
4
vendor/tecnickcom/tcpdf/composer.json
vendored
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "tecnickcom/tcpdf",
|
"name": "tecnickcom/tcpdf",
|
||||||
"version": "6.3.5",
|
|
||||||
"homepage": "http://www.tcpdf.org/",
|
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
|
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -13,6 +11,8 @@
|
|||||||
"pdf417",
|
"pdf417",
|
||||||
"barcodes"
|
"barcodes"
|
||||||
],
|
],
|
||||||
|
"homepage": "http://www.tcpdf.org/",
|
||||||
|
"version": "6.4.2",
|
||||||
"license": "LGPL-3.0-only",
|
"license": "LGPL-3.0-only",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,13 +27,13 @@
|
|||||||
// See LICENSE.TXT file for more information.
|
// See LICENSE.TXT file for more information.
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Description : Example for tcpdf_barcodes_2d.php class
|
// Description : Example for tcpdf_barcodes_1d.php class
|
||||||
//
|
//
|
||||||
//============================================================+
|
//============================================================+
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Example for tcpdf_barcodes_2d.php class
|
* Example for tcpdf_barcodes_1d.php class
|
||||||
* @package com.tecnick.tcpdf
|
* @package com.tecnick.tcpdf
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @version 1.0.000
|
* @version 1.0.000
|
||||||
|
|||||||
@@ -27,13 +27,13 @@
|
|||||||
// See LICENSE.TXT file for more information.
|
// See LICENSE.TXT file for more information.
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Description : Example for tcpdf_barcodes_2d.php class
|
// Description : Example for tcpdf_barcodes_1d.php class
|
||||||
//
|
//
|
||||||
//============================================================+
|
//============================================================+
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Example for tcpdf_barcodes_2d.php class
|
* Example for tcpdf_barcodes_1d.php class
|
||||||
* @package com.tecnick.tcpdf
|
* @package com.tecnick.tcpdf
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @version 1.0.000
|
* @version 1.0.000
|
||||||
|
|||||||
@@ -27,13 +27,13 @@
|
|||||||
// See LICENSE.TXT file for more information.
|
// See LICENSE.TXT file for more information.
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Description : Example for tcpdf_barcodes_2d.php class
|
// Description : Example for tcpdf_barcodes_1d.php class
|
||||||
//
|
//
|
||||||
//============================================================+
|
//============================================================+
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Example for tcpdf_barcodes_2d.php class
|
* Example for tcpdf_barcodes_1d.php class
|
||||||
* @package com.tecnick.tcpdf
|
* @package com.tecnick.tcpdf
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @version 1.0.000
|
* @version 1.0.000
|
||||||
|
|||||||
@@ -27,13 +27,13 @@
|
|||||||
// See LICENSE.TXT file for more information.
|
// See LICENSE.TXT file for more information.
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Description : Example for tcpdf_barcodes_2d.php class
|
// Description : Example for tcpdf_barcodes_1d.php class
|
||||||
//
|
//
|
||||||
//============================================================+
|
//============================================================+
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Example for tcpdf_barcodes_2d.php class
|
* Example for tcpdf_barcodes_1d.php class
|
||||||
* @package com.tecnick.tcpdf
|
* @package com.tecnick.tcpdf
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @version 1.0.000
|
* @version 1.0.000
|
||||||
|
|||||||
@@ -24,7 +24,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Include the TCPDF 1D barcode class (search the class on the following directories).
|
// Include the TCPDF 1D barcode class (search the class on the following directories).
|
||||||
$tcpdf_barcodes_1d_include_dirs = array(realpath('../../tcpdf_barcodes_1d.php'), '/usr/share/php/tcpdf/tcpdf_barcodes_1d.php', '/usr/share/tcpdf/tcpdf_barcodes_1d.php', '/usr/share/php-tcpdf/tcpdf_barcodes_1d.php', '/var/www/tcpdf/tcpdf_barcodes_1d.php', '/var/www/html/tcpdf/tcpdf_barcodes_1d.php', '/usr/local/apache2/htdocs/tcpdf/tcpdf_barcodes_1d.php');
|
$tcpdf_barcodes_1d_include_dirs = array(
|
||||||
|
realpath(dirname(__FILE__) . '/../../tcpdf_barcodes_1d.php'),// True source file
|
||||||
|
realpath('../../tcpdf_barcodes_1d.php'),// Relative from $PWD
|
||||||
|
'/usr/share/php/tcpdf/tcpdf_barcodes_1d.php',
|
||||||
|
'/usr/share/tcpdf/tcpdf_barcodes_1d.php',
|
||||||
|
'/usr/share/php-tcpdf/tcpdf_barcodes_1d.php',
|
||||||
|
'/var/www/tcpdf/tcpdf_barcodes_1d.php',
|
||||||
|
'/var/www/html/tcpdf/tcpdf_barcodes_1d.php',
|
||||||
|
'/usr/local/apache2/htdocs/tcpdf/tcpdf_barcodes_1d.php'
|
||||||
|
);
|
||||||
foreach ($tcpdf_barcodes_1d_include_dirs as $tcpdf_barcodes_1d_include_path) {
|
foreach ($tcpdf_barcodes_1d_include_dirs as $tcpdf_barcodes_1d_include_path) {
|
||||||
if (@file_exists($tcpdf_barcodes_1d_include_path)) {
|
if (@file_exists($tcpdf_barcodes_1d_include_path)) {
|
||||||
require_once($tcpdf_barcodes_1d_include_path);
|
require_once($tcpdf_barcodes_1d_include_path);
|
||||||
|
|||||||
@@ -24,7 +24,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Include the TCPDF 2D barcode class (search the class on the following directories).
|
// Include the TCPDF 2D barcode class (search the class on the following directories).
|
||||||
$tcpdf_barcodes_2d_include_dirs = array(realpath('../../tcpdf_barcodes_2d.php'), '/usr/share/php/tcpdf/tcpdf_barcodes_2d.php', '/usr/share/tcpdf/tcpdf_barcodes_2d.php', '/usr/share/php-tcpdf/tcpdf_barcodes_2d.php', '/var/www/tcpdf/tcpdf_barcodes_2d.php', '/var/www/html/tcpdf/tcpdf_barcodes_2d.php', '/usr/local/apache2/htdocs/tcpdf/tcpdf_barcodes_2d.php');
|
$tcpdf_barcodes_2d_include_dirs = array(
|
||||||
|
realpath(dirname(__FILE__) . '/../../tcpdf_barcodes_2d.php'),// True source file
|
||||||
|
realpath('../../tcpdf_barcodes_2d.php'),// Relative from $PWD
|
||||||
|
'/usr/share/php/tcpdf/tcpdf_barcodes_2d.php',
|
||||||
|
'/usr/share/tcpdf/tcpdf_barcodes_2d.php',
|
||||||
|
'/usr/share/php-tcpdf/tcpdf_barcodes_2d.php',
|
||||||
|
'/var/www/tcpdf/tcpdf_barcodes_2d.php',
|
||||||
|
'/var/www/html/tcpdf/tcpdf_barcodes_2d.php',
|
||||||
|
'/usr/local/apache2/htdocs/tcpdf/tcpdf_barcodes_2d.php'
|
||||||
|
);
|
||||||
foreach ($tcpdf_barcodes_2d_include_dirs as $tcpdf_barcodes_2d_include_path) {
|
foreach ($tcpdf_barcodes_2d_include_dirs as $tcpdf_barcodes_2d_include_path) {
|
||||||
if (@file_exists($tcpdf_barcodes_2d_include_path)) {
|
if (@file_exists($tcpdf_barcodes_2d_include_path)) {
|
||||||
require_once($tcpdf_barcodes_2d_include_path);
|
require_once($tcpdf_barcodes_2d_include_path);
|
||||||
|
|||||||
16
vendor/tecnickcom/tcpdf/examples/example_010.php
vendored
16
vendor/tecnickcom/tcpdf/examples/example_010.php
vendored
@@ -35,10 +35,10 @@ class MC_TCPDF extends TCPDF {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Print chapter
|
* Print chapter
|
||||||
* @param $num (int) chapter number
|
* @param int $num chapter number
|
||||||
* @param $title (string) chapter title
|
* @param string $title chapter title
|
||||||
* @param $file (string) name of the file containing the chapter body
|
* @param string $file name of the file containing the chapter body
|
||||||
* @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text.
|
* @param boolean $mode if true the chapter body is in HTML, otherwise in simple text.
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function PrintChapter($num, $title, $file, $mode=false) {
|
public function PrintChapter($num, $title, $file, $mode=false) {
|
||||||
@@ -56,8 +56,8 @@ class MC_TCPDF extends TCPDF {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set chapter title
|
* Set chapter title
|
||||||
* @param $num (int) chapter number
|
* @param int $num chapter number
|
||||||
* @param $title (string) chapter title
|
* @param string $title chapter title
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function ChapterTitle($num, $title) {
|
public function ChapterTitle($num, $title) {
|
||||||
@@ -69,8 +69,8 @@ class MC_TCPDF extends TCPDF {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Print chapter body
|
* Print chapter body
|
||||||
* @param $file (string) name of the file containing the chapter body
|
* @param string $file name of the file containing the chapter body
|
||||||
* @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text.
|
* @param boolean $mode if true the chapter body is in HTML, otherwise in simple text.
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function ChapterBody($file, $mode=false) {
|
public function ChapterBody($file, $mode=false) {
|
||||||
|
|||||||
BIN
vendor/tecnickcom/tcpdf/examples/images/logo.png
vendored
BIN
vendor/tecnickcom/tcpdf/examples/images/logo.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -229,7 +229,7 @@ class Datamatrix {
|
|||||||
/**
|
/**
|
||||||
* This is the class constructor.
|
* This is the class constructor.
|
||||||
* Creates a datamatrix object
|
* Creates a datamatrix object
|
||||||
* @param $code (string) Code to represent using Datamatrix.
|
* @param string $code Code to represent using Datamatrix.
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function __construct($code) {
|
public function __construct($code) {
|
||||||
@@ -355,11 +355,11 @@ class Datamatrix {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Product of two numbers in a Power-of-Two Galois Field
|
* Product of two numbers in a Power-of-Two Galois Field
|
||||||
* @param $a (int) first number to multiply.
|
* @param int $a first number to multiply.
|
||||||
* @param $b (int) second number to multiply.
|
* @param int $b second number to multiply.
|
||||||
* @param $log (array) Log table.
|
* @param array $log Log table.
|
||||||
* @param $alog (array) Anti-Log table.
|
* @param array $alog Anti-Log table.
|
||||||
* @param $gf (array) Number of Factors of the Reed-Solomon polynomial.
|
* @param int $gf Number of Factors of the Reed-Solomon polynomial.
|
||||||
* @return int product
|
* @return int product
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -372,12 +372,12 @@ class Datamatrix {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add error correction codewords to data codewords array (ANNEX E).
|
* Add error correction codewords to data codewords array (ANNEX E).
|
||||||
* @param $wd (array) Array of datacodewords.
|
* @param array $wd Array of datacodewords.
|
||||||
* @param $nb (int) Number of blocks.
|
* @param int $nb Number of blocks.
|
||||||
* @param $nd (int) Number of data codewords per block.
|
* @param int $nd Number of data codewords per block.
|
||||||
* @param $nc (int) Number of correction codewords per block.
|
* @param int $nc Number of correction codewords per block.
|
||||||
* @param $gf (int) numner of fields on log/antilog table (power of 2).
|
* @param int $gf numner of fields on log/antilog table (power of 2).
|
||||||
* @param $pp (int) The value of its prime modulus polynomial (301 for ECC200).
|
* @param int $pp The value of its prime modulus polynomial (301 for ECC200).
|
||||||
* @return array data codewords + error codewords
|
* @return array data codewords + error codewords
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -438,9 +438,9 @@ class Datamatrix {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the 253-state codeword
|
* Return the 253-state codeword
|
||||||
* @param $cwpad (int) Pad codeword.
|
* @param int $cwpad Pad codeword.
|
||||||
* @param $cwpos (int) Number of data codewords from the beginning of encoded data.
|
* @param int $cwpos Number of data codewords from the beginning of encoded data.
|
||||||
* @return pad codeword
|
* @return int pad codeword
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected function get253StateCodeword($cwpad, $cwpos) {
|
protected function get253StateCodeword($cwpad, $cwpos) {
|
||||||
@@ -453,9 +453,9 @@ class Datamatrix {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the 255-state codeword
|
* Return the 255-state codeword
|
||||||
* @param $cwpad (int) Pad codeword.
|
* @param int $cwpad Pad codeword.
|
||||||
* @param $cwpos (int) Number of data codewords from the beginning of encoded data.
|
* @param int $cwpos Number of data codewords from the beginning of encoded data.
|
||||||
* @return pad codeword
|
* @return int pad codeword
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected function get255StateCodeword($cwpad, $cwpos) {
|
protected function get255StateCodeword($cwpad, $cwpos) {
|
||||||
@@ -468,8 +468,8 @@ class Datamatrix {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the char belongs to the selected mode
|
* Returns true if the char belongs to the selected mode
|
||||||
* @param $chr (int) Character (byte) to check.
|
* @param int $chr Character (byte) to check.
|
||||||
* @param $mode (int) Current encoding mode.
|
* @param int $mode Current encoding mode.
|
||||||
* @return boolean true if the char is of the selected mode.
|
* @return boolean true if the char is of the selected mode.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -514,9 +514,9 @@ class Datamatrix {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The look-ahead test scans the data to be encoded to find the best mode (Annex P - steps from J to S).
|
* The look-ahead test scans the data to be encoded to find the best mode (Annex P - steps from J to S).
|
||||||
* @param $data (string) data to encode
|
* @param string $data data to encode
|
||||||
* @param $pos (int) current position
|
* @param int $pos current position
|
||||||
* @param $mode (int) current encoding mode
|
* @param int $mode current encoding mode
|
||||||
* @return int encoding mode
|
* @return int encoding mode
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -646,8 +646,8 @@ class Datamatrix {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the switching codeword to a new encoding mode (latch codeword)
|
* Get the switching codeword to a new encoding mode (latch codeword)
|
||||||
* @param $mode (int) New encoding mode.
|
* @param int $mode New encoding mode.
|
||||||
* @return (int) Switch codeword.
|
* @return int Switch codeword.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected function getSwitchEncodingCodeword($mode) {
|
protected function getSwitchEncodingCodeword($mode) {
|
||||||
@@ -685,8 +685,8 @@ class Datamatrix {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Choose the minimum matrix size and return the max number of data codewords.
|
* Choose the minimum matrix size and return the max number of data codewords.
|
||||||
* @param $numcw (int) Number of current codewords.
|
* @param int $numcw Number of current codewords.
|
||||||
* @return number of data codewords in matrix
|
* @return int number of data codewords in matrix
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected function getMaxDataCodewords($numcw) {
|
protected function getMaxDataCodewords($numcw) {
|
||||||
@@ -700,7 +700,7 @@ class Datamatrix {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get high level encoding using the minimum symbol data characters for ECC 200
|
* Get high level encoding using the minimum symbol data characters for ECC 200
|
||||||
* @param $data (string) data to encode
|
* @param string $data data to encode
|
||||||
* @return array of codewords
|
* @return array of codewords
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -970,13 +970,13 @@ class Datamatrix {
|
|||||||
/**
|
/**
|
||||||
* Places "chr+bit" with appropriate wrapping within array[].
|
* Places "chr+bit" with appropriate wrapping within array[].
|
||||||
* (Annex F - ECC 200 symbol character placement)
|
* (Annex F - ECC 200 symbol character placement)
|
||||||
* @param $marr (array) Array of symbols.
|
* @param array $marr Array of symbols.
|
||||||
* @param $nrow (int) Number of rows.
|
* @param int $nrow Number of rows.
|
||||||
* @param $ncol (int) Number of columns.
|
* @param int $ncol Number of columns.
|
||||||
* @param $row (int) Row number.
|
* @param int $row Row number.
|
||||||
* @param $col (int) Column number.
|
* @param int $col Column number.
|
||||||
* @param $chr (int) Char byte.
|
* @param int $chr Char byte.
|
||||||
* @param $bit (int) Bit.
|
* @param int $bit Bit.
|
||||||
* @return array
|
* @return array
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -996,12 +996,12 @@ class Datamatrix {
|
|||||||
/**
|
/**
|
||||||
* Places the 8 bits of a utah-shaped symbol character.
|
* Places the 8 bits of a utah-shaped symbol character.
|
||||||
* (Annex F - ECC 200 symbol character placement)
|
* (Annex F - ECC 200 symbol character placement)
|
||||||
* @param $marr (array) Array of symbols.
|
* @param array $marr Array of symbols.
|
||||||
* @param $nrow (int) Number of rows.
|
* @param int $nrow Number of rows.
|
||||||
* @param $ncol (int) Number of columns.
|
* @param int $ncol Number of columns.
|
||||||
* @param $row (int) Row number.
|
* @param int $row Row number.
|
||||||
* @param $col (int) Column number.
|
* @param int $col Column number.
|
||||||
* @param $chr (int) Char byte.
|
* @param int $chr Char byte.
|
||||||
* @return array
|
* @return array
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1020,10 +1020,10 @@ class Datamatrix {
|
|||||||
/**
|
/**
|
||||||
* Places the 8 bits of the first special corner case.
|
* Places the 8 bits of the first special corner case.
|
||||||
* (Annex F - ECC 200 symbol character placement)
|
* (Annex F - ECC 200 symbol character placement)
|
||||||
* @param $marr (array) Array of symbols.
|
* @param array $marr Array of symbols.
|
||||||
* @param $nrow (int) Number of rows.
|
* @param int $nrow Number of rows.
|
||||||
* @param $ncol (int) Number of columns.
|
* @param int $ncol Number of columns.
|
||||||
* @param $chr (int) Char byte.
|
* @param int $chr Char byte.
|
||||||
* @return array
|
* @return array
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1042,10 +1042,10 @@ class Datamatrix {
|
|||||||
/**
|
/**
|
||||||
* Places the 8 bits of the second special corner case.
|
* Places the 8 bits of the second special corner case.
|
||||||
* (Annex F - ECC 200 symbol character placement)
|
* (Annex F - ECC 200 symbol character placement)
|
||||||
* @param $marr (array) Array of symbols.
|
* @param array $marr Array of symbols.
|
||||||
* @param $nrow (int) Number of rows.
|
* @param int $nrow Number of rows.
|
||||||
* @param $ncol (int) Number of columns.
|
* @param int $ncol Number of columns.
|
||||||
* @param $chr (int) Char byte.
|
* @param int $chr Char byte.
|
||||||
* @return array
|
* @return array
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1064,10 +1064,10 @@ class Datamatrix {
|
|||||||
/**
|
/**
|
||||||
* Places the 8 bits of the third special corner case.
|
* Places the 8 bits of the third special corner case.
|
||||||
* (Annex F - ECC 200 symbol character placement)
|
* (Annex F - ECC 200 symbol character placement)
|
||||||
* @param $marr (array) Array of symbols.
|
* @param array $marr Array of symbols.
|
||||||
* @param $nrow (int) Number of rows.
|
* @param int $nrow Number of rows.
|
||||||
* @param $ncol (int) Number of columns.
|
* @param int $ncol Number of columns.
|
||||||
* @param $chr (int) Char byte.
|
* @param int $chr Char byte.
|
||||||
* @return array
|
* @return array
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1086,10 +1086,10 @@ class Datamatrix {
|
|||||||
/**
|
/**
|
||||||
* Places the 8 bits of the fourth special corner case.
|
* Places the 8 bits of the fourth special corner case.
|
||||||
* (Annex F - ECC 200 symbol character placement)
|
* (Annex F - ECC 200 symbol character placement)
|
||||||
* @param $marr (array) Array of symbols.
|
* @param array $marr Array of symbols.
|
||||||
* @param $nrow (int) Number of rows.
|
* @param int $nrow Number of rows.
|
||||||
* @param $ncol (int) Number of columns.
|
* @param int $ncol Number of columns.
|
||||||
* @param $chr (int) Char byte.
|
* @param int $chr Char byte.
|
||||||
* @return array
|
* @return array
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1108,8 +1108,8 @@ class Datamatrix {
|
|||||||
/**
|
/**
|
||||||
* Build a placement map.
|
* Build a placement map.
|
||||||
* (Annex F - ECC 200 symbol character placement)
|
* (Annex F - ECC 200 symbol character placement)
|
||||||
* @param $nrow (int) Number of rows.
|
* @param int $nrow Number of rows.
|
||||||
* @param $ncol (int) Number of columns.
|
* @param int $ncol Number of columns.
|
||||||
* @return array
|
* @return array
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -523,10 +523,10 @@ class PDF417 {
|
|||||||
/**
|
/**
|
||||||
* This is the class constructor.
|
* This is the class constructor.
|
||||||
* Creates a PDF417 object
|
* Creates a PDF417 object
|
||||||
* @param $code (string) code to represent using PDF417
|
* @param string $code code to represent using PDF417
|
||||||
* @param $ecl (int) error correction level (0-8); default -1 = automatic correction level
|
* @param int $ecl error correction level (0-8); default -1 = automatic correction level
|
||||||
* @param $aspectratio (float) the width to height of the symbol (excluding quiet zones)
|
* @param float $aspectratio the width to height of the symbol (excluding quiet zones)
|
||||||
* @param $macro (array) information for macro block
|
* @param array $macro information for macro block
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function __construct($code, $ecl=-1, $aspectratio=2, $macro=array()) {
|
public function __construct($code, $ecl=-1, $aspectratio=2, $macro=array()) {
|
||||||
@@ -734,12 +734,13 @@ class PDF417 {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the error correction level (0-8) to be used
|
* Returns the error correction level (0-8) to be used
|
||||||
* @param $ecl (int) error correction level
|
* @param int $ecl error correction level
|
||||||
* @param $numcw (int) number of data codewords
|
* @param int $numcw number of data codewords
|
||||||
* @return int error correction level
|
* @return int error correction level
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected function getErrorCorrectionLevel($ecl, $numcw) {
|
protected function getErrorCorrectionLevel($ecl, $numcw) {
|
||||||
|
$maxecl = 8; // starting error level
|
||||||
// check for automatic levels
|
// check for automatic levels
|
||||||
if (($ecl < 0) OR ($ecl > 8)) {
|
if (($ecl < 0) OR ($ecl > 8)) {
|
||||||
if ($numcw < 41) {
|
if ($numcw < 41) {
|
||||||
@@ -755,7 +756,6 @@ class PDF417 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// get maximum correction level
|
// get maximum correction level
|
||||||
$maxecl = 8; // starting error level
|
|
||||||
$maxerrsize = (928 - $numcw); // available codewords for error
|
$maxerrsize = (928 - $numcw); // available codewords for error
|
||||||
while ($maxecl > 0) {
|
while ($maxecl > 0) {
|
||||||
$errsize = (2 << $ecl);
|
$errsize = (2 << $ecl);
|
||||||
@@ -772,8 +772,8 @@ class PDF417 {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the error correction codewords
|
* Returns the error correction codewords
|
||||||
* @param $cw (array) array of codewords including Symbol Length Descriptor and pad
|
* @param array $cw array of codewords including Symbol Length Descriptor and pad
|
||||||
* @param $ecl (int) error correction level 0-8
|
* @param int $ecl error correction level 0-8
|
||||||
* @return array of error correction codewords
|
* @return array of error correction codewords
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -809,8 +809,8 @@ class PDF417 {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create array of sequences from input
|
* Create array of sequences from input
|
||||||
* @param $code (string) code
|
* @param string $code code
|
||||||
* @return bidimensional array containing characters and classification
|
* @return array bi-dimensional array containing characters and classification
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected function getInputSequences($code) {
|
protected function getInputSequences($code) {
|
||||||
@@ -864,9 +864,9 @@ class PDF417 {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Compact data by mode.
|
* Compact data by mode.
|
||||||
* @param $mode (int) compaction mode number
|
* @param int $mode compaction mode number
|
||||||
* @param $code (string) data to compact
|
* @param string $code data to compact
|
||||||
* @param $addmode (boolean) if true add the mode codeword at first position
|
* @param boolean $addmode if true add the mode codeword at first position
|
||||||
* @return array of codewords
|
* @return array of codewords
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
|
|||||||
399
vendor/tecnickcom/tcpdf/include/barcodes/qrcode.php
vendored
399
vendor/tecnickcom/tcpdf/include/barcodes/qrcode.php
vendored
@@ -247,32 +247,6 @@ if (!defined('QRCODEDEFS')) {
|
|||||||
|
|
||||||
} // end of definitions
|
} // end of definitions
|
||||||
|
|
||||||
// #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
|
|
||||||
|
|
||||||
// for compatibility with PHP4
|
|
||||||
if (!function_exists('str_split')) {
|
|
||||||
/**
|
|
||||||
* Convert a string to an array (needed for PHP4 compatibility)
|
|
||||||
* @param $string (string) The input string.
|
|
||||||
* @param $split_length (int) Maximum length of the chunk.
|
|
||||||
* @return If the optional split_length parameter is specified, the returned array will be broken down into chunks with each being split_length in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1. If the split_length length exceeds the length of string , the entire string is returned as the first (and only) array element.
|
|
||||||
*/
|
|
||||||
function str_split($string, $split_length=1) {
|
|
||||||
if ((strlen($string) > $split_length) OR (!$split_length)) {
|
|
||||||
do {
|
|
||||||
$c = strlen($string);
|
|
||||||
$parts[] = substr($string, 0, $split_length);
|
|
||||||
$string = substr($string, $split_length);
|
|
||||||
} while ($string !== false);
|
|
||||||
} else {
|
|
||||||
$parts = array($string);
|
|
||||||
}
|
|
||||||
return $parts;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// #####################################################
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class QRcode
|
* @class QRcode
|
||||||
* Class to create QR-code arrays for TCPDF class.
|
* Class to create QR-code arrays for TCPDF class.
|
||||||
@@ -631,8 +605,8 @@ class QRcode {
|
|||||||
/**
|
/**
|
||||||
* This is the class constructor.
|
* This is the class constructor.
|
||||||
* Creates a QRcode object
|
* Creates a QRcode object
|
||||||
* @param $code (string) code to represent using QRcode
|
* @param string $code code to represent using QRcode
|
||||||
* @param $eclevel (string) error level: <ul><li>L : About 7% or less errors can be corrected.</li><li>M : About 15% or less errors can be corrected.</li><li>Q : About 25% or less errors can be corrected.</li><li>H : About 30% or less errors can be corrected.</li></ul>
|
* @param string $eclevel error level: <ul><li>L : About 7% or less errors can be corrected.</li><li>M : About 15% or less errors can be corrected.</li><li>Q : About 25% or less errors can be corrected.</li><li>H : About 30% or less errors can be corrected.</li></ul>
|
||||||
* @public
|
* @public
|
||||||
* @since 1.0.000
|
* @since 1.0.000
|
||||||
*/
|
*/
|
||||||
@@ -683,7 +657,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert the frame in binary form
|
* Convert the frame in binary form
|
||||||
* @param $frame (array) array to binarize
|
* @param array $frame array to binarize
|
||||||
* @return array frame in binary form
|
* @return array frame in binary form
|
||||||
*/
|
*/
|
||||||
protected function binarize($frame) {
|
protected function binarize($frame) {
|
||||||
@@ -699,7 +673,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode the input string to QR code
|
* Encode the input string to QR code
|
||||||
* @param $string (string) input string to encode
|
* @param string $string input string to encode
|
||||||
*/
|
*/
|
||||||
protected function encodeString($string) {
|
protected function encodeString($string) {
|
||||||
$this->dataStr = $string;
|
$this->dataStr = $string;
|
||||||
@@ -715,7 +689,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode mask
|
* Encode mask
|
||||||
* @param $mask (int) masking mode
|
* @param int $mask masking mode
|
||||||
*/
|
*/
|
||||||
protected function encodeMask($mask) {
|
protected function encodeMask($mask) {
|
||||||
$spec = array(0, 0, 0, 0, 0);
|
$spec = array(0, 0, 0, 0, 0);
|
||||||
@@ -780,8 +754,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set frame value at specified position
|
* Set frame value at specified position
|
||||||
* @param $at (array) x,y position
|
* @param array $at x,y position
|
||||||
* @param $val (int) value of the character to set
|
* @param int $val value of the character to set
|
||||||
*/
|
*/
|
||||||
protected function setFrameAt($at, $val) {
|
protected function setFrameAt($at, $val) {
|
||||||
$this->frame[$at['y']][$at['x']] = chr($val);
|
$this->frame[$at['y']][$at['x']] = chr($val);
|
||||||
@@ -789,7 +763,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get frame value at specified position
|
* Get frame value at specified position
|
||||||
* @param $at (array) x,y position
|
* @param array $at x,y position
|
||||||
* @return value at specified position
|
* @return value at specified position
|
||||||
*/
|
*/
|
||||||
protected function getFrameAt($at) {
|
protected function getFrameAt($at) {
|
||||||
@@ -853,8 +827,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize code.
|
* Initialize code.
|
||||||
* @param $spec (array) array of ECC specification
|
* @param array $spec array of ECC specification
|
||||||
* @return 0 in case of success, -1 in case of error
|
* @return int 0 in case of success, -1 in case of error
|
||||||
*/
|
*/
|
||||||
protected function init($spec) {
|
protected function init($spec) {
|
||||||
$dl = $this->rsDataCodes1($spec);
|
$dl = $this->rsDataCodes1($spec);
|
||||||
@@ -932,10 +906,10 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Write Format Information on frame and returns the number of black bits
|
* Write Format Information on frame and returns the number of black bits
|
||||||
* @param $width (int) frame width
|
* @param int $width frame width
|
||||||
* @param $frame (array) frame
|
* @param array $frame frame
|
||||||
* @param $mask (array) masking mode
|
* @param array $mask masking mode
|
||||||
* @param $level (int) error correction level
|
* @param int $level error correction level
|
||||||
* @return int blacks
|
* @return int blacks
|
||||||
*/
|
*/
|
||||||
protected function writeFormatInformation($width, &$frame, $mask, $level) {
|
protected function writeFormatInformation($width, &$frame, $mask, $level) {
|
||||||
@@ -976,8 +950,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* mask0
|
* mask0
|
||||||
* @param $x (int) X position
|
* @param int $x X position
|
||||||
* @param $y (int) Y position
|
* @param int $y Y position
|
||||||
* @return int mask
|
* @return int mask
|
||||||
*/
|
*/
|
||||||
protected function mask0($x, $y) {
|
protected function mask0($x, $y) {
|
||||||
@@ -986,8 +960,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* mask1
|
* mask1
|
||||||
* @param $x (int) X position
|
* @param int $x X position
|
||||||
* @param $y (int) Y position
|
* @param int $y Y position
|
||||||
* @return int mask
|
* @return int mask
|
||||||
*/
|
*/
|
||||||
protected function mask1($x, $y) {
|
protected function mask1($x, $y) {
|
||||||
@@ -996,8 +970,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* mask2
|
* mask2
|
||||||
* @param $x (int) X position
|
* @param int $x X position
|
||||||
* @param $y (int) Y position
|
* @param int $y Y position
|
||||||
* @return int mask
|
* @return int mask
|
||||||
*/
|
*/
|
||||||
protected function mask2($x, $y) {
|
protected function mask2($x, $y) {
|
||||||
@@ -1006,8 +980,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* mask3
|
* mask3
|
||||||
* @param $x (int) X position
|
* @param int $x X position
|
||||||
* @param $y (int) Y position
|
* @param int $y Y position
|
||||||
* @return int mask
|
* @return int mask
|
||||||
*/
|
*/
|
||||||
protected function mask3($x, $y) {
|
protected function mask3($x, $y) {
|
||||||
@@ -1016,8 +990,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* mask4
|
* mask4
|
||||||
* @param $x (int) X position
|
* @param int $x X position
|
||||||
* @param $y (int) Y position
|
* @param int $y Y position
|
||||||
* @return int mask
|
* @return int mask
|
||||||
*/
|
*/
|
||||||
protected function mask4($x, $y) {
|
protected function mask4($x, $y) {
|
||||||
@@ -1026,8 +1000,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* mask5
|
* mask5
|
||||||
* @param $x (int) X position
|
* @param int $x X position
|
||||||
* @param $y (int) Y position
|
* @param int $y Y position
|
||||||
* @return int mask
|
* @return int mask
|
||||||
*/
|
*/
|
||||||
protected function mask5($x, $y) {
|
protected function mask5($x, $y) {
|
||||||
@@ -1036,8 +1010,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* mask6
|
* mask6
|
||||||
* @param $x (int) X position
|
* @param int $x X position
|
||||||
* @param $y (int) Y position
|
* @param int $y Y position
|
||||||
* @return int mask
|
* @return int mask
|
||||||
*/
|
*/
|
||||||
protected function mask6($x, $y) {
|
protected function mask6($x, $y) {
|
||||||
@@ -1046,8 +1020,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* mask7
|
* mask7
|
||||||
* @param $x (int) X position
|
* @param int $x X position
|
||||||
* @param $y (int) Y position
|
* @param int $y Y position
|
||||||
* @return int mask
|
* @return int mask
|
||||||
*/
|
*/
|
||||||
protected function mask7($x, $y) {
|
protected function mask7($x, $y) {
|
||||||
@@ -1056,9 +1030,9 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return bitmask
|
* Return bitmask
|
||||||
* @param $maskNo (int) mask number
|
* @param int $maskNo mask number
|
||||||
* @param $width (int) width
|
* @param int $width width
|
||||||
* @param $frame (array) frame
|
* @param array $frame frame
|
||||||
* @return array bitmask
|
* @return array bitmask
|
||||||
*/
|
*/
|
||||||
protected function generateMaskNo($maskNo, $width, $frame) {
|
protected function generateMaskNo($maskNo, $width, $frame) {
|
||||||
@@ -1078,11 +1052,11 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* makeMaskNo
|
* makeMaskNo
|
||||||
* @param $maskNo (int)
|
* @param int $maskNo
|
||||||
* @param $width (int)
|
* @param int $width
|
||||||
* @param $s (int)
|
* @param int $s
|
||||||
* @param $d (int)
|
* @param int $d
|
||||||
* @param $maskGenOnly (boolean)
|
* @param boolean $maskGenOnly
|
||||||
* @return int b
|
* @return int b
|
||||||
*/
|
*/
|
||||||
protected function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly=false) {
|
protected function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly=false) {
|
||||||
@@ -1106,10 +1080,10 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* makeMask
|
* makeMask
|
||||||
* @param $width (int)
|
* @param int $width
|
||||||
* @param $frame (array)
|
* @param array $frame
|
||||||
* @param $maskNo (int)
|
* @param int $maskNo
|
||||||
* @param $level (int)
|
* @param int $level
|
||||||
* @return array mask
|
* @return array mask
|
||||||
*/
|
*/
|
||||||
protected function makeMask($width, $frame, $maskNo, $level) {
|
protected function makeMask($width, $frame, $maskNo, $level) {
|
||||||
@@ -1121,7 +1095,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* calcN1N3
|
* calcN1N3
|
||||||
* @param $length (int)
|
* @param int $length
|
||||||
* @return int demerit
|
* @return int demerit
|
||||||
*/
|
*/
|
||||||
protected function calcN1N3($length) {
|
protected function calcN1N3($length) {
|
||||||
@@ -1151,8 +1125,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* evaluateSymbol
|
* evaluateSymbol
|
||||||
* @param $width (int)
|
* @param int $width
|
||||||
* @param $frame (array)
|
* @param array $frame
|
||||||
* @return int demerit
|
* @return int demerit
|
||||||
*/
|
*/
|
||||||
protected function evaluateSymbol($width, $frame) {
|
protected function evaluateSymbol($width, $frame) {
|
||||||
@@ -1212,9 +1186,9 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* mask
|
* mask
|
||||||
* @param $width (int)
|
* @param int $width
|
||||||
* @param $frame (array)
|
* @param array $frame
|
||||||
* @param $level (int)
|
* @param int $level
|
||||||
* @return array best mask
|
* @return array best mask
|
||||||
*/
|
*/
|
||||||
protected function mask($width, $frame, $level) {
|
protected function mask($width, $frame, $level) {
|
||||||
@@ -1255,8 +1229,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the character at specified position is a number
|
* Return true if the character at specified position is a number
|
||||||
* @param $str (string) string
|
* @param string $str string
|
||||||
* @param $pos (int) characted position
|
* @param int $pos characted position
|
||||||
* @return boolean true of false
|
* @return boolean true of false
|
||||||
*/
|
*/
|
||||||
protected function isdigitat($str, $pos) {
|
protected function isdigitat($str, $pos) {
|
||||||
@@ -1268,8 +1242,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the character at specified position is an alphanumeric character
|
* Return true if the character at specified position is an alphanumeric character
|
||||||
* @param $str (string) string
|
* @param string $str string
|
||||||
* @param $pos (int) characted position
|
* @param int $pos characted position
|
||||||
* @return boolean true of false
|
* @return boolean true of false
|
||||||
*/
|
*/
|
||||||
protected function isalnumat($str, $pos) {
|
protected function isalnumat($str, $pos) {
|
||||||
@@ -1281,7 +1255,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* identifyMode
|
* identifyMode
|
||||||
* @param $pos (int)
|
* @param int $pos
|
||||||
* @return int mode
|
* @return int mode
|
||||||
*/
|
*/
|
||||||
protected function identifyMode($pos) {
|
protected function identifyMode($pos) {
|
||||||
@@ -1386,6 +1360,7 @@ class QRcode {
|
|||||||
$p += 2;
|
$p += 2;
|
||||||
}
|
}
|
||||||
$this->items = $this->appendNewInputItem($this->items, QR_MODE_KJ, $p, str_split($this->dataStr));
|
$this->items = $this->appendNewInputItem($this->items, QR_MODE_KJ, $p, str_split($this->dataStr));
|
||||||
|
$run = $p;
|
||||||
return $run;
|
return $run;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1440,7 +1415,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* splitString
|
* splitString
|
||||||
* @return (int)
|
* @return int
|
||||||
*/
|
*/
|
||||||
protected function splitString() {
|
protected function splitString() {
|
||||||
while (strlen($this->dataStr) > 0) {
|
while (strlen($this->dataStr) > 0) {
|
||||||
@@ -1455,7 +1430,7 @@ class QRcode {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case QR_MODE_KJ: {
|
case QR_MODE_KJ: {
|
||||||
if ($hint == QR_MODE_KJ) {
|
if ($this->hint == QR_MODE_KJ) {
|
||||||
$length = $this->eatKanji();
|
$length = $this->eatKanji();
|
||||||
} else {
|
} else {
|
||||||
$length = $this->eat8();
|
$length = $this->eat8();
|
||||||
@@ -1504,10 +1479,10 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* newInputItem
|
* newInputItem
|
||||||
* @param $mode (int)
|
* @param int $mode
|
||||||
* @param $size (int)
|
* @param int $size
|
||||||
* @param $data (array)
|
* @param array $data
|
||||||
* @param $bstream (array)
|
* @param array $bstream
|
||||||
* @return array input item
|
* @return array input item
|
||||||
*/
|
*/
|
||||||
protected function newInputItem($mode, $size, $data, $bstream=null) {
|
protected function newInputItem($mode, $size, $data, $bstream=null) {
|
||||||
@@ -1528,8 +1503,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* encodeModeNum
|
* encodeModeNum
|
||||||
* @param $inputitem (array)
|
* @param array $inputitem
|
||||||
* @param $version (int)
|
* @param int $version
|
||||||
* @return array input item
|
* @return array input item
|
||||||
*/
|
*/
|
||||||
protected function encodeModeNum($inputitem, $version) {
|
protected function encodeModeNum($inputitem, $version) {
|
||||||
@@ -1557,8 +1532,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* encodeModeAn
|
* encodeModeAn
|
||||||
* @param $inputitem (array)
|
* @param array $inputitem
|
||||||
* @param $version (int)
|
* @param int $version
|
||||||
* @return array input item
|
* @return array input item
|
||||||
*/
|
*/
|
||||||
protected function encodeModeAn($inputitem, $version) {
|
protected function encodeModeAn($inputitem, $version) {
|
||||||
@@ -1580,8 +1555,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* encodeMode8
|
* encodeMode8
|
||||||
* @param $inputitem (array)
|
* @param array $inputitem
|
||||||
* @param $version (int)
|
* @param int $version
|
||||||
* @return array input item
|
* @return array input item
|
||||||
*/
|
*/
|
||||||
protected function encodeMode8($inputitem, $version) {
|
protected function encodeMode8($inputitem, $version) {
|
||||||
@@ -1596,8 +1571,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* encodeModeKanji
|
* encodeModeKanji
|
||||||
* @param $inputitem (array)
|
* @param array $inputitem
|
||||||
* @param $version (int)
|
* @param int $version
|
||||||
* @return array input item
|
* @return array input item
|
||||||
*/
|
*/
|
||||||
protected function encodeModeKanji($inputitem, $version) {
|
protected function encodeModeKanji($inputitem, $version) {
|
||||||
@@ -1620,7 +1595,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* encodeModeStructure
|
* encodeModeStructure
|
||||||
* @param $inputitem (array)
|
* @param array $inputitem
|
||||||
* @return array input item
|
* @return array input item
|
||||||
*/
|
*/
|
||||||
protected function encodeModeStructure($inputitem) {
|
protected function encodeModeStructure($inputitem) {
|
||||||
@@ -1634,8 +1609,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* encodeBitStream
|
* encodeBitStream
|
||||||
* @param $inputitem (array)
|
* @param array $inputitem
|
||||||
* @param $version (int)
|
* @param int $version
|
||||||
* @return array input item
|
* @return array input item
|
||||||
*/
|
*/
|
||||||
protected function encodeBitStream($inputitem, $version) {
|
protected function encodeBitStream($inputitem, $version) {
|
||||||
@@ -1686,11 +1661,11 @@ class QRcode {
|
|||||||
/**
|
/**
|
||||||
* Append data to an input object.
|
* Append data to an input object.
|
||||||
* The data is copied and appended to the input object.
|
* The data is copied and appended to the input object.
|
||||||
* @param $items (arrray) input items
|
* @param array $items input items
|
||||||
* @param $mode (int) encoding mode.
|
* @param int $mode encoding mode.
|
||||||
* @param $size (int) size of data (byte).
|
* @param int $size size of data (byte).
|
||||||
* @param $data (array) array of input data.
|
* @param array $data array of input data.
|
||||||
* @return items
|
* @return array items
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected function appendNewInputItem($items, $mode, $size, $data) {
|
protected function appendNewInputItem($items, $mode, $size, $data) {
|
||||||
@@ -1703,10 +1678,10 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* insertStructuredAppendHeader
|
* insertStructuredAppendHeader
|
||||||
* @param $items (array)
|
* @param array $items
|
||||||
* @param $size (int)
|
* @param int $size
|
||||||
* @param $index (int)
|
* @param int $index
|
||||||
* @param $parity (int)
|
* @param int $parity
|
||||||
* @return array items
|
* @return array items
|
||||||
*/
|
*/
|
||||||
protected function insertStructuredAppendHeader($items, $size, $index, $parity) {
|
protected function insertStructuredAppendHeader($items, $size, $index, $parity) {
|
||||||
@@ -1724,7 +1699,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* calcParity
|
* calcParity
|
||||||
* @param $items (array)
|
* @param array $items
|
||||||
* @return int parity
|
* @return int parity
|
||||||
*/
|
*/
|
||||||
protected function calcParity($items) {
|
protected function calcParity($items) {
|
||||||
@@ -1741,8 +1716,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* checkModeNum
|
* checkModeNum
|
||||||
* @param $size (int)
|
* @param int $size
|
||||||
* @param $data (array)
|
* @param array $data
|
||||||
* @return boolean true or false
|
* @return boolean true or false
|
||||||
*/
|
*/
|
||||||
protected function checkModeNum($size, $data) {
|
protected function checkModeNum($size, $data) {
|
||||||
@@ -1755,9 +1730,9 @@ class QRcode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19).
|
* Look up the alphabet-numeric conversion table (see JIS X0510:2004, pp.19).
|
||||||
* @param $c (int) character value
|
* @param int $c character value
|
||||||
* @return value
|
* @return int value
|
||||||
*/
|
*/
|
||||||
protected function lookAnTable($c) {
|
protected function lookAnTable($c) {
|
||||||
return (($c > 127)?-1:$this->anTable[$c]);
|
return (($c > 127)?-1:$this->anTable[$c]);
|
||||||
@@ -1765,8 +1740,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* checkModeAn
|
* checkModeAn
|
||||||
* @param $size (int)
|
* @param int $size
|
||||||
* @param $data (array)
|
* @param array $data
|
||||||
* @return boolean true or false
|
* @return boolean true or false
|
||||||
*/
|
*/
|
||||||
protected function checkModeAn($size, $data) {
|
protected function checkModeAn($size, $data) {
|
||||||
@@ -1780,7 +1755,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* estimateBitsModeNum
|
* estimateBitsModeNum
|
||||||
* @param $size (int)
|
* @param int $size
|
||||||
* @return int number of bits
|
* @return int number of bits
|
||||||
*/
|
*/
|
||||||
protected function estimateBitsModeNum($size) {
|
protected function estimateBitsModeNum($size) {
|
||||||
@@ -1801,7 +1776,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* estimateBitsModeAn
|
* estimateBitsModeAn
|
||||||
* @param $size (int)
|
* @param int $size
|
||||||
* @return int number of bits
|
* @return int number of bits
|
||||||
*/
|
*/
|
||||||
protected function estimateBitsModeAn($size) {
|
protected function estimateBitsModeAn($size) {
|
||||||
@@ -1814,7 +1789,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* estimateBitsMode8
|
* estimateBitsMode8
|
||||||
* @param $size (int)
|
* @param int $size
|
||||||
* @return int number of bits
|
* @return int number of bits
|
||||||
*/
|
*/
|
||||||
protected function estimateBitsMode8($size) {
|
protected function estimateBitsMode8($size) {
|
||||||
@@ -1823,7 +1798,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* estimateBitsModeKanji
|
* estimateBitsModeKanji
|
||||||
* @param $size (int)
|
* @param int $size
|
||||||
* @return int number of bits
|
* @return int number of bits
|
||||||
*/
|
*/
|
||||||
protected function estimateBitsModeKanji($size) {
|
protected function estimateBitsModeKanji($size) {
|
||||||
@@ -1832,8 +1807,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* checkModeKanji
|
* checkModeKanji
|
||||||
* @param $size (int)
|
* @param int $size
|
||||||
* @param $data (array)
|
* @param array $data
|
||||||
* @return boolean true or false
|
* @return boolean true or false
|
||||||
*/
|
*/
|
||||||
protected function checkModeKanji($size, $data) {
|
protected function checkModeKanji($size, $data) {
|
||||||
@@ -1851,9 +1826,9 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate the input data.
|
* Validate the input data.
|
||||||
* @param $mode (int) encoding mode.
|
* @param int $mode encoding mode.
|
||||||
* @param $size (int) size of data (byte).
|
* @param int $size size of data (byte).
|
||||||
* @param $data (array) data to validate
|
* @param array $data data to validate
|
||||||
* @return boolean true in case of valid data, false otherwise
|
* @return boolean true in case of valid data, false otherwise
|
||||||
*/
|
*/
|
||||||
protected function check($mode, $size, $data) {
|
protected function check($mode, $size, $data) {
|
||||||
@@ -1885,8 +1860,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* estimateBitStreamSize
|
* estimateBitStreamSize
|
||||||
* @param $items (array)
|
* @param array $items
|
||||||
* @param $version (int)
|
* @param int $version
|
||||||
* @return int bits
|
* @return int bits
|
||||||
*/
|
*/
|
||||||
protected function estimateBitStreamSize($items, $version) {
|
protected function estimateBitStreamSize($items, $version) {
|
||||||
@@ -1929,7 +1904,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* estimateVersion
|
* estimateVersion
|
||||||
* @param $items (array)
|
* @param array $items
|
||||||
* @return int version
|
* @return int version
|
||||||
*/
|
*/
|
||||||
protected function estimateVersion($items) {
|
protected function estimateVersion($items) {
|
||||||
@@ -1948,9 +1923,9 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* lengthOfCode
|
* lengthOfCode
|
||||||
* @param $mode (int)
|
* @param int $mode
|
||||||
* @param $version (int)
|
* @param int $version
|
||||||
* @param $bits (int)
|
* @param int $bits
|
||||||
* @return int size
|
* @return int size
|
||||||
*/
|
*/
|
||||||
protected function lengthOfCode($mode, $version, $bits) {
|
protected function lengthOfCode($mode, $version, $bits) {
|
||||||
@@ -2005,7 +1980,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* createBitStream
|
* createBitStream
|
||||||
* @param $items (array)
|
* @param array $items
|
||||||
* @return array of items and total bits
|
* @return array of items and total bits
|
||||||
*/
|
*/
|
||||||
protected function createBitStream($items) {
|
protected function createBitStream($items) {
|
||||||
@@ -2020,7 +1995,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* convertData
|
* convertData
|
||||||
* @param $items (array)
|
* @param array $items
|
||||||
* @return array items
|
* @return array items
|
||||||
*/
|
*/
|
||||||
protected function convertData($items) {
|
protected function convertData($items) {
|
||||||
@@ -2049,7 +2024,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Append Padding Bit to bitstream
|
* Append Padding Bit to bitstream
|
||||||
* @param $bstream (array)
|
* @param array $bstream
|
||||||
* @return array bitstream
|
* @return array bitstream
|
||||||
*/
|
*/
|
||||||
protected function appendPaddingBit($bstream) {
|
protected function appendPaddingBit($bstream) {
|
||||||
@@ -2082,7 +2057,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* mergeBitStream
|
* mergeBitStream
|
||||||
* @param $items (array) items
|
* @param array $items items
|
||||||
* @return array bitstream
|
* @return array bitstream
|
||||||
*/
|
*/
|
||||||
protected function mergeBitStream($items) {
|
protected function mergeBitStream($items) {
|
||||||
@@ -2099,7 +2074,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a stream of bits.
|
* Returns a stream of bits.
|
||||||
* @param $items (int)
|
* @param int $items
|
||||||
* @return array padded merged byte stream
|
* @return array padded merged byte stream
|
||||||
*/
|
*/
|
||||||
protected function getBitStream($items) {
|
protected function getBitStream($items) {
|
||||||
@@ -2109,7 +2084,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Pack all bit streams padding bits into a byte array.
|
* Pack all bit streams padding bits into a byte array.
|
||||||
* @param $items (int)
|
* @param int $items
|
||||||
* @return array padded merged byte stream
|
* @return array padded merged byte stream
|
||||||
*/
|
*/
|
||||||
protected function getByteStream($items) {
|
protected function getByteStream($items) {
|
||||||
@@ -2123,7 +2098,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an array with zeros
|
* Return an array with zeros
|
||||||
* @param $setLength (int) array size
|
* @param int $setLength array size
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function allocate($setLength) {
|
protected function allocate($setLength) {
|
||||||
@@ -2132,8 +2107,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return new bitstream from number
|
* Return new bitstream from number
|
||||||
* @param $bits (int) number of bits
|
* @param int $bits number of bits
|
||||||
* @param $num (int) number
|
* @param int $num number
|
||||||
* @return array bitstream
|
* @return array bitstream
|
||||||
*/
|
*/
|
||||||
protected function newFromNum($bits, $num) {
|
protected function newFromNum($bits, $num) {
|
||||||
@@ -2152,8 +2127,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return new bitstream from bytes
|
* Return new bitstream from bytes
|
||||||
* @param $size (int) size
|
* @param int $size size
|
||||||
* @param $data (array) bytes
|
* @param array $data bytes
|
||||||
* @return array bitstream
|
* @return array bitstream
|
||||||
*/
|
*/
|
||||||
protected function newFromBytes($size, $data) {
|
protected function newFromBytes($size, $data) {
|
||||||
@@ -2176,8 +2151,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Append one bitstream to another
|
* Append one bitstream to another
|
||||||
* @param $bitstream (array) original bitstream
|
* @param array $bitstream original bitstream
|
||||||
* @param $append (array) bitstream to append
|
* @param array $append bitstream to append
|
||||||
* @return array bitstream
|
* @return array bitstream
|
||||||
*/
|
*/
|
||||||
protected function appendBitstream($bitstream, $append) {
|
protected function appendBitstream($bitstream, $append) {
|
||||||
@@ -2192,9 +2167,9 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Append one bitstream created from number to another
|
* Append one bitstream created from number to another
|
||||||
* @param $bitstream (array) original bitstream
|
* @param array $bitstream original bitstream
|
||||||
* @param $bits (int) number of bits
|
* @param int $bits number of bits
|
||||||
* @param $num (int) number
|
* @param int $num number
|
||||||
* @return array bitstream
|
* @return array bitstream
|
||||||
*/
|
*/
|
||||||
protected function appendNum($bitstream, $bits, $num) {
|
protected function appendNum($bitstream, $bits, $num) {
|
||||||
@@ -2207,9 +2182,9 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Append one bitstream created from bytes to another
|
* Append one bitstream created from bytes to another
|
||||||
* @param $bitstream (array) original bitstream
|
* @param array $bitstream original bitstream
|
||||||
* @param $size (int) size
|
* @param int $size size
|
||||||
* @param $data (array) bytes
|
* @param array $data bytes
|
||||||
* @return array bitstream
|
* @return array bitstream
|
||||||
*/
|
*/
|
||||||
protected function appendBytes($bitstream, $size, $data) {
|
protected function appendBytes($bitstream, $size, $data) {
|
||||||
@@ -2222,7 +2197,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert bitstream to bytes
|
* Convert bitstream to bytes
|
||||||
* @param $bstream (array) original bitstream
|
* @param array $bstream original bitstream
|
||||||
* @return array of bytes
|
* @return array of bytes
|
||||||
*/
|
*/
|
||||||
protected function bitstreamToByte($bstream) {
|
protected function bitstreamToByte($bstream) {
|
||||||
@@ -2263,11 +2238,11 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace a value on the array at the specified position
|
* Replace a value on the array at the specified position
|
||||||
* @param $srctab (array)
|
* @param array $srctab
|
||||||
* @param $x (int) X position
|
* @param int $x X position
|
||||||
* @param $y (int) Y position
|
* @param int $y Y position
|
||||||
* @param $repl (string) value to replace
|
* @param string $repl value to replace
|
||||||
* @param $replLen (int) length of the repl string
|
* @param int $replLen length of the repl string
|
||||||
* @return array srctab
|
* @return array srctab
|
||||||
*/
|
*/
|
||||||
protected function qrstrset($srctab, $x, $y, $repl, $replLen=false) {
|
protected function qrstrset($srctab, $x, $y, $repl, $replLen=false) {
|
||||||
@@ -2277,8 +2252,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return maximum data code length (bytes) for the version.
|
* Return maximum data code length (bytes) for the version.
|
||||||
* @param $version (int) version
|
* @param int $version version
|
||||||
* @param $level (int) error correction level
|
* @param int $level error correction level
|
||||||
* @return int maximum size (bytes)
|
* @return int maximum size (bytes)
|
||||||
*/
|
*/
|
||||||
protected function getDataLength($version, $level) {
|
protected function getDataLength($version, $level) {
|
||||||
@@ -2287,8 +2262,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return maximum error correction code length (bytes) for the version.
|
* Return maximum error correction code length (bytes) for the version.
|
||||||
* @param $version (int) version
|
* @param int $version version
|
||||||
* @param $level (int) error correction level
|
* @param int $level error correction level
|
||||||
* @return int ECC size (bytes)
|
* @return int ECC size (bytes)
|
||||||
*/
|
*/
|
||||||
protected function getECCLength($version, $level){
|
protected function getECCLength($version, $level){
|
||||||
@@ -2297,7 +2272,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the width of the symbol for the version.
|
* Return the width of the symbol for the version.
|
||||||
* @param $version (int) version
|
* @param int $version version
|
||||||
* @return int width
|
* @return int width
|
||||||
*/
|
*/
|
||||||
protected function getWidth($version) {
|
protected function getWidth($version) {
|
||||||
@@ -2306,7 +2281,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the numer of remainder bits.
|
* Return the numer of remainder bits.
|
||||||
* @param $version (int) version
|
* @param int $version version
|
||||||
* @return int number of remainder bits
|
* @return int number of remainder bits
|
||||||
*/
|
*/
|
||||||
protected function getRemainder($version) {
|
protected function getRemainder($version) {
|
||||||
@@ -2315,8 +2290,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a version number that satisfies the input code length.
|
* Return a version number that satisfies the input code length.
|
||||||
* @param $size (int) input code length (bytes)
|
* @param int $size input code length (bytes)
|
||||||
* @param $level (int) error correction level
|
* @param int $level error correction level
|
||||||
* @return int version number
|
* @return int version number
|
||||||
*/
|
*/
|
||||||
protected function getMinimumVersion($size, $level) {
|
protected function getMinimumVersion($size, $level) {
|
||||||
@@ -2332,8 +2307,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the size of length indicator for the mode and version.
|
* Return the size of length indicator for the mode and version.
|
||||||
* @param $mode (int) encoding mode
|
* @param int $mode encoding mode
|
||||||
* @param $version (int) version
|
* @param int $version version
|
||||||
* @return int the size of the appropriate length indicator (bits).
|
* @return int the size of the appropriate length indicator (bits).
|
||||||
*/
|
*/
|
||||||
protected function lengthIndicator($mode, $version) {
|
protected function lengthIndicator($mode, $version) {
|
||||||
@@ -2352,8 +2327,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the maximum length for the mode and version.
|
* Return the maximum length for the mode and version.
|
||||||
* @param $mode (int) encoding mode
|
* @param int $mode encoding mode
|
||||||
* @param $version (int) version
|
* @param int $version version
|
||||||
* @return int the maximum length (bytes)
|
* @return int the maximum length (bytes)
|
||||||
*/
|
*/
|
||||||
protected function maximumWords($mode, $version) {
|
protected function maximumWords($mode, $version) {
|
||||||
@@ -2377,9 +2352,9 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an array of ECC specification.
|
* Return an array of ECC specification.
|
||||||
* @param $version (int) version
|
* @param int $version version
|
||||||
* @param $level (int) error correction level
|
* @param int $level error correction level
|
||||||
* @param $spec (array) an array of ECC specification contains as following: {# of type1 blocks, # of data code, # of ecc code, # of type2 blocks, # of data code}
|
* @param array $spec an array of ECC specification contains as following: {# of type1 blocks, # of data code, # of ecc code, # of type2 blocks, # of data code}
|
||||||
* @return array spec
|
* @return array spec
|
||||||
*/
|
*/
|
||||||
protected function getEccSpec($version, $level, $spec) {
|
protected function getEccSpec($version, $level, $spec) {
|
||||||
@@ -2408,9 +2383,9 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Put an alignment marker.
|
* Put an alignment marker.
|
||||||
* @param $frame (array) frame
|
* @param array $frame frame
|
||||||
* @param $ox (int) X center coordinate of the pattern
|
* @param int $ox X center coordinate of the pattern
|
||||||
* @param $oy (int) Y center coordinate of the pattern
|
* @param int $oy Y center coordinate of the pattern
|
||||||
* @return array frame
|
* @return array frame
|
||||||
*/
|
*/
|
||||||
protected function putAlignmentMarker($frame, $ox, $oy) {
|
protected function putAlignmentMarker($frame, $ox, $oy) {
|
||||||
@@ -2431,9 +2406,9 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Put an alignment pattern.
|
* Put an alignment pattern.
|
||||||
* @param $version (int) version
|
* @param int $version version
|
||||||
* @param $frame (array) frame
|
* @param array $frame frame
|
||||||
* @param $width (int) width
|
* @param int $width width
|
||||||
* @return array frame
|
* @return array frame
|
||||||
*/
|
*/
|
||||||
protected function putAlignmentPattern($version, $frame, $width) {
|
protected function putAlignmentPattern($version, $frame, $width) {
|
||||||
@@ -2473,8 +2448,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. Use lower 18 bits.
|
* Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. Use lower 18 bits.
|
||||||
* @param $version (int) version
|
* @param int $version version
|
||||||
* @return BCH encoded version information pattern
|
* @return string BCH encoded version information pattern
|
||||||
*/
|
*/
|
||||||
protected function getVersionPattern($version) {
|
protected function getVersionPattern($version) {
|
||||||
if (($version < 7) OR ($version > QRSPEC_VERSION_MAX)) {
|
if (($version < 7) OR ($version > QRSPEC_VERSION_MAX)) {
|
||||||
@@ -2485,9 +2460,9 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return BCH encoded format information pattern.
|
* Return BCH encoded format information pattern.
|
||||||
* @param $mask (array)
|
* @param array $mask
|
||||||
* @param $level (int) error correction level
|
* @param int $level error correction level
|
||||||
* @return BCH encoded format information pattern
|
* @return string BCH encoded format information pattern
|
||||||
*/
|
*/
|
||||||
protected function getFormatInfo($mask, $level) {
|
protected function getFormatInfo($mask, $level) {
|
||||||
if (($mask < 0) OR ($mask > 7)) {
|
if (($mask < 0) OR ($mask > 7)) {
|
||||||
@@ -2501,9 +2476,9 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Put a finder pattern.
|
* Put a finder pattern.
|
||||||
* @param $frame (array) frame
|
* @param array $frame frame
|
||||||
* @param $ox (int) X center coordinate of the pattern
|
* @param int $ox X center coordinate of the pattern
|
||||||
* @param $oy (int) Y center coordinate of the pattern
|
* @param int $oy Y center coordinate of the pattern
|
||||||
* @return array frame
|
* @return array frame
|
||||||
*/
|
*/
|
||||||
protected function putFinderPattern($frame, $ox, $oy) {
|
protected function putFinderPattern($frame, $ox, $oy) {
|
||||||
@@ -2524,8 +2499,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a copy of initialized frame.
|
* Return a copy of initialized frame.
|
||||||
* @param $version (int) version
|
* @param int $version version
|
||||||
* @return Array of unsigned char.
|
* @return array array of unsigned char.
|
||||||
*/
|
*/
|
||||||
protected function createFrame($version) {
|
protected function createFrame($version) {
|
||||||
$width = $this->capacity[$version][QRCAP_WIDTH];
|
$width = $this->capacity[$version][QRCAP_WIDTH];
|
||||||
@@ -2589,8 +2564,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set new frame for the specified version.
|
* Set new frame for the specified version.
|
||||||
* @param $version (int) version
|
* @param int $version version
|
||||||
* @return Array of unsigned char.
|
* @return array array of unsigned char.
|
||||||
*/
|
*/
|
||||||
protected function newFrame($version) {
|
protected function newFrame($version) {
|
||||||
if (($version < 1) OR ($version > QRSPEC_VERSION_MAX)) {
|
if (($version < 1) OR ($version > QRSPEC_VERSION_MAX)) {
|
||||||
@@ -2607,7 +2582,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return block number 0
|
* Return block number 0
|
||||||
* @param $spec (array)
|
* @param array $spec
|
||||||
* @return int value
|
* @return int value
|
||||||
*/
|
*/
|
||||||
protected function rsBlockNum($spec) {
|
protected function rsBlockNum($spec) {
|
||||||
@@ -2616,7 +2591,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return block number 1
|
* Return block number 1
|
||||||
* @param $spec (array)
|
* @param array $spec
|
||||||
* @return int value
|
* @return int value
|
||||||
*/
|
*/
|
||||||
protected function rsBlockNum1($spec) {
|
protected function rsBlockNum1($spec) {
|
||||||
@@ -2625,7 +2600,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return data codes 1
|
* Return data codes 1
|
||||||
* @param $spec (array)
|
* @param array $spec
|
||||||
* @return int value
|
* @return int value
|
||||||
*/
|
*/
|
||||||
protected function rsDataCodes1($spec) {
|
protected function rsDataCodes1($spec) {
|
||||||
@@ -2634,7 +2609,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return ecc codes 1
|
* Return ecc codes 1
|
||||||
* @param $spec (array)
|
* @param array $spec
|
||||||
* @return int value
|
* @return int value
|
||||||
*/
|
*/
|
||||||
protected function rsEccCodes1($spec) {
|
protected function rsEccCodes1($spec) {
|
||||||
@@ -2643,7 +2618,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return block number 2
|
* Return block number 2
|
||||||
* @param $spec (array)
|
* @param array $spec
|
||||||
* @return int value
|
* @return int value
|
||||||
*/
|
*/
|
||||||
protected function rsBlockNum2($spec) {
|
protected function rsBlockNum2($spec) {
|
||||||
@@ -2652,7 +2627,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return data codes 2
|
* Return data codes 2
|
||||||
* @param $spec (array)
|
* @param array $spec
|
||||||
* @return int value
|
* @return int value
|
||||||
*/
|
*/
|
||||||
protected function rsDataCodes2($spec) {
|
protected function rsDataCodes2($spec) {
|
||||||
@@ -2661,7 +2636,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return ecc codes 2
|
* Return ecc codes 2
|
||||||
* @param $spec (array)
|
* @param array $spec
|
||||||
* @return int value
|
* @return int value
|
||||||
*/
|
*/
|
||||||
protected function rsEccCodes2($spec) {
|
protected function rsEccCodes2($spec) {
|
||||||
@@ -2670,7 +2645,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return data length
|
* Return data length
|
||||||
* @param $spec (array)
|
* @param array $spec
|
||||||
* @return int value
|
* @return int value
|
||||||
*/
|
*/
|
||||||
protected function rsDataLength($spec) {
|
protected function rsDataLength($spec) {
|
||||||
@@ -2679,7 +2654,7 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return ecc length
|
* Return ecc length
|
||||||
* @param $spec (array)
|
* @param array $spec
|
||||||
* @return int value
|
* @return int value
|
||||||
*/
|
*/
|
||||||
protected function rsEccLength($spec) {
|
protected function rsEccLength($spec) {
|
||||||
@@ -2692,12 +2667,12 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize a Reed-Solomon codec and add it to existing rsitems
|
* Initialize a Reed-Solomon codec and add it to existing rsitems
|
||||||
* @param $symsize (int) symbol size, bits
|
* @param int $symsize symbol size, bits
|
||||||
* @param $gfpoly (int) Field generator polynomial coefficients
|
* @param int $gfpoly Field generator polynomial coefficients
|
||||||
* @param $fcr (int) first root of RS code generator polynomial, index form
|
* @param int $fcr first root of RS code generator polynomial, index form
|
||||||
* @param $prim (int) primitive element to generate polynomial roots
|
* @param int $prim primitive element to generate polynomial roots
|
||||||
* @param $nroots (int) RS code generator polynomial degree (number of roots)
|
* @param int $nroots RS code generator polynomial degree (number of roots)
|
||||||
* @param $pad (int) padding bytes at front of shortened block
|
* @param int $pad padding bytes at front of shortened block
|
||||||
* @return array Array of RS values:<ul><li>mm = Bits per symbol;</li><li>nn = Symbols per block;</li><li>alpha_to = log lookup table array;</li><li>index_of = Antilog lookup table array;</li><li>genpoly = Generator polynomial array;</li><li>nroots = Number of generator;</li><li>roots = number of parity symbols;</li><li>fcr = First consecutive root, index form;</li><li>prim = Primitive element, index form;</li><li>iprim = prim-th root of 1, index form;</li><li>pad = Padding bytes in shortened block;</li><li>gfpoly</ul>.
|
* @return array Array of RS values:<ul><li>mm = Bits per symbol;</li><li>nn = Symbols per block;</li><li>alpha_to = log lookup table array;</li><li>index_of = Antilog lookup table array;</li><li>genpoly = Generator polynomial array;</li><li>nroots = Number of generator;</li><li>roots = number of parity symbols;</li><li>fcr = First consecutive root, index form;</li><li>prim = Primitive element, index form;</li><li>iprim = prim-th root of 1, index form;</li><li>pad = Padding bytes in shortened block;</li><li>gfpoly</ul>.
|
||||||
*/
|
*/
|
||||||
protected function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) {
|
protected function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) {
|
||||||
@@ -2719,8 +2694,8 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* modnn
|
* modnn
|
||||||
* @param $rs (array) RS values
|
* @param array $rs RS values
|
||||||
* @param $x (int) X position
|
* @param int $x X position
|
||||||
* @return int X osition
|
* @return int X osition
|
||||||
*/
|
*/
|
||||||
protected function modnn($rs, $x) {
|
protected function modnn($rs, $x) {
|
||||||
@@ -2733,12 +2708,12 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize a Reed-Solomon codec and returns an array of values.
|
* Initialize a Reed-Solomon codec and returns an array of values.
|
||||||
* @param $symsize (int) symbol size, bits
|
* @param int $symsize symbol size, bits
|
||||||
* @param $gfpoly (int) Field generator polynomial coefficients
|
* @param int $gfpoly Field generator polynomial coefficients
|
||||||
* @param $fcr (int) first root of RS code generator polynomial, index form
|
* @param int $fcr first root of RS code generator polynomial, index form
|
||||||
* @param $prim (int) primitive element to generate polynomial roots
|
* @param int $prim primitive element to generate polynomial roots
|
||||||
* @param $nroots (int) RS code generator polynomial degree (number of roots)
|
* @param int $nroots RS code generator polynomial degree (number of roots)
|
||||||
* @param $pad (int) padding bytes at front of shortened block
|
* @param int $pad padding bytes at front of shortened block
|
||||||
* @return array Array of RS values:<ul><li>mm = Bits per symbol;</li><li>nn = Symbols per block;</li><li>alpha_to = log lookup table array;</li><li>index_of = Antilog lookup table array;</li><li>genpoly = Generator polynomial array;</li><li>nroots = Number of generator;</li><li>roots = number of parity symbols;</li><li>fcr = First consecutive root, index form;</li><li>prim = Primitive element, index form;</li><li>iprim = prim-th root of 1, index form;</li><li>pad = Padding bytes in shortened block;</li><li>gfpoly</ul>.
|
* @return array Array of RS values:<ul><li>mm = Bits per symbol;</li><li>nn = Symbols per block;</li><li>alpha_to = log lookup table array;</li><li>index_of = Antilog lookup table array;</li><li>genpoly = Generator polynomial array;</li><li>nroots = Number of generator;</li><li>roots = number of parity symbols;</li><li>fcr = First consecutive root, index form;</li><li>prim = Primitive element, index form;</li><li>iprim = prim-th root of 1, index form;</li><li>pad = Padding bytes in shortened block;</li><li>gfpoly</ul>.
|
||||||
*/
|
*/
|
||||||
protected function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) {
|
protected function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) {
|
||||||
@@ -2820,9 +2795,9 @@ class QRcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode a Reed-Solomon codec and returns the parity array
|
* Encode a Reed-Solomon codec and returns the parity array
|
||||||
* @param $rs (array) RS values
|
* @param array $rs RS values
|
||||||
* @param $data (array) data
|
* @param array $data data
|
||||||
* @param $parity (array) parity
|
* @param array $parity parity
|
||||||
* @return parity array
|
* @return parity array
|
||||||
*/
|
*/
|
||||||
protected function encode_rs_char($rs, $data, $parity) {
|
protected function encode_rs_char($rs, $data, $parity) {
|
||||||
|
|||||||
22
vendor/tecnickcom/tcpdf/include/tcpdf_colors.php
vendored
22
vendor/tecnickcom/tcpdf/include/tcpdf_colors.php
vendored
@@ -240,9 +240,9 @@ class TCPDF_COLORS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the Spot color array.
|
* Return the Spot color array.
|
||||||
* @param $name (string) Name of the spot color.
|
* @param string $name Name of the spot color.
|
||||||
* @param $spotc (array) Reference to an array of spot colors.
|
* @param array $spotc Reference to an array of spot colors.
|
||||||
* @return (array) Spot color array or false if not defined.
|
* @return array|false Spot color array or false if not defined.
|
||||||
* @since 5.9.125 (2011-10-03)
|
* @since 5.9.125 (2011-10-03)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -264,10 +264,10 @@ class TCPDF_COLORS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array (RGB or CMYK) from an html color name, or a six-digit (i.e. #3FE5AA), or three-digit (i.e. #7FF) hexadecimal color, or a javascript color array, or javascript color name.
|
* Returns an array (RGB or CMYK) from an html color name, or a six-digit (i.e. #3FE5AA), or three-digit (i.e. #7FF) hexadecimal color, or a javascript color array, or javascript color name.
|
||||||
* @param $hcolor (string) HTML color.
|
* @param string $hcolor HTML color.
|
||||||
* @param $spotc (array) Reference to an array of spot colors.
|
* @param array $spotc Reference to an array of spot colors.
|
||||||
* @param $defcol (array) Color to return in case of error.
|
* @param array $defcol Color to return in case of error.
|
||||||
* @return array RGB or CMYK color, or false in case of error.
|
* @return array|false RGB or CMYK color, or false in case of error.
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function convertHTMLColorToDec($hcolor, &$spotc, $defcol=array('R'=>128,'G'=>128,'B'=>128)) {
|
public static function convertHTMLColorToDec($hcolor, &$spotc, $defcol=array('R'=>128,'G'=>128,'B'=>128)) {
|
||||||
@@ -407,8 +407,8 @@ class TCPDF_COLORS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert a color array into a string representation.
|
* Convert a color array into a string representation.
|
||||||
* @param $c (array) Array of colors.
|
* @param array $c Array of colors.
|
||||||
* @return (string) The color array representation.
|
* @return string The color array representation.
|
||||||
* @since 5.9.137 (2011-12-01)
|
* @since 5.9.137 (2011-12-01)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -438,7 +438,7 @@ class TCPDF_COLORS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert color to javascript color.
|
* Convert color to javascript color.
|
||||||
* @param $color (string) color name or "#RRGGBB"
|
* @param string $color color name or "#RRGGBB"
|
||||||
* @protected
|
* @protected
|
||||||
* @since 2.1.002 (2008-02-12)
|
* @since 2.1.002 (2008-02-12)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -449,7 +449,7 @@ class TCPDF_COLORS {
|
|||||||
}
|
}
|
||||||
if (!in_array($color, self::$jscolor)) {
|
if (!in_array($color, self::$jscolor)) {
|
||||||
// default transparent color
|
// default transparent color
|
||||||
$color = $jscolor[0];
|
$color = self::$jscolor[0];
|
||||||
}
|
}
|
||||||
return 'color.'.$color;
|
return 'color.'.$color;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class TCPDF_FILTERS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of available decoding filters.
|
* Get a list of available decoding filters.
|
||||||
* @return (array) Array of available filter decoders.
|
* @return array Array of available filter decoders.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -70,9 +70,9 @@ class TCPDF_FILTERS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode data using the specified filter type.
|
* Decode data using the specified filter type.
|
||||||
* @param $filter (string) Filter name.
|
* @param string $filter Filter name.
|
||||||
* @param $data (string) Data to decode.
|
* @param string $data Data to decode.
|
||||||
* @return Decoded data string.
|
* @return string Decoded data string.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -130,8 +130,8 @@ class TCPDF_FILTERS {
|
|||||||
/**
|
/**
|
||||||
* Standard
|
* Standard
|
||||||
* Default decoding filter (leaves data unchanged).
|
* Default decoding filter (leaves data unchanged).
|
||||||
* @param $data (string) Data to decode.
|
* @param string $data Data to decode.
|
||||||
* @return Decoded data string.
|
* @return string Decoded data string.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -142,8 +142,8 @@ class TCPDF_FILTERS {
|
|||||||
/**
|
/**
|
||||||
* ASCIIHexDecode
|
* ASCIIHexDecode
|
||||||
* Decodes data encoded in an ASCII hexadecimal representation, reproducing the original binary data.
|
* Decodes data encoded in an ASCII hexadecimal representation, reproducing the original binary data.
|
||||||
* @param $data (string) Data to decode.
|
* @param string $data Data to decode.
|
||||||
* @return Decoded data string.
|
* @return string Decoded data string.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -182,8 +182,8 @@ class TCPDF_FILTERS {
|
|||||||
/**
|
/**
|
||||||
* ASCII85Decode
|
* ASCII85Decode
|
||||||
* Decodes data encoded in an ASCII base-85 representation, reproducing the original binary data.
|
* Decodes data encoded in an ASCII base-85 representation, reproducing the original binary data.
|
||||||
* @param $data (string) Data to decode.
|
* @param string $data Data to decode.
|
||||||
* @return Decoded data string.
|
* @return string Decoded data string.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -266,8 +266,8 @@ class TCPDF_FILTERS {
|
|||||||
/**
|
/**
|
||||||
* LZWDecode
|
* LZWDecode
|
||||||
* Decompresses data encoded using the LZW (Lempel-Ziv-Welch) adaptive compression method, reproducing the original text or binary data.
|
* Decompresses data encoded using the LZW (Lempel-Ziv-Welch) adaptive compression method, reproducing the original text or binary data.
|
||||||
* @param $data (string) Data to decode.
|
* @param string $data Data to decode.
|
||||||
* @return Decoded data string.
|
* @return string Decoded data string.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -347,8 +347,8 @@ class TCPDF_FILTERS {
|
|||||||
/**
|
/**
|
||||||
* FlateDecode
|
* FlateDecode
|
||||||
* Decompresses data encoded using the zlib/deflate compression method, reproducing the original text or binary data.
|
* Decompresses data encoded using the zlib/deflate compression method, reproducing the original text or binary data.
|
||||||
* @param $data (string) Data to decode.
|
* @param string $data Data to decode.
|
||||||
* @return Decoded data string.
|
* @return string Decoded data string.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -364,7 +364,7 @@ class TCPDF_FILTERS {
|
|||||||
/**
|
/**
|
||||||
* RunLengthDecode
|
* RunLengthDecode
|
||||||
* Decompresses data encoded using a byte-oriented run-length encoding algorithm.
|
* Decompresses data encoded using a byte-oriented run-length encoding algorithm.
|
||||||
* @param $data (string) Data to decode.
|
* @param string $data Data to decode.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -400,8 +400,8 @@ class TCPDF_FILTERS {
|
|||||||
/**
|
/**
|
||||||
* CCITTFaxDecode (NOT IMPLEMETED - RETURN AN EXCEPTION)
|
* CCITTFaxDecode (NOT IMPLEMETED - RETURN AN EXCEPTION)
|
||||||
* Decompresses data encoded using the CCITT facsimile standard, reproducing the original data (typically monochrome image data at 1 bit per pixel).
|
* Decompresses data encoded using the CCITT facsimile standard, reproducing the original data (typically monochrome image data at 1 bit per pixel).
|
||||||
* @param $data (string) Data to decode.
|
* @param string $data Data to decode.
|
||||||
* @return Decoded data string.
|
* @return string Decoded data string.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -413,8 +413,8 @@ class TCPDF_FILTERS {
|
|||||||
/**
|
/**
|
||||||
* JBIG2Decode (NOT IMPLEMETED - RETURN AN EXCEPTION)
|
* JBIG2Decode (NOT IMPLEMETED - RETURN AN EXCEPTION)
|
||||||
* Decompresses data encoded using the JBIG2 standard, reproducing the original monochrome (1 bit per pixel) image data (or an approximation of that data).
|
* Decompresses data encoded using the JBIG2 standard, reproducing the original monochrome (1 bit per pixel) image data (or an approximation of that data).
|
||||||
* @param $data (string) Data to decode.
|
* @param string $data Data to decode.
|
||||||
* @return Decoded data string.
|
* @return string Decoded data string.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -426,8 +426,8 @@ class TCPDF_FILTERS {
|
|||||||
/**
|
/**
|
||||||
* DCTDecode (NOT IMPLEMETED - RETURN AN EXCEPTION)
|
* DCTDecode (NOT IMPLEMETED - RETURN AN EXCEPTION)
|
||||||
* Decompresses data encoded using a DCT (discrete cosine transform) technique based on the JPEG standard, reproducing image sample data that approximates the original data.
|
* Decompresses data encoded using a DCT (discrete cosine transform) technique based on the JPEG standard, reproducing image sample data that approximates the original data.
|
||||||
* @param $data (string) Data to decode.
|
* @param string $data Data to decode.
|
||||||
* @return Decoded data string.
|
* @return string Decoded data string.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -439,8 +439,8 @@ class TCPDF_FILTERS {
|
|||||||
/**
|
/**
|
||||||
* JPXDecode (NOT IMPLEMETED - RETURN AN EXCEPTION)
|
* JPXDecode (NOT IMPLEMETED - RETURN AN EXCEPTION)
|
||||||
* Decompresses data encoded using the wavelet-based JPEG2000 standard, reproducing the original image data.
|
* Decompresses data encoded using the wavelet-based JPEG2000 standard, reproducing the original image data.
|
||||||
* @param $data (string) Data to decode.
|
* @param string $data Data to decode.
|
||||||
* @return Decoded data string.
|
* @return string Decoded data string.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -452,8 +452,8 @@ class TCPDF_FILTERS {
|
|||||||
/**
|
/**
|
||||||
* Crypt (NOT IMPLEMETED - RETURN AN EXCEPTION)
|
* Crypt (NOT IMPLEMETED - RETURN AN EXCEPTION)
|
||||||
* Decrypts data encrypted by a security handler, reproducing the data as it was before encryption.
|
* Decrypts data encrypted by a security handler, reproducing the data as it was before encryption.
|
||||||
* @param $data (string) Data to decode.
|
* @param string $data Data to decode.
|
||||||
* @return Decoded data string.
|
* @return string Decoded data string.
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -466,7 +466,7 @@ class TCPDF_FILTERS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Throw an exception.
|
* Throw an exception.
|
||||||
* @param $msg (string) The error message
|
* @param string $msg The error message
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
|
|||||||
176
vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php
vendored
176
vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php
vendored
@@ -55,16 +55,16 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert and add the selected TrueType or Type1 font to the fonts folder (that must be writeable).
|
* Convert and add the selected TrueType or Type1 font to the fonts folder (that must be writeable).
|
||||||
* @param $fontfile (string) Font file (full path).
|
* @param string $fontfile Font file (full path).
|
||||||
* @param $fonttype (string) Font type. Leave empty for autodetect mode. Valid values are: TrueTypeUnicode, TrueType, Type1, CID0JP = CID-0 Japanese, CID0KR = CID-0 Korean, CID0CS = CID-0 Chinese Simplified, CID0CT = CID-0 Chinese Traditional.
|
* @param string $fonttype Font type. Leave empty for autodetect mode. Valid values are: TrueTypeUnicode, TrueType, Type1, CID0JP = CID-0 Japanese, CID0KR = CID-0 Korean, CID0CS = CID-0 Chinese Simplified, CID0CT = CID-0 Chinese Traditional.
|
||||||
* @param $enc (string) Name of the encoding table to use. Leave empty for default mode. Omit this parameter for TrueType Unicode and symbolic fonts like Symbol or ZapfDingBats.
|
* @param string $enc Name of the encoding table to use. Leave empty for default mode. Omit this parameter for TrueType Unicode and symbolic fonts like Symbol or ZapfDingBats.
|
||||||
* @param $flags (int) Unsigned 32-bit integer containing flags specifying various characteristics of the font (PDF32000:2008 - 9.8.2 Font Descriptor Flags): +1 for fixed font; +4 for symbol or +32 for non-symbol; +64 for italic. Fixed and Italic mode are generally autodetected so you have to set it to 32 = non-symbolic font (default) or 4 = symbolic font.
|
* @param int $flags Unsigned 32-bit integer containing flags specifying various characteristics of the font (PDF32000:2008 - 9.8.2 Font Descriptor Flags): +1 for fixed font; +4 for symbol or +32 for non-symbol; +64 for italic. Fixed and Italic mode are generally autodetected so you have to set it to 32 = non-symbolic font (default) or 4 = symbolic font.
|
||||||
* @param $outpath (string) Output path for generated font files (must be writeable by the web server). Leave empty for default font folder.
|
* @param string $outpath Output path for generated font files (must be writeable by the web server). Leave empty for default font folder.
|
||||||
* @param $platid (int) Platform ID for CMAP table to extract (when building a Unicode font for Windows this value should be 3, for Macintosh should be 1).
|
* @param int $platid Platform ID for CMAP table to extract (when building a Unicode font for Windows this value should be 3, for Macintosh should be 1).
|
||||||
* @param $encid (int) Encoding ID for CMAP table to extract (when building a Unicode font for Windows this value should be 1, for Macintosh should be 0). When Platform ID is 3, legal values for Encoding ID are: 0=Symbol, 1=Unicode, 2=ShiftJIS, 3=PRC, 4=Big5, 5=Wansung, 6=Johab, 7=Reserved, 8=Reserved, 9=Reserved, 10=UCS-4.
|
* @param int $encid Encoding ID for CMAP table to extract (when building a Unicode font for Windows this value should be 1, for Macintosh should be 0). When Platform ID is 3, legal values for Encoding ID are: 0=Symbol, 1=Unicode, 2=ShiftJIS, 3=PRC, 4=Big5, 5=Wansung, 6=Johab, 7=Reserved, 8=Reserved, 9=Reserved, 10=UCS-4.
|
||||||
* @param $addcbbox (boolean) If true includes the character bounding box information on the php font file.
|
* @param boolean $addcbbox If true includes the character bounding box information on the php font file.
|
||||||
* @param $link (boolean) If true link to system font instead of copying the font data (not transportable) - Note: do not work with Type1 fonts.
|
* @param boolean $link If true link to system font instead of copying the font data (not transportable) - Note: do not work with Type1 fonts.
|
||||||
* @return (string) TCPDF font name or boolean false in case of error.
|
* @return string|false TCPDF font name or boolean false in case of error.
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.9.123 (2010-09-30)
|
* @since 5.9.123 (2010-09-30)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -557,6 +557,7 @@ class TCPDF_FONTS {
|
|||||||
$numGlyphs = TCPDF_STATIC::_getUSHORT($font, $offset);
|
$numGlyphs = TCPDF_STATIC::_getUSHORT($font, $offset);
|
||||||
// ---------- get CIDToGIDMap ----------
|
// ---------- get CIDToGIDMap ----------
|
||||||
$ctg = array();
|
$ctg = array();
|
||||||
|
$c = 0;
|
||||||
foreach ($encodingTables as $enctable) {
|
foreach ($encodingTables as $enctable) {
|
||||||
// get only specified Platform ID and Encoding ID
|
// get only specified Platform ID and Encoding ID
|
||||||
if (($enctable['platformID'] == $platid) AND ($enctable['encodingID'] == $encid)) {
|
if (($enctable['platformID'] == $platid) AND ($enctable['encodingID'] == $encid)) {
|
||||||
@@ -920,8 +921,8 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returs the checksum of a TTF table.
|
* Returs the checksum of a TTF table.
|
||||||
* @param $table (string) table to check
|
* @param string $table table to check
|
||||||
* @param $length (int) length of table in bytes
|
* @param int $length length of table in bytes
|
||||||
* @return int checksum
|
* @return int checksum
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.2.000 (2010-06-02)
|
* @since 5.2.000 (2010-06-02)
|
||||||
@@ -942,9 +943,9 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a subset of the TrueType font data without the unused glyphs.
|
* Returns a subset of the TrueType font data without the unused glyphs.
|
||||||
* @param $font (string) TrueType font data.
|
* @param string $font TrueType font data.
|
||||||
* @param $subsetchars (array) Array of used characters (the glyphs to keep).
|
* @param array $subsetchars Array of used characters (the glyphs to keep).
|
||||||
* @return (string) A subset of TrueType font data without the unused glyphs.
|
* @return string A subset of TrueType font data without the unused glyphs.
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.2.000 (2010-06-02)
|
* @since 5.2.000 (2010-06-02)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -956,6 +957,7 @@ class TCPDF_FONTS {
|
|||||||
// sfnt version must be 0x00010000 for TrueType version 1.0.
|
// sfnt version must be 0x00010000 for TrueType version 1.0.
|
||||||
return $font;
|
return $font;
|
||||||
}
|
}
|
||||||
|
$c = 0;
|
||||||
$offset += 4;
|
$offset += 4;
|
||||||
// get number of tables
|
// get number of tables
|
||||||
$numTables = TCPDF_STATIC::_getUSHORT($font, $offset);
|
$numTables = TCPDF_STATIC::_getUSHORT($font, $offset);
|
||||||
@@ -1387,9 +1389,9 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Outputs font widths
|
* Outputs font widths
|
||||||
* @param $font (array) font data
|
* @param array $font font data
|
||||||
* @param $cidoffset (int) offset for CID values
|
* @param int $cidoffset offset for CID values
|
||||||
* @return PDF command string for font widths
|
* @return string PDF command string for font widths
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 4.4.000 (2008-12-07)
|
* @since 4.4.000 (2008-12-07)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -1495,10 +1497,10 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the CIDToGIDMap string with a new value.
|
* Update the CIDToGIDMap string with a new value.
|
||||||
* @param $map (string) CIDToGIDMap.
|
* @param string $map CIDToGIDMap.
|
||||||
* @param $cid (int) CID value.
|
* @param int $cid CID value.
|
||||||
* @param $gid (int) GID value.
|
* @param int $gid GID value.
|
||||||
* @return (string) CIDToGIDMap.
|
* @return string CIDToGIDMap.
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.9.123 (2011-09-29)
|
* @since 5.9.123 (2011-09-29)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -1533,8 +1535,8 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return font full path
|
* Return font full path
|
||||||
* @param $file (string) Font file name.
|
* @param string $file Font file name.
|
||||||
* @param $fontdir (string) Font directory (set to false fto search on default directories)
|
* @param string $fontdir Font directory (set to false fto search on default directories)
|
||||||
* @return string Font full path or empty string
|
* @return string Font full path or empty string
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 6.0.025
|
* @since 6.0.025
|
||||||
@@ -1558,8 +1560,8 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a reference font size.
|
* Get a reference font size.
|
||||||
* @param $size (string) String containing font size value.
|
* @param string $size String containing font size value.
|
||||||
* @param $refsize (float) Reference font size in points.
|
* @param float $refsize Reference font size in points.
|
||||||
* @return float value in points
|
* @return float value in points
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -1657,9 +1659,9 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the unicode caracter specified by the value
|
* Returns the unicode caracter specified by the value
|
||||||
* @param $c (int) UTF-8 value
|
* @param int $c UTF-8 value
|
||||||
* @param $unicode (boolean) True if we are in unicode mode, false otherwise.
|
* @param boolean $unicode True if we are in unicode mode, false otherwise.
|
||||||
* @return Returns the specified character.
|
* @return string Returns the specified character.
|
||||||
* @since 2.3.000 (2008-03-05)
|
* @since 2.3.000 (2008-03-05)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -1686,8 +1688,8 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the unicode caracter specified by UTF-8 value
|
* Returns the unicode caracter specified by UTF-8 value
|
||||||
* @param $c (int) UTF-8 value
|
* @param int $c UTF-8 value
|
||||||
* @return Returns the specified character.
|
* @return string Returns the specified character.
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function unichrUnicode($c) {
|
public static function unichrUnicode($c) {
|
||||||
@@ -1696,8 +1698,8 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the unicode caracter specified by ASCII value
|
* Returns the unicode caracter specified by ASCII value
|
||||||
* @param $c (int) UTF-8 value
|
* @param int $c UTF-8 value
|
||||||
* @return Returns the specified character.
|
* @return string Returns the specified character.
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function unichrASCII($c) {
|
public static function unichrASCII($c) {
|
||||||
@@ -1734,8 +1736,8 @@ class TCPDF_FONTS {
|
|||||||
* W1 = 110110yyyyyyyyyy
|
* W1 = 110110yyyyyyyyyy
|
||||||
* W2 = 110111xxxxxxxxxx
|
* W2 = 110111xxxxxxxxxx
|
||||||
* </pre>
|
* </pre>
|
||||||
* @param $unicode (array) array containing UTF-8 unicode values
|
* @param array $unicode array containing UTF-8 unicode values
|
||||||
* @param $setbom (boolean) if true set the Byte Order Mark (BOM = 0xFEFF)
|
* @param boolean $setbom if true set the Byte Order Mark (BOM = 0xFEFF)
|
||||||
* @return string
|
* @return string
|
||||||
* @protected
|
* @protected
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
@@ -1770,9 +1772,9 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert an array of UTF8 values to array of unicode characters
|
* Convert an array of UTF8 values to array of unicode characters
|
||||||
* @param $ta (array) The input array of UTF8 values.
|
* @param array $ta The input array of UTF8 values.
|
||||||
* @param $isunicode (boolean) True for Unicode mode, false otherwise.
|
* @param boolean $isunicode True for Unicode mode, false otherwise.
|
||||||
* @return Return array of unicode characters
|
* @return array Return array of unicode characters
|
||||||
* @since 4.5.037 (2009-04-07)
|
* @since 4.5.037 (2009-04-07)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -1785,11 +1787,11 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract a slice of the $strarr array and return it as string.
|
* Extract a slice of the $strarr array and return it as string.
|
||||||
* @param $strarr (string) The input array of characters.
|
* @param string[] $strarr The input array of characters.
|
||||||
* @param $start (int) the starting element of $strarr.
|
* @param int $start the starting element of $strarr.
|
||||||
* @param $end (int) first element that will not be returned.
|
* @param int $end first element that will not be returned.
|
||||||
* @param $unicode (boolean) True if we are in unicode mode, false otherwise.
|
* @param boolean $unicode True if we are in unicode mode, false otherwise.
|
||||||
* @return Return part of a string
|
* @return string Return part of a string
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function UTF8ArrSubString($strarr, $start='', $end='', $unicode=true) {
|
public static function UTF8ArrSubString($strarr, $start='', $end='', $unicode=true) {
|
||||||
@@ -1808,10 +1810,10 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract a slice of the $uniarr array and return it as string.
|
* Extract a slice of the $uniarr array and return it as string.
|
||||||
* @param $uniarr (string) The input array of characters.
|
* @param string[] $uniarr The input array of characters.
|
||||||
* @param $start (int) the starting element of $strarr.
|
* @param int $start the starting element of $strarr.
|
||||||
* @param $end (int) first element that will not be returned.
|
* @param int $end first element that will not be returned.
|
||||||
* @return Return part of a string
|
* @return string Return part of a string
|
||||||
* @since 4.5.037 (2009-04-07)
|
* @since 4.5.037 (2009-04-07)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -1831,7 +1833,7 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts UTF-8 characters array to array of Latin1 characters array<br>
|
* Converts UTF-8 characters array to array of Latin1 characters array<br>
|
||||||
* @param $unicode (array) array containing UTF-8 unicode values
|
* @param array $unicode array containing UTF-8 unicode values
|
||||||
* @return array
|
* @return array
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 4.8.023 (2010-01-15)
|
* @since 4.8.023 (2010-01-15)
|
||||||
@@ -1855,9 +1857,9 @@ class TCPDF_FONTS {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts UTF-8 characters array to array of Latin1 string<br>
|
* Converts UTF-8 characters array to Latin1 string<br>
|
||||||
* @param $unicode (array) array containing UTF-8 unicode values
|
* @param array $unicode array containing UTF-8 unicode values
|
||||||
* @return array
|
* @return string
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 4.8.023 (2010-01-15)
|
* @since 4.8.023 (2010-01-15)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -1882,8 +1884,8 @@ class TCPDF_FONTS {
|
|||||||
/**
|
/**
|
||||||
* Converts UTF-8 character to integer value.<br>
|
* Converts UTF-8 character to integer value.<br>
|
||||||
* Uses the getUniord() method if the value is not cached.
|
* Uses the getUniord() method if the value is not cached.
|
||||||
* @param $uch (string) character string to process.
|
* @param string $uch character string to process.
|
||||||
* @return integer Unicode value
|
* @return int Unicode value
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function uniord($uch) {
|
public static function uniord($uch) {
|
||||||
@@ -1921,8 +1923,8 @@ class TCPDF_FONTS {
|
|||||||
* UTF8-tail = %x80-BF
|
* UTF8-tail = %x80-BF
|
||||||
* ---------------------------------------------------------------------
|
* ---------------------------------------------------------------------
|
||||||
* </pre>
|
* </pre>
|
||||||
* @param $uch (string) character string to process.
|
* @param string $uch character string to process.
|
||||||
* @return integer Unicode value
|
* @return int Unicode value
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -1988,14 +1990,14 @@ class TCPDF_FONTS {
|
|||||||
/**
|
/**
|
||||||
* Converts UTF-8 strings to codepoints array.<br>
|
* Converts UTF-8 strings to codepoints array.<br>
|
||||||
* Invalid byte sequences will be replaced with 0xFFFD (replacement character)<br>
|
* Invalid byte sequences will be replaced with 0xFFFD (replacement character)<br>
|
||||||
* @param $str (string) string to process.
|
* @param string $str string to process.
|
||||||
* @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise.
|
* @param boolean $isunicode True when the documetn is in Unicode mode, false otherwise.
|
||||||
* @param $currentfont (array) Reference to current font array.
|
* @param array $currentfont Reference to current font array.
|
||||||
* @return array containing codepoints (UTF-8 characters values)
|
* @return array containing codepoints (UTF-8 characters values)
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function UTF8StringToArray($str, $isunicode=true, &$currentfont) {
|
public static function UTF8StringToArray($str, $isunicode, &$currentfont) {
|
||||||
if ($isunicode) {
|
if ($isunicode) {
|
||||||
// requires PCRE unicode support turned on
|
// requires PCRE unicode support turned on
|
||||||
$chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY);
|
$chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY);
|
||||||
@@ -2014,30 +2016,30 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.<br>
|
* Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.<br>
|
||||||
* @param $str (string) string to process.
|
* @param string $str string to process.
|
||||||
* @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise.
|
* @param boolean $isunicode True when the documetn is in Unicode mode, false otherwise.
|
||||||
* @param $currentfont (array) Reference to current font array.
|
* @param array $currentfont Reference to current font array.
|
||||||
* @return string
|
* @return string
|
||||||
* @since 3.2.000 (2008-06-23)
|
* @since 3.2.000 (2008-06-23)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function UTF8ToLatin1($str, $isunicode=true, &$currentfont) {
|
public static function UTF8ToLatin1($str, $isunicode, &$currentfont) {
|
||||||
$unicode = self::UTF8StringToArray($str, $isunicode, $currentfont); // array containing UTF-8 unicode values
|
$unicode = self::UTF8StringToArray($str, $isunicode, $currentfont); // array containing UTF-8 unicode values
|
||||||
return self::UTF8ArrToLatin1($unicode);
|
return self::UTF8ArrToLatin1($unicode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts UTF-8 strings to UTF16-BE.<br>
|
* Converts UTF-8 strings to UTF16-BE.<br>
|
||||||
* @param $str (string) string to process.
|
* @param string $str string to process.
|
||||||
* @param $setbom (boolean) if true set the Byte Order Mark (BOM = 0xFEFF)
|
* @param boolean $setbom if true set the Byte Order Mark (BOM = 0xFEFF)
|
||||||
* @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise.
|
* @param boolean $isunicode True when the documetn is in Unicode mode, false otherwise.
|
||||||
* @param $currentfont (array) Reference to current font array.
|
* @param array $currentfont Reference to current font array.
|
||||||
* @return string
|
* @return string
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 1.53.0.TC005 (2005-01-05)
|
* @since 1.53.0.TC005 (2005-01-05)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function UTF8ToUTF16BE($str, $setbom=false, $isunicode=true, &$currentfont) {
|
public static function UTF8ToUTF16BE($str, $setbom, $isunicode, &$currentfont) {
|
||||||
if (!$isunicode) {
|
if (!$isunicode) {
|
||||||
return $str; // string is not in unicode
|
return $str; // string is not in unicode
|
||||||
}
|
}
|
||||||
@@ -2047,50 +2049,50 @@ class TCPDF_FONTS {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
|
* Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
|
||||||
* @param $str (string) string to manipulate.
|
* @param string $str string to manipulate.
|
||||||
* @param $setbom (bool) if true set the Byte Order Mark (BOM = 0xFEFF)
|
* @param bool $setbom if true set the Byte Order Mark (BOM = 0xFEFF)
|
||||||
* @param $forcertl (bool) if true forces RTL text direction
|
* @param bool $forcertl if true forces RTL text direction
|
||||||
* @param $isunicode (boolean) True if the document is in Unicode mode, false otherwise.
|
* @param boolean $isunicode True if the document is in Unicode mode, false otherwise.
|
||||||
* @param $currentfont (array) Reference to current font array.
|
* @param array $currentfont Reference to current font array.
|
||||||
* @return string
|
* @return string
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 2.1.000 (2008-01-08)
|
* @since 2.1.000 (2008-01-08)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function utf8StrRev($str, $setbom=false, $forcertl=false, $isunicode=true, &$currentfont) {
|
public static function utf8StrRev($str, $setbom, $forcertl, $isunicode, &$currentfont) {
|
||||||
return self::utf8StrArrRev(self::UTF8StringToArray($str, $isunicode, $currentfont), $str, $setbom, $forcertl, $isunicode, $currentfont);
|
return self::utf8StrArrRev(self::UTF8StringToArray($str, $isunicode, $currentfont), $str, $setbom, $forcertl, $isunicode, $currentfont);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverse the RLT substrings array using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
|
* Reverse the RLT substrings array using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
|
||||||
* @param $arr (array) array of unicode values.
|
* @param array $arr array of unicode values.
|
||||||
* @param $str (string) string to manipulate (or empty value).
|
* @param string $str string to manipulate (or empty value).
|
||||||
* @param $setbom (bool) if true set the Byte Order Mark (BOM = 0xFEFF)
|
* @param bool $setbom if true set the Byte Order Mark (BOM = 0xFEFF)
|
||||||
* @param $forcertl (bool) if true forces RTL text direction
|
* @param bool $forcertl if true forces RTL text direction
|
||||||
* @param $isunicode (boolean) True if the document is in Unicode mode, false otherwise.
|
* @param boolean $isunicode True if the document is in Unicode mode, false otherwise.
|
||||||
* @param $currentfont (array) Reference to current font array.
|
* @param array $currentfont Reference to current font array.
|
||||||
* @return string
|
* @return string
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 4.9.000 (2010-03-27)
|
* @since 4.9.000 (2010-03-27)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function utf8StrArrRev($arr, $str='', $setbom=false, $forcertl=false, $isunicode=true, &$currentfont) {
|
public static function utf8StrArrRev($arr, $str, $setbom, $forcertl, $isunicode, &$currentfont) {
|
||||||
return self::arrUTF8ToUTF16BE(self::utf8Bidi($arr, $str, $forcertl, $isunicode, $currentfont), $setbom);
|
return self::arrUTF8ToUTF16BE(self::utf8Bidi($arr, $str, $forcertl, $isunicode, $currentfont), $setbom);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
|
* Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
|
||||||
* @param $ta (array) array of characters composing the string.
|
* @param array $ta array of characters composing the string.
|
||||||
* @param $str (string) string to process
|
* @param string $str string to process
|
||||||
* @param $forcertl (bool) if 'R' forces RTL, if 'L' forces LTR
|
* @param bool $forcertl if 'R' forces RTL, if 'L' forces LTR
|
||||||
* @param $isunicode (boolean) True if the document is in Unicode mode, false otherwise.
|
* @param boolean $isunicode True if the document is in Unicode mode, false otherwise.
|
||||||
* @param $currentfont (array) Reference to current font array.
|
* @param array $currentfont Reference to current font array.
|
||||||
* @return array of unicode chars
|
* @return array of unicode chars
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 2.4.000 (2008-03-06)
|
* @since 2.4.000 (2008-03-06)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function utf8Bidi($ta, $str='', $forcertl=false, $isunicode=true, &$currentfont) {
|
public static function utf8Bidi($ta, $str, $forcertl, $isunicode, &$currentfont) {
|
||||||
// paragraph embedding level
|
// paragraph embedding level
|
||||||
$pel = 0;
|
$pel = 0;
|
||||||
// max level
|
// max level
|
||||||
|
|||||||
37
vendor/tecnickcom/tcpdf/include/tcpdf_images.php
vendored
37
vendor/tecnickcom/tcpdf/include/tcpdf_images.php
vendored
@@ -55,6 +55,8 @@ class TCPDF_IMAGES {
|
|||||||
* Array of hinheritable SVG properties.
|
* Array of hinheritable SVG properties.
|
||||||
* @since 5.0.000 (2010-05-02)
|
* @since 5.0.000 (2010-05-02)
|
||||||
* @public static
|
* @public static
|
||||||
|
*
|
||||||
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
public static $svginheritprop = array('clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cursor', 'direction', 'display', 'fill', 'fill-opacity', 'fill-rule', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'image-rendering', 'kerning', 'letter-spacing', 'marker', 'marker-end', 'marker-mid', 'marker-start', 'pointer-events', 'shape-rendering', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-rendering', 'visibility', 'word-spacing', 'writing-mode');
|
public static $svginheritprop = array('clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cursor', 'direction', 'display', 'fill', 'fill-opacity', 'fill-rule', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'image-rendering', 'kerning', 'letter-spacing', 'marker', 'marker-end', 'marker-mid', 'marker-start', 'pointer-events', 'shape-rendering', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-rendering', 'visibility', 'word-spacing', 'writing-mode');
|
||||||
|
|
||||||
@@ -62,8 +64,8 @@ class TCPDF_IMAGES {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the image type given the file name or array returned by getimagesize() function.
|
* Return the image type given the file name or array returned by getimagesize() function.
|
||||||
* @param $imgfile (string) image file name
|
* @param string $imgfile image file name
|
||||||
* @param $iminfo (array) array of image information returned by getimagesize() function.
|
* @param array $iminfo array of image information returned by getimagesize() function.
|
||||||
* @return string image type
|
* @return string image type
|
||||||
* @since 4.8.017 (2009-11-27)
|
* @since 4.8.017 (2009-11-27)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -77,10 +79,7 @@ class TCPDF_IMAGES {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (empty($type)) {
|
if (empty($type)) {
|
||||||
$fileinfo = pathinfo($imgfile);
|
$type = strtolower(trim(pathinfo(parse_url($imgfile, PHP_URL_PATH), PATHINFO_EXTENSION)));
|
||||||
if (isset($fileinfo['extension']) AND (!TCPDF_STATIC::empty_string($fileinfo['extension']))) {
|
|
||||||
$type = strtolower(trim($fileinfo['extension']));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ($type == 'jpg') {
|
if ($type == 'jpg') {
|
||||||
$type = 'jpeg';
|
$type = 'jpeg';
|
||||||
@@ -90,9 +89,9 @@ class TCPDF_IMAGES {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the transparency for the given GD image.
|
* Set the transparency for the given GD image.
|
||||||
* @param $new_image (image) GD image object
|
* @param resource $new_image GD image object
|
||||||
* @param $image (image) GD image object.
|
* @param resource $image GD image object.
|
||||||
* return GD image object.
|
* @return resource GD image object $new_image
|
||||||
* @since 4.9.016 (2010-04-20)
|
* @since 4.9.016 (2010-04-20)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -115,8 +114,8 @@ class TCPDF_IMAGES {
|
|||||||
/**
|
/**
|
||||||
* Convert the loaded image to a PNG and then return a structure for the PDF creator.
|
* Convert the loaded image to a PNG and then return a structure for the PDF creator.
|
||||||
* This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.
|
* This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.
|
||||||
* @param $image (image) Image object.
|
* @param resource $image Image object.
|
||||||
* @param $tempfile (string) Temporary file name.
|
* @param string $tempfile Temporary file name.
|
||||||
* return image PNG image object.
|
* return image PNG image object.
|
||||||
* @since 4.9.016 (2010-04-20)
|
* @since 4.9.016 (2010-04-20)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -138,10 +137,10 @@ class TCPDF_IMAGES {
|
|||||||
/**
|
/**
|
||||||
* Convert the loaded image to a JPEG and then return a structure for the PDF creator.
|
* Convert the loaded image to a JPEG and then return a structure for the PDF creator.
|
||||||
* This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.
|
* This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.
|
||||||
* @param $image (image) Image object.
|
* @param resource $image Image object.
|
||||||
* @param $quality (int) JPEG quality.
|
* @param int $quality JPEG quality.
|
||||||
* @param $tempfile (string) Temporary file name.
|
* @param string $tempfile Temporary file name.
|
||||||
* return image JPEG image object.
|
* return array|false image JPEG image object.
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function _toJPEG($image, $quality, $tempfile) {
|
public static function _toJPEG($image, $quality, $tempfile) {
|
||||||
@@ -155,8 +154,8 @@ class TCPDF_IMAGES {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract info from a JPEG file without using the GD library.
|
* Extract info from a JPEG file without using the GD library.
|
||||||
* @param $file (string) image file to parse
|
* @param string $file image file to parse
|
||||||
* @return array structure containing the image data
|
* @return array|false structure containing the image data
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function _parsejpeg($file) {
|
public static function _parsejpeg($file) {
|
||||||
@@ -234,8 +233,8 @@ class TCPDF_IMAGES {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract info from a PNG file without using the GD library.
|
* Extract info from a PNG file without using the GD library.
|
||||||
* @param $file (string) image file to parse
|
* @param string $file image file to parse
|
||||||
* @return array structure containing the image data
|
* @return array|false structure containing the image data
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function _parsepng($file) {
|
public static function _parsepng($file) {
|
||||||
|
|||||||
321
vendor/tecnickcom/tcpdf/include/tcpdf_static.php
vendored
321
vendor/tecnickcom/tcpdf/include/tcpdf_static.php
vendored
@@ -55,7 +55,7 @@ class TCPDF_STATIC {
|
|||||||
* Current TCPDF version.
|
* Current TCPDF version.
|
||||||
* @private static
|
* @private static
|
||||||
*/
|
*/
|
||||||
private static $tcpdf_version = '6.3.5';
|
private static $tcpdf_version = '6.4.2';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* String alias for total number of pages.
|
* String alias for total number of pages.
|
||||||
@@ -110,7 +110,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the current TCPDF version.
|
* Return the current TCPDF version.
|
||||||
* @return TCPDF version string
|
* @return string TCPDF version string
|
||||||
* @since 5.9.012 (2010-11-10)
|
* @since 5.9.012 (2010-11-10)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -120,7 +120,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the current TCPDF producer.
|
* Return the current TCPDF producer.
|
||||||
* @return TCPDF producer string
|
* @return string TCPDF producer string
|
||||||
* @since 6.0.000 (2013-03-16)
|
* @since 6.0.000 (2013-03-16)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -130,7 +130,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the current active configuration setting of magic_quotes_runtime (if the set_magic_quotes_runtime function exist)
|
* Sets the current active configuration setting of magic_quotes_runtime (if the set_magic_quotes_runtime function exist)
|
||||||
* @param $mqr (boolean) FALSE for off, TRUE for on.
|
* @param boolean $mqr FALSE for off, TRUE for on.
|
||||||
* @since 4.6.025 (2009-08-17)
|
* @since 4.6.025 (2009-08-17)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -146,7 +146,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current active configuration setting of magic_quotes_runtime (if the get_magic_quotes_runtime function exist)
|
* Gets the current active configuration setting of magic_quotes_runtime (if the get_magic_quotes_runtime function exist)
|
||||||
* @return Returns 0 if magic quotes runtime is off or get_magic_quotes_runtime doesn't exist, 1 otherwise.
|
* @return int Returns 0 if magic quotes runtime is off or get_magic_quotes_runtime doesn't exist, 1 otherwise.
|
||||||
* @since 4.6.025 (2009-08-17)
|
* @since 4.6.025 (2009-08-17)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -163,13 +163,16 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the URL exist.
|
* Check if the URL exist.
|
||||||
* @param $url (string) URL to check.
|
* @param string $url URL to check.
|
||||||
* @return Boolean true if the URl exist, false otherwise.
|
* @return boolean true if the URl exist, false otherwise.
|
||||||
* @since 5.9.204 (2013-01-28)
|
* @since 5.9.204 (2013-01-28)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function isValidURL($url) {
|
public static function isValidURL($url) {
|
||||||
$headers = @get_headers($url);
|
$headers = @get_headers($url);
|
||||||
|
if ($headers === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return (strpos($headers[0], '200') !== false);
|
return (strpos($headers[0], '200') !== false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,8 +187,8 @@ class TCPDF_STATIC {
|
|||||||
* <li>UTF-8 (hex): 0xC2 0xAD (c2ad)</li>
|
* <li>UTF-8 (hex): 0xC2 0xAD (c2ad)</li>
|
||||||
* <li>UTF-8 character: chr(194).chr(173)</li>
|
* <li>UTF-8 character: chr(194).chr(173)</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* @param $txt (string) input string
|
* @param string $txt input string
|
||||||
* @param $unicode (boolean) True if we are in unicode mode, false otherwise.
|
* @param boolean $unicode True if we are in unicode mode, false otherwise.
|
||||||
* @return string without SHY characters.
|
* @return string without SHY characters.
|
||||||
* @since (4.5.019) 2009-02-28
|
* @since (4.5.019) 2009-02-28
|
||||||
* @public static
|
* @public static
|
||||||
@@ -201,10 +204,10 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the border mode accounting for multicell position (opens bottom side of multicell crossing pages)
|
* Get the border mode accounting for multicell position (opens bottom side of multicell crossing pages)
|
||||||
* @param $brd (mixed) Indicates if borders must be drawn around the cell block. The value can be a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> or an array of line styles for each border group: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)))
|
* @param string|array|int $brd Indicates if borders must be drawn around the cell block. The value can be a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> or an array of line styles for each border group: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)))
|
||||||
* @param $position (string) multicell position: 'start', 'middle', 'end'
|
* @param string $position multicell position: 'start', 'middle', 'end'
|
||||||
* @param $opencell (boolean) True when the cell is left open at the page bottom, false otherwise.
|
* @param boolean $opencell True when the cell is left open at the page bottom, false otherwise.
|
||||||
* @return border mode array
|
* @return array border mode array
|
||||||
* @since 4.4.002 (2008-12-09)
|
* @since 4.4.002 (2008-12-09)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -275,8 +278,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine whether a string is empty.
|
* Determine whether a string is empty.
|
||||||
* @param $str (string) string to be checked
|
* @param string $str string to be checked
|
||||||
* @return boolean true if string is empty
|
* @return bool true if string is empty
|
||||||
* @since 4.5.044 (2009-04-16)
|
* @since 4.5.044 (2009-04-16)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -286,8 +289,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a temporary filename for caching object on filesystem.
|
* Returns a temporary filename for caching object on filesystem.
|
||||||
* @param $type (string) Type of file (name of the subdir on the tcpdf cache folder).
|
* @param string $type Type of file (name of the subdir on the tcpdf cache folder).
|
||||||
* @param $file_id (string) TCPDF file_id.
|
* @param string $file_id TCPDF file_id.
|
||||||
* @return string filename.
|
* @return string filename.
|
||||||
* @since 4.5.000 (2008-12-31)
|
* @since 4.5.000 (2008-12-31)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -298,7 +301,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add "\" before "\", "(" and ")"
|
* Add "\" before "\", "(" and ")"
|
||||||
* @param $s (string) string to escape.
|
* @param string $s string to escape.
|
||||||
* @return string escaped string.
|
* @return string escaped string.
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -309,8 +312,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Escape some special characters (< > &) for XML output.
|
* Escape some special characters (< > &) for XML output.
|
||||||
* @param $str (string) Input string to convert.
|
* @param string $str Input string to convert.
|
||||||
* @return converted string
|
* @return string converted string
|
||||||
* @since 5.9.121 (2011-09-28)
|
* @since 5.9.121 (2011-09-28)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -322,8 +325,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a copy of a class object
|
* Creates a copy of a class object
|
||||||
* @param $object (object) class object to be cloned
|
* @param object $object class object to be cloned
|
||||||
* @return cloned object
|
* @return object cloned object
|
||||||
* @since 4.5.029 (2009-03-19)
|
* @since 4.5.029 (2009-03-19)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -337,8 +340,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Output input data and compress it if possible.
|
* Output input data and compress it if possible.
|
||||||
* @param $data (string) Data to output.
|
* @param string $data Data to output.
|
||||||
* @param $length (int) Data length in bytes.
|
* @param int $length Data length in bytes.
|
||||||
* @since 5.9.086
|
* @since 5.9.086
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -352,10 +355,10 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace page number aliases with number.
|
* Replace page number aliases with number.
|
||||||
* @param $page (string) Page content.
|
* @param string $page Page content.
|
||||||
* @param $replace (array) Array of replacements (array keys are replacement strings, values are alias arrays).
|
* @param array $replace Array of replacements (array keys are replacement strings, values are alias arrays).
|
||||||
* @param $diff (int) If passed, this will be set to the total char number difference between alias and replacements.
|
* @param int $diff If passed, this will be set to the total char number difference between alias and replacements.
|
||||||
* @return replaced page content and updated $diff parameter as array.
|
* @return array replaced page content and updated $diff parameter as array.
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function replacePageNumAliases($page, $replace, $diff=0) {
|
public static function replacePageNumAliases($page, $replace, $diff=0) {
|
||||||
@@ -372,7 +375,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns timestamp in seconds from formatted date-time.
|
* Returns timestamp in seconds from formatted date-time.
|
||||||
* @param $date (string) Formatted date-time.
|
* @param string $date Formatted date-time.
|
||||||
* @return int seconds.
|
* @return int seconds.
|
||||||
* @since 5.9.152 (2012-03-23)
|
* @since 5.9.152 (2012-03-23)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -387,7 +390,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a formatted date-time.
|
* Returns a formatted date-time.
|
||||||
* @param $time (int) Time in seconds.
|
* @param int $time Time in seconds.
|
||||||
* @return string escaped date string.
|
* @return string escaped date string.
|
||||||
* @since 5.9.152 (2012-03-23)
|
* @since 5.9.152 (2012-03-23)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -398,7 +401,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a string containing random data to be used as a seed for encryption methods.
|
* Returns a string containing random data to be used as a seed for encryption methods.
|
||||||
* @param $seed (string) starting seed value
|
* @param string $seed starting seed value
|
||||||
* @return string containing random data
|
* @return string containing random data
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.9.006 (2010-10-19)
|
* @since 5.9.006 (2010-10-19)
|
||||||
@@ -422,8 +425,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Encrypts a string using MD5 and returns it's value as a binary string.
|
* Encrypts a string using MD5 and returns it's value as a binary string.
|
||||||
* @param $str (string) input string
|
* @param string $str input string
|
||||||
* @return String MD5 encrypted binary string
|
* @return string MD5 encrypted binary string
|
||||||
* @since 2.0.000 (2008-01-02)
|
* @since 2.0.000 (2008-01-02)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -432,11 +435,11 @@ class TCPDF_STATIC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the input text exrypted using AES algorithm and the specified key.
|
* Returns the input text encrypted using AES algorithm and the specified key.
|
||||||
* This method requires openssl or mcrypt. Text is padded to 16bytes blocks
|
* This method requires openssl or mcrypt. Text is padded to 16bytes blocks
|
||||||
* @param $key (string) encryption key
|
* @param string $key encryption key
|
||||||
* @param $text (String) input text to be encrypted
|
* @param string $text input text to be encrypted
|
||||||
* @return String encrypted text
|
* @return string encrypted text
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.0.005 (2010-05-11)
|
* @since 5.0.005 (2010-05-11)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -457,11 +460,11 @@ class TCPDF_STATIC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the input text exrypted using AES algorithm and the specified key.
|
* Returns the input text encrypted using AES algorithm and the specified key.
|
||||||
* This method requires openssl or mcrypt. Text is not padded
|
* This method requires openssl or mcrypt. Text is not padded
|
||||||
* @param $key (string) encryption key
|
* @param string $key encryption key
|
||||||
* @param $text (String) input text to be encrypted
|
* @param string $text input text to be encrypted
|
||||||
* @return String encrypted text
|
* @return string encrypted text
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since TODO
|
* @since TODO
|
||||||
* @public static
|
* @public static
|
||||||
@@ -480,11 +483,11 @@ class TCPDF_STATIC {
|
|||||||
/**
|
/**
|
||||||
* Returns the input text encrypted using RC4 algorithm and the specified key.
|
* Returns the input text encrypted using RC4 algorithm and the specified key.
|
||||||
* RC4 is the standard encryption algorithm used in PDF format
|
* RC4 is the standard encryption algorithm used in PDF format
|
||||||
* @param $key (string) Encryption key.
|
* @param string $key Encryption key.
|
||||||
* @param $text (String) Input text to be encrypted.
|
* @param string $text Input text to be encrypted.
|
||||||
* @param $last_enc_key (String) Reference to last RC4 key encrypted.
|
* @param string $last_enc_key Reference to last RC4 key encrypted.
|
||||||
* @param $last_enc_key_c (String) Reference to last RC4 computed key.
|
* @param string $last_enc_key_c Reference to last RC4 computed key.
|
||||||
* @return String encrypted text
|
* @return string encrypted text
|
||||||
* @since 2.0.000 (2008-01-02)
|
* @since 2.0.000 (2008-01-02)
|
||||||
* @author Klemen Vodopivec, Nicola Asuni
|
* @author Klemen Vodopivec, Nicola Asuni
|
||||||
* @public static
|
* @public static
|
||||||
@@ -527,8 +530,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the permission code used on encryption (P value).
|
* Return the permission code used on encryption (P value).
|
||||||
* @param $permissions (Array) the set of permissions (specify the ones you want to block).
|
* @param array $permissions the set of permissions (specify the ones you want to block).
|
||||||
* @param $mode (int) encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit.
|
* @param int $mode encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit.
|
||||||
* @since 5.0.005 (2010-05-12)
|
* @since 5.0.005 (2010-05-12)
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @public static
|
* @public static
|
||||||
@@ -564,8 +567,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert hexadecimal string to string
|
* Convert hexadecimal string to string
|
||||||
* @param $bs (string) byte-string to convert
|
* @param string $bs byte-string to convert
|
||||||
* @return String
|
* @return string
|
||||||
* @since 5.0.005 (2010-05-12)
|
* @since 5.0.005 (2010-05-12)
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @public static
|
* @public static
|
||||||
@@ -586,8 +589,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert string to hexadecimal string (byte string)
|
* Convert string to hexadecimal string (byte string)
|
||||||
* @param $s (string) string to convert
|
* @param string $s string to convert
|
||||||
* @return byte string
|
* @return string byte string
|
||||||
* @since 5.0.010 (2010-05-17)
|
* @since 5.0.010 (2010-05-17)
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @public static
|
* @public static
|
||||||
@@ -603,8 +606,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert encryption P value to a string of bytes, low-order byte first.
|
* Convert encryption P value to a string of bytes, low-order byte first.
|
||||||
* @param $protection (string) 32bit encryption permission value (P value)
|
* @param string $protection 32bit encryption permission value (P value)
|
||||||
* @return String
|
* @return string
|
||||||
* @since 5.0.005 (2010-05-12)
|
* @since 5.0.005 (2010-05-12)
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @public static
|
* @public static
|
||||||
@@ -620,8 +623,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode a name object.
|
* Encode a name object.
|
||||||
* @param $name (string) Name object to encode.
|
* @param string $name Name object to encode.
|
||||||
* @return (string) Encoded name object.
|
* @return string Encoded name object.
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.9.097 (2011-06-23)
|
* @since 5.9.097 (2011-06-23)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -642,9 +645,9 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert JavaScript form fields properties array to Annotation Properties array.
|
* Convert JavaScript form fields properties array to Annotation Properties array.
|
||||||
* @param $prop (array) javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
|
* @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
|
||||||
* @param $spot_colors (array) Reference to spot colors array.
|
* @param array $spot_colors Reference to spot colors array.
|
||||||
* @param $rtl (boolean) True if in Right-To-Left text direction mode, false otherwise.
|
* @param boolean $rtl True if in Right-To-Left text direction mode, false otherwise.
|
||||||
* @return array of annotation properties
|
* @return array of annotation properties
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 4.8.000 (2009-09-06)
|
* @since 4.8.000 (2009-09-06)
|
||||||
@@ -1011,8 +1014,9 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Format the page numbers.
|
* Format the page numbers.
|
||||||
* This method can be overriden for custom formats.
|
* This method can be overridden for custom formats.
|
||||||
* @param $num (int) page number
|
* @param int $num page number
|
||||||
|
* @return string
|
||||||
* @since 4.2.005 (2008-11-06)
|
* @since 4.2.005 (2008-11-06)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -1022,8 +1026,9 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Format the page numbers on the Table Of Content.
|
* Format the page numbers on the Table Of Content.
|
||||||
* This method can be overriden for custom formats.
|
* This method can be overridden for custom formats.
|
||||||
* @param $num (int) page number
|
* @param int $num page number
|
||||||
|
* @return string
|
||||||
* @since 4.5.001 (2009-01-04)
|
* @since 4.5.001 (2009-01-04)
|
||||||
* @see addTOC(), addHTMLTOC()
|
* @see addTOC(), addHTMLTOC()
|
||||||
* @public static
|
* @public static
|
||||||
@@ -1034,8 +1039,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Extracts the CSS properties from a CSS string.
|
* Extracts the CSS properties from a CSS string.
|
||||||
* @param $cssdata (string) string containing CSS definitions.
|
* @param string $cssdata string containing CSS definitions.
|
||||||
* @return An array where the keys are the CSS selectors and the values are the CSS properties.
|
* @return array An array where the keys are the CSS selectors and the values are the CSS properties.
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.1.000 (2010-05-25)
|
* @since 5.1.000 (2010-05-25)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -1125,18 +1130,18 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Cleanup HTML code (requires HTML Tidy library).
|
* Cleanup HTML code (requires HTML Tidy library).
|
||||||
* @param $html (string) htmlcode to fix
|
* @param string $html htmlcode to fix
|
||||||
* @param $default_css (string) CSS commands to add
|
* @param string $default_css CSS commands to add
|
||||||
* @param $tagvs (array) parameters for setHtmlVSpace method
|
* @param array $tagvs parameters for setHtmlVSpace method
|
||||||
* @param $tidy_options (array) options for tidy_parse_string function
|
* @param array $tidy_options options for tidy_parse_string function
|
||||||
* @param $tagvspaces (array) Array of vertical spaces for tags.
|
* @param array $tagvspaces Array of vertical spaces for tags.
|
||||||
* @return string XHTML code cleaned up
|
* @return string XHTML code cleaned up
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.9.017 (2010-11-16)
|
* @since 5.9.017 (2010-11-16)
|
||||||
* @see setHtmlVSpace()
|
* @see setHtmlVSpace()
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function fixHTMLCode($html, $default_css='', $tagvs='', $tidy_options='', &$tagvspaces) {
|
public static function fixHTMLCode($html, $default_css, $tagvs, $tidy_options, &$tagvspaces) {
|
||||||
// configure parameters for HTML Tidy
|
// configure parameters for HTML Tidy
|
||||||
if ($tidy_options === '') {
|
if ($tidy_options === '') {
|
||||||
$tidy_options = array (
|
$tidy_options = array (
|
||||||
@@ -1195,9 +1200,9 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the CSS selector is valid for the selected HTML tag
|
* Returns true if the CSS selector is valid for the selected HTML tag
|
||||||
* @param $dom (array) array of HTML tags and properties
|
* @param array $dom array of HTML tags and properties
|
||||||
* @param $key (int) key of the current HTML tag
|
* @param int $key key of the current HTML tag
|
||||||
* @param $selector (string) CSS selector string
|
* @param string $selector CSS selector string
|
||||||
* @return true if the selector is valid, false otherwise
|
* @return true if the selector is valid, false otherwise
|
||||||
* @since 5.1.000 (2010-05-25)
|
* @since 5.1.000 (2010-05-25)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -1355,9 +1360,9 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the styles array that apply for the selected HTML tag.
|
* Returns the styles array that apply for the selected HTML tag.
|
||||||
* @param $dom (array) array of HTML tags and properties
|
* @param array $dom array of HTML tags and properties
|
||||||
* @param $key (int) key of the current HTML tag
|
* @param int $key key of the current HTML tag
|
||||||
* @param $css (array) array of CSS properties
|
* @param array $css array of CSS properties
|
||||||
* @return array containing CSS properties
|
* @return array containing CSS properties
|
||||||
* @since 5.1.000 (2010-05-25)
|
* @since 5.1.000 (2010-05-25)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -1402,7 +1407,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Compact CSS data array into single string.
|
* Compact CSS data array into single string.
|
||||||
* @param $css (array) array of CSS properties
|
* @param array $css array of CSS properties
|
||||||
* @return string containing merged CSS properties
|
* @return string containing merged CSS properties
|
||||||
* @since 5.9.070 (2011-04-19)
|
* @since 5.9.070 (2011-04-19)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -1433,13 +1438,17 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Roman representation of an integer number
|
* Returns the Roman representation of an integer number
|
||||||
* @param $number (int) number to convert
|
* @param int $number number to convert
|
||||||
* @return string roman representation of the specified number
|
* @return string roman representation of the specified number
|
||||||
* @since 4.4.004 (2008-12-10)
|
* @since 4.4.004 (2008-12-10)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function intToRoman($number) {
|
public static function intToRoman($number) {
|
||||||
$roman = '';
|
$roman = '';
|
||||||
|
if ($number >= 4000) {
|
||||||
|
// do not represent numbers above 4000 in Roman numerals
|
||||||
|
return strval($number);
|
||||||
|
}
|
||||||
while ($number >= 1000) {
|
while ($number >= 1000) {
|
||||||
$roman .= 'M';
|
$roman .= 'M';
|
||||||
$number -= 1000;
|
$number -= 1000;
|
||||||
@@ -1497,10 +1506,10 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Find position of last occurrence of a substring in a string
|
* Find position of last occurrence of a substring in a string
|
||||||
* @param $haystack (string) The string to search in.
|
* @param string $haystack The string to search in.
|
||||||
* @param $needle (string) substring to search.
|
* @param string $needle substring to search.
|
||||||
* @param $offset (int) May be specified to begin searching an arbitrary number of characters into the string.
|
* @param int $offset May be specified to begin searching an arbitrary number of characters into the string.
|
||||||
* @return Returns the position where the needle exists. Returns FALSE if the needle was not found.
|
* @return int|false Returns the position where the needle exists. Returns FALSE if the needle was not found.
|
||||||
* @since 4.8.038 (2010-03-13)
|
* @since 4.8.038 (2010-03-13)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -1513,7 +1522,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of hyphenation patterns.
|
* Returns an array of hyphenation patterns.
|
||||||
* @param $file (string) TEX file containing hypenation patterns. TEX pattrns can be downloaded from http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/
|
* @param string $file TEX file containing hypenation patterns. TEX patterns can be downloaded from http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/
|
||||||
* @return array of hyphenation patterns
|
* @return array of hyphenation patterns
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 4.9.012 (2010-04-12)
|
* @since 4.9.012 (2010-04-12)
|
||||||
@@ -1546,7 +1555,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the Path-Painting Operators.
|
* Get the Path-Painting Operators.
|
||||||
* @param $style (string) Style of rendering. Possible values are:
|
* @param string $style Style of rendering. Possible values are:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>S or D: Stroke the path.</li>
|
* <li>S or D: Stroke the path.</li>
|
||||||
* <li>s or d: Close and stroke the path.</li>
|
* <li>s or d: Close and stroke the path.</li>
|
||||||
@@ -1560,7 +1569,8 @@ class TCPDF_STATIC {
|
|||||||
* <li>CEO: Clipping mode using the nonzero winding number rule to determine which regions lie inside the clipping path</li>
|
* <li>CEO: Clipping mode using the nonzero winding number rule to determine which regions lie inside the clipping path</li>
|
||||||
* <li>n: End the path object without filling or stroking it.</li>
|
* <li>n: End the path object without filling or stroking it.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* @param $default (string) default style
|
* @param string $default default style
|
||||||
|
* @return string
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.0.000 (2010-04-30)
|
* @since 5.0.000 (2010-04-30)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -1637,9 +1647,9 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the product of two SVG tranformation matrices
|
* Get the product of two SVG tranformation matrices
|
||||||
* @param $ta (array) first SVG tranformation matrix
|
* @param array $ta first SVG tranformation matrix
|
||||||
* @param $tb (array) second SVG tranformation matrix
|
* @param array $tb second SVG tranformation matrix
|
||||||
* @return transformation array
|
* @return array transformation array
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.0.000 (2010-05-02)
|
* @since 5.0.000 (2010-05-02)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -1657,7 +1667,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the tranformation matrix from SVG transform attribute
|
* Get the tranformation matrix from SVG transform attribute
|
||||||
* @param $attribute (string) transformation
|
* @param string $attribute transformation
|
||||||
* @return array of transformations
|
* @return array of transformations
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.0.000 (2010-05-02)
|
* @since 5.0.000 (2010-05-02)
|
||||||
@@ -1752,10 +1762,10 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the angle in radiants between two vectors
|
* Returns the angle in radiants between two vectors
|
||||||
* @param $x1 (int) X coordinate of first vector point
|
* @param int $x1 X coordinate of first vector point
|
||||||
* @param $y1 (int) Y coordinate of first vector point
|
* @param int $y1 Y coordinate of first vector point
|
||||||
* @param $x2 (int) X coordinate of second vector point
|
* @param int $x2 X coordinate of second vector point
|
||||||
* @param $y2 (int) Y coordinate of second vector point
|
* @param int $y2 Y coordinate of second vector point
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.0.000 (2010-05-04)
|
* @since 5.0.000 (2010-05-04)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -1777,17 +1787,20 @@ class TCPDF_STATIC {
|
|||||||
/**
|
/**
|
||||||
* Split string by a regular expression.
|
* Split string by a regular expression.
|
||||||
* This is a wrapper for the preg_split function to avoid the bug: https://bugs.php.net/bug.php?id=45850
|
* This is a wrapper for the preg_split function to avoid the bug: https://bugs.php.net/bug.php?id=45850
|
||||||
* @param $pattern (string) The regular expression pattern to search for without the modifiers, as a string.
|
* @param string $pattern The regular expression pattern to search for without the modifiers, as a string.
|
||||||
* @param $modifiers (string) The modifiers part of the pattern,
|
* @param string $modifiers The modifiers part of the pattern,
|
||||||
* @param $subject (string) The input string.
|
* @param string $subject The input string.
|
||||||
* @param $limit (int) If specified, then only substrings up to limit are returned with the rest of the string being placed in the last substring. A limit of -1, 0 or NULL means "no limit" and, as is standard across PHP, you can use NULL to skip to the flags parameter.
|
* @param int $limit If specified, then only substrings up to limit are returned with the rest of the string being placed in the last substring. A limit of -1, 0 or NULL means "no limit" and, as is standard across PHP, you can use NULL to skip to the flags parameter.
|
||||||
* @param $flags (int) The flags as specified on the preg_split PHP function.
|
* @param int $flags The flags as specified on the preg_split PHP function.
|
||||||
* @return Returns an array containing substrings of subject split along boundaries matched by pattern.modifier
|
* @return array Returns an array containing substrings of subject split along boundaries matched by pattern.modifier
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 6.0.023
|
* @since 6.0.023
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function pregSplit($pattern, $modifiers, $subject, $limit=NULL, $flags=NULL) {
|
public static function pregSplit($pattern, $modifiers, $subject, $limit=NULL, $flags=NULL) {
|
||||||
|
// PHP 8.1 deprecates nulls for $limit and $flags
|
||||||
|
$limit = $limit === null ? -1 : $limit;
|
||||||
|
$flags = $flags === null ? 0 : $flags;
|
||||||
// the bug only happens on PHP 5.2 when using the u modifier
|
// the bug only happens on PHP 5.2 when using the u modifier
|
||||||
if ((strpos($modifiers, 'u') === FALSE) OR (count(preg_split('//u', "\n\t", -1, PREG_SPLIT_NO_EMPTY)) == 2)) {
|
if ((strpos($modifiers, 'u') === FALSE) OR (count(preg_split('//u', "\n\t", -1, PREG_SPLIT_NO_EMPTY)) == 2)) {
|
||||||
return preg_split($pattern.$modifiers, $subject, $limit, $flags);
|
return preg_split($pattern.$modifiers, $subject, $limit, $flags);
|
||||||
@@ -1807,9 +1820,9 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper to use fopen only with local files
|
* Wrapper to use fopen only with local files
|
||||||
* @param filename (string) Name of the file to open
|
* @param string $filename Name of the file to open
|
||||||
* @param $mode (string)
|
* @param string $mode
|
||||||
* @return Returns a file pointer resource on success, or FALSE on error.
|
* @return resource|false Returns a file pointer resource on success, or FALSE on error.
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function fopenLocal($filename, $mode) {
|
public static function fopenLocal($filename, $mode) {
|
||||||
@@ -1823,9 +1836,10 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the URL exist.
|
* Check if the URL exist.
|
||||||
* @param url (string) URL to check.
|
* @param string $url URL to check.
|
||||||
* @return Returns TRUE if the URL exists; FALSE otherwise.
|
* @return bool Returns TRUE if the URL exists; FALSE otherwise.
|
||||||
* @public static
|
* @public static
|
||||||
|
* @since 6.2.25
|
||||||
*/
|
*/
|
||||||
public static function url_exists($url) {
|
public static function url_exists($url) {
|
||||||
$crs = curl_init();
|
$crs = curl_init();
|
||||||
@@ -1842,6 +1856,10 @@ class TCPDF_STATIC {
|
|||||||
curl_setopt($crs, CURLOPT_SSL_VERIFYPEER, false);
|
curl_setopt($crs, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
curl_setopt($crs, CURLOPT_SSL_VERIFYHOST, false);
|
curl_setopt($crs, CURLOPT_SSL_VERIFYHOST, false);
|
||||||
curl_setopt($crs, CURLOPT_USERAGENT, 'tc-lib-file');
|
curl_setopt($crs, CURLOPT_USERAGENT, 'tc-lib-file');
|
||||||
|
curl_setopt($crs, CURLOPT_MAXREDIRS, 5);
|
||||||
|
if (defined('CURLOPT_PROTOCOLS')) {
|
||||||
|
curl_setopt($crs, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS | CURLPROTO_HTTP | CURLPROTO_FTP | CURLPROTO_FTPS);
|
||||||
|
}
|
||||||
curl_exec($crs);
|
curl_exec($crs);
|
||||||
$code = curl_getinfo($crs, CURLINFO_HTTP_CODE);
|
$code = curl_getinfo($crs, CURLINFO_HTTP_CODE);
|
||||||
curl_close($crs);
|
curl_close($crs);
|
||||||
@@ -1859,7 +1877,7 @@ class TCPDF_STATIC {
|
|||||||
public static function encodeUrlQuery($url) {
|
public static function encodeUrlQuery($url) {
|
||||||
$urlData = parse_url($url);
|
$urlData = parse_url($url);
|
||||||
if (isset($urlData['query']) && $urlData['query']) {
|
if (isset($urlData['query']) && $urlData['query']) {
|
||||||
$urlQueryData = [];
|
$urlQueryData = array();
|
||||||
parse_str(urldecode($urlData['query']), $urlQueryData);
|
parse_str(urldecode($urlData['query']), $urlQueryData);
|
||||||
$updatedUrl = $urlData['scheme'] . '://' . $urlData['host'] . $urlData['path'] . '?' . http_build_query($urlQueryData);
|
$updatedUrl = $urlData['scheme'] . '://' . $urlData['host'] . $urlData['path'] . '?' . http_build_query($urlQueryData);
|
||||||
} else {
|
} else {
|
||||||
@@ -1872,8 +1890,8 @@ class TCPDF_STATIC {
|
|||||||
* Wrapper for file_exists.
|
* Wrapper for file_exists.
|
||||||
* Checks whether a file or directory exists.
|
* Checks whether a file or directory exists.
|
||||||
* Only allows some protocols and local files.
|
* Only allows some protocols and local files.
|
||||||
* @param filename (string) Path to the file or directory.
|
* @param string $filename Path to the file or directory.
|
||||||
* @return Returns TRUE if the file or directory specified by filename exists; FALSE otherwise.
|
* @return bool Returns TRUE if the file or directory specified by filename exists; FALSE otherwise.
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function file_exists($filename) {
|
public static function file_exists($filename) {
|
||||||
@@ -1889,8 +1907,8 @@ class TCPDF_STATIC {
|
|||||||
/**
|
/**
|
||||||
* Reads entire file into a string.
|
* Reads entire file into a string.
|
||||||
* The file can be also an URL.
|
* The file can be also an URL.
|
||||||
* @param $file (string) Name of the file or URL to read.
|
* @param string $file Name of the file or URL to read.
|
||||||
* @return The function returns the read data or FALSE on failure.
|
* @return string|false The function returns the read data or FALSE on failure.
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 6.0.025
|
* @since 6.0.025
|
||||||
* @public static
|
* @public static
|
||||||
@@ -1973,6 +1991,10 @@ class TCPDF_STATIC {
|
|||||||
curl_setopt($crs, CURLOPT_SSL_VERIFYPEER, false);
|
curl_setopt($crs, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
curl_setopt($crs, CURLOPT_SSL_VERIFYHOST, false);
|
curl_setopt($crs, CURLOPT_SSL_VERIFYHOST, false);
|
||||||
curl_setopt($crs, CURLOPT_USERAGENT, 'tc-lib-file');
|
curl_setopt($crs, CURLOPT_USERAGENT, 'tc-lib-file');
|
||||||
|
curl_setopt($crs, CURLOPT_MAXREDIRS, 5);
|
||||||
|
if (defined('CURLOPT_PROTOCOLS')) {
|
||||||
|
curl_setopt($crs, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS | CURLPROTO_HTTP | CURLPROTO_FTP | CURLPROTO_FTPS);
|
||||||
|
}
|
||||||
$ret = curl_exec($crs);
|
$ret = curl_exec($crs);
|
||||||
curl_close($crs);
|
curl_close($crs);
|
||||||
if ($ret !== false) {
|
if ($ret !== false) {
|
||||||
@@ -1985,8 +2007,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get ULONG from string (Big Endian 32-bit unsigned integer).
|
* Get ULONG from string (Big Endian 32-bit unsigned integer).
|
||||||
* @param $str (string) string from where to extract value
|
* @param string $str string from where to extract value
|
||||||
* @param $offset (int) point from where to read the data
|
* @param int $offset point from where to read the data
|
||||||
* @return int 32 bit value
|
* @return int 32 bit value
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.2.000 (2010-06-02)
|
* @since 5.2.000 (2010-06-02)
|
||||||
@@ -1999,8 +2021,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get USHORT from string (Big Endian 16-bit unsigned integer).
|
* Get USHORT from string (Big Endian 16-bit unsigned integer).
|
||||||
* @param $str (string) string from where to extract value
|
* @param string $str string from where to extract value
|
||||||
* @param $offset (int) point from where to read the data
|
* @param int $offset point from where to read the data
|
||||||
* @return int 16 bit value
|
* @return int 16 bit value
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.2.000 (2010-06-02)
|
* @since 5.2.000 (2010-06-02)
|
||||||
@@ -2013,8 +2035,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get SHORT from string (Big Endian 16-bit signed integer).
|
* Get SHORT from string (Big Endian 16-bit signed integer).
|
||||||
* @param $str (string) String from where to extract value.
|
* @param string $str String from where to extract value.
|
||||||
* @param $offset (int) Point from where to read the data.
|
* @param int $offset Point from where to read the data.
|
||||||
* @return int 16 bit value
|
* @return int 16 bit value
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.2.000 (2010-06-02)
|
* @since 5.2.000 (2010-06-02)
|
||||||
@@ -2027,8 +2049,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get FWORD from string (Big Endian 16-bit signed integer).
|
* Get FWORD from string (Big Endian 16-bit signed integer).
|
||||||
* @param $str (string) String from where to extract value.
|
* @param string $str String from where to extract value.
|
||||||
* @param $offset (int) Point from where to read the data.
|
* @param int $offset Point from where to read the data.
|
||||||
* @return int 16 bit value
|
* @return int 16 bit value
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.9.123 (2011-09-30)
|
* @since 5.9.123 (2011-09-30)
|
||||||
@@ -2044,8 +2066,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get UFWORD from string (Big Endian 16-bit unsigned integer).
|
* Get UFWORD from string (Big Endian 16-bit unsigned integer).
|
||||||
* @param $str (string) string from where to extract value
|
* @param string $str string from where to extract value
|
||||||
* @param $offset (int) point from where to read the data
|
* @param int $offset point from where to read the data
|
||||||
* @return int 16 bit value
|
* @return int 16 bit value
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.9.123 (2011-09-30)
|
* @since 5.9.123 (2011-09-30)
|
||||||
@@ -2058,8 +2080,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get FIXED from string (32-bit signed fixed-point number (16.16).
|
* Get FIXED from string (32-bit signed fixed-point number (16.16).
|
||||||
* @param $str (string) string from where to extract value
|
* @param string $str string from where to extract value
|
||||||
* @param $offset (int) point from where to read the data
|
* @param int $offset point from where to read the data
|
||||||
* @return int 16 bit value
|
* @return int 16 bit value
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.9.123 (2011-09-30)
|
* @since 5.9.123 (2011-09-30)
|
||||||
@@ -2076,8 +2098,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get BYTE from string (8-bit unsigned integer).
|
* Get BYTE from string (8-bit unsigned integer).
|
||||||
* @param $str (string) String from where to extract value.
|
* @param string $str String from where to extract value.
|
||||||
* @param $offset (int) Point from where to read the data.
|
* @param int $offset Point from where to read the data.
|
||||||
* @return int 8 bit value
|
* @return int 8 bit value
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 5.2.000 (2010-06-02)
|
* @since 5.2.000 (2010-06-02)
|
||||||
@@ -2090,9 +2112,9 @@ class TCPDF_STATIC {
|
|||||||
/**
|
/**
|
||||||
* Binary-safe and URL-safe file read.
|
* Binary-safe and URL-safe file read.
|
||||||
* Reads up to length bytes from the file pointer referenced by handle. Reading stops as soon as one of the following conditions is met: length bytes have been read; EOF (end of file) is reached.
|
* Reads up to length bytes from the file pointer referenced by handle. Reading stops as soon as one of the following conditions is met: length bytes have been read; EOF (end of file) is reached.
|
||||||
* @param $handle (resource)
|
* @param resource $handle
|
||||||
* @param $length (int)
|
* @param int $length
|
||||||
* @return Returns the read string or FALSE in case of error.
|
* @return string|false Returns the read string or FALSE in case of error.
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 4.5.027 (2009-03-16)
|
* @since 4.5.027 (2009-03-16)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -2111,8 +2133,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Read a 4-byte (32 bit) integer from file.
|
* Read a 4-byte (32 bit) integer from file.
|
||||||
* @param $f (string) file name.
|
* @param string $f file name.
|
||||||
* @return 4-byte integer
|
* @return int 4-byte integer
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function _freadint($f) {
|
public static function _freadint($f) {
|
||||||
@@ -2120,11 +2142,12 @@ class TCPDF_STATIC {
|
|||||||
return $a['i'];
|
return $a['i'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of page formats
|
* Array of page formats
|
||||||
* measures are calculated in this way: (inches * 72) or (millimeters * 72 / 25.4)
|
* measures are calculated in this way: (inches * 72) or (millimeters * 72 / 25.4)
|
||||||
* @public static
|
* @public static
|
||||||
|
*
|
||||||
|
* @var array<string,float[]>
|
||||||
*/
|
*/
|
||||||
public static $page_formats = array(
|
public static $page_formats = array(
|
||||||
// ISO 216 A Series + 2 SIS 014711 extensions
|
// ISO 216 A Series + 2 SIS 014711 extensions
|
||||||
@@ -2480,7 +2503,7 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get page dimensions from format name.
|
* Get page dimensions from format name.
|
||||||
* @param $format (mixed) The format name @see self::$page_format<ul>
|
* @param mixed $format The format name @see self::$page_format<ul>
|
||||||
* @return array containing page width and height in points
|
* @return array containing page width and height in points
|
||||||
* @since 5.0.010 (2010-05-17)
|
* @since 5.0.010 (2010-05-17)
|
||||||
* @public static
|
* @public static
|
||||||
@@ -2494,20 +2517,20 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set page boundaries.
|
* Set page boundaries.
|
||||||
* @param $page (int) page number
|
* @param int $page page number
|
||||||
* @param $type (string) valid values are: <ul><li>'MediaBox' : the boundaries of the physical medium on which the page shall be displayed or printed;</li><li>'CropBox' : the visible region of default user space;</li><li>'BleedBox' : the region to which the contents of the page shall be clipped when output in a production environment;</li><li>'TrimBox' : the intended dimensions of the finished page after trimming;</li><li>'ArtBox' : the page's meaningful content (including potential white space).</li></ul>
|
* @param string $type valid values are: <ul><li>'MediaBox' : the boundaries of the physical medium on which the page shall be displayed or printed;</li><li>'CropBox' : the visible region of default user space;</li><li>'BleedBox' : the region to which the contents of the page shall be clipped when output in a production environment;</li><li>'TrimBox' : the intended dimensions of the finished page after trimming;</li><li>'ArtBox' : the page's meaningful content (including potential white space).</li></ul>
|
||||||
* @param $llx (float) lower-left x coordinate in user units.
|
* @param float $llx lower-left x coordinate in user units.
|
||||||
* @param $lly (float) lower-left y coordinate in user units.
|
* @param float $lly lower-left y coordinate in user units.
|
||||||
* @param $urx (float) upper-right x coordinate in user units.
|
* @param float $urx upper-right x coordinate in user units.
|
||||||
* @param $ury (float) upper-right y coordinate in user units.
|
* @param float $ury upper-right y coordinate in user units.
|
||||||
* @param $points (boolean) If true uses user units as unit of measure, otherwise uses PDF points.
|
* @param boolean $points If true uses user units as unit of measure, otherwise uses PDF points.
|
||||||
* @param $k (float) Scale factor (number of points in user unit).
|
* @param float $k Scale factor (number of points in user unit).
|
||||||
* @param $pagedim (array) Array of page dimensions.
|
* @param array $pagedim Array of page dimensions.
|
||||||
* @return pagedim array of page dimensions.
|
* @return array pagedim array of page dimensions.
|
||||||
* @since 5.0.010 (2010-05-17)
|
* @since 5.0.010 (2010-05-17)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function setPageBoxes($page, $type, $llx, $lly, $urx, $ury, $points=false, $k, $pagedim=array()) {
|
public static function setPageBoxes($page, $type, $llx, $lly, $urx, $ury, $points, $k, $pagedim=array()) {
|
||||||
if (!isset($pagedim[$page])) {
|
if (!isset($pagedim[$page])) {
|
||||||
// initialize array
|
// initialize array
|
||||||
$pagedim[$page] = array();
|
$pagedim[$page] = array();
|
||||||
@@ -2527,9 +2550,9 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Swap X and Y coordinates of page boxes (change page boxes orientation).
|
* Swap X and Y coordinates of page boxes (change page boxes orientation).
|
||||||
* @param $page (int) page number
|
* @param int $page page number
|
||||||
* @param $pagedim (array) Array of page dimensions.
|
* @param array $pagedim Array of page dimensions.
|
||||||
* @return pagedim array of page dimensions.
|
* @return array pagedim array of page dimensions.
|
||||||
* @since 5.0.010 (2010-05-17)
|
* @since 5.0.010 (2010-05-17)
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
@@ -2550,8 +2573,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the canonical page layout mode.
|
* Get the canonical page layout mode.
|
||||||
* @param $layout (string) The page layout. Possible values are:<ul><li>SinglePage Display one page at a time</li><li>OneColumn Display the pages in one column</li><li>TwoColumnLeft Display the pages in two columns, with odd-numbered pages on the left</li><li>TwoColumnRight Display the pages in two columns, with odd-numbered pages on the right</li><li>TwoPageLeft (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the left</li><li>TwoPageRight (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the right</li></ul>
|
* @param string $layout The page layout. Possible values are:<ul><li>SinglePage Display one page at a time</li><li>OneColumn Display the pages in one column</li><li>TwoColumnLeft Display the pages in two columns, with odd-numbered pages on the left</li><li>TwoColumnRight Display the pages in two columns, with odd-numbered pages on the right</li><li>TwoPageLeft (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the left</li><li>TwoPageRight (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the right</li></ul>
|
||||||
* @return (string) Canonical page layout name.
|
* @return string Canonical page layout name.
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function getPageLayoutMode($layout='SinglePage') {
|
public static function getPageLayoutMode($layout='SinglePage') {
|
||||||
@@ -2593,8 +2616,8 @@ class TCPDF_STATIC {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the canonical page layout mode.
|
* Get the canonical page layout mode.
|
||||||
* @param $mode (string) A name object specifying how the document should be displayed when opened:<ul><li>UseNone Neither document outline nor thumbnail images visible</li><li>UseOutlines Document outline visible</li><li>UseThumbs Thumbnail images visible</li><li>FullScreen Full-screen mode, with no menu bar, window controls, or any other window visible</li><li>UseOC (PDF 1.5) Optional content group panel visible</li><li>UseAttachments (PDF 1.6) Attachments panel visible</li></ul>
|
* @param string $mode A name object specifying how the document should be displayed when opened:<ul><li>UseNone Neither document outline nor thumbnail images visible</li><li>UseOutlines Document outline visible</li><li>UseThumbs Thumbnail images visible</li><li>FullScreen Full-screen mode, with no menu bar, window controls, or any other window visible</li><li>UseOC (PDF 1.5) Optional content group panel visible</li><li>UseAttachments (PDF 1.6) Attachments panel visible</li></ul>
|
||||||
* @return (string) Canonical page mode name.
|
* @return string Canonical page mode name.
|
||||||
* @public static
|
* @public static
|
||||||
*/
|
*/
|
||||||
public static function getPageMode($mode='UseNone') {
|
public static function getPageMode($mode='UseNone') {
|
||||||
|
|||||||
2492
vendor/tecnickcom/tcpdf/tcpdf.php
vendored
2492
vendor/tecnickcom/tcpdf/tcpdf.php
vendored
File diff suppressed because one or more lines are too long
135
vendor/tecnickcom/tcpdf/tcpdf_barcodes_1d.php
vendored
135
vendor/tecnickcom/tcpdf/tcpdf_barcodes_1d.php
vendored
@@ -66,8 +66,8 @@ class TCPDFBarcode {
|
|||||||
* <li>$arrcode['bcode'][$k]['w'] bar width in units.</li>
|
* <li>$arrcode['bcode'][$k]['w'] bar width in units.</li>
|
||||||
* <li>$arrcode['bcode'][$k]['h'] bar height in units.</li>
|
* <li>$arrcode['bcode'][$k]['h'] bar height in units.</li>
|
||||||
* <li>$arrcode['bcode'][$k]['p'] bar top position (0 = top, 1 = middle)</li></ul>
|
* <li>$arrcode['bcode'][$k]['p'] bar top position (0 = top, 1 = middle)</li></ul>
|
||||||
* @param $code (string) code to print
|
* @param string $code code to print
|
||||||
* @param $type (string) type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128 : CODE 128</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extension</li><li>EAN5 : 5-Digits UPC-Based Extension</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
|
* @param string $type type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128 : CODE 128</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extension</li><li>EAN5 : 5-Digits UPC-Based Extension</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function __construct($code, $type) {
|
public function __construct($code, $type) {
|
||||||
@@ -85,9 +85,9 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Send barcode as SVG image object to the standard output.
|
* Send barcode as SVG image object to the standard output.
|
||||||
* @param $w (int) Minimum width of a single bar in user units.
|
* @param int $w Minimum width of a single bar in user units.
|
||||||
* @param $h (int) Height of barcode in user units.
|
* @param int $h Height of barcode in user units.
|
||||||
* @param $color (string) Foreground color (in SVG format) for bar elements (background is transparent).
|
* @param string $color Foreground color (in SVG format) for bar elements (background is transparent).
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function getBarcodeSVG($w=2, $h=30, $color='black') {
|
public function getBarcodeSVG($w=2, $h=30, $color='black') {
|
||||||
@@ -105,9 +105,9 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a SVG string representation of barcode.
|
* Return a SVG string representation of barcode.
|
||||||
* @param $w (int) Minimum width of a single bar in user units.
|
* @param int $w Minimum width of a single bar in user units.
|
||||||
* @param $h (int) Height of barcode in user units.
|
* @param int $h Height of barcode in user units.
|
||||||
* @param $color (string) Foreground color (in SVG format) for bar elements (background is transparent).
|
* @param string $color Foreground color (in SVG format) for bar elements (background is transparent).
|
||||||
* @return string SVG code.
|
* @return string SVG code.
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
@@ -138,9 +138,9 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an HTML representation of barcode.
|
* Return an HTML representation of barcode.
|
||||||
* @param $w (int) Width of a single bar element in pixels.
|
* @param int $w Width of a single bar element in pixels.
|
||||||
* @param $h (int) Height of a single bar element in pixels.
|
* @param int $h Height of a single bar element in pixels.
|
||||||
* @param $color (string) Foreground color for bar elements (background is transparent).
|
* @param string $color Foreground color for bar elements (background is transparent).
|
||||||
* @return string HTML code.
|
* @return string HTML code.
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
@@ -164,9 +164,9 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a PNG image representation of barcode (requires GD or Imagick library).
|
* Send a PNG image representation of barcode (requires GD or Imagick library).
|
||||||
* @param $w (int) Width of a single bar element in pixels.
|
* @param int $w Width of a single bar element in pixels.
|
||||||
* @param $h (int) Height of a single bar element in pixels.
|
* @param int $h Height of a single bar element in pixels.
|
||||||
* @param $color (array) RGB (0-255) foreground color for bar elements (background is transparent).
|
* @param array $color RGB (0-255) foreground color for bar elements (background is transparent).
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function getBarcodePNG($w=2, $h=30, $color=array(0,0,0)) {
|
public function getBarcodePNG($w=2, $h=30, $color=array(0,0,0)) {
|
||||||
@@ -183,10 +183,10 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a PNG image representation of barcode (requires GD or Imagick library).
|
* Return a PNG image representation of barcode (requires GD or Imagick library).
|
||||||
* @param $w (int) Width of a single bar element in pixels.
|
* @param int $w Width of a single bar element in pixels.
|
||||||
* @param $h (int) Height of a single bar element in pixels.
|
* @param int $h Height of a single bar element in pixels.
|
||||||
* @param $color (array) RGB (0-255) foreground color for bar elements (background is transparent).
|
* @param array $color RGB (0-255) foreground color for bar elements (background is transparent).
|
||||||
* @return image or false in case of error.
|
* @return string|Imagick|false image or false in case of error.
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function getBarcodePngData($w=2, $h=30, $color=array(0,0,0)) {
|
public function getBarcodePngData($w=2, $h=30, $color=array(0,0,0)) {
|
||||||
@@ -241,9 +241,9 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the barcode.
|
* Set the barcode.
|
||||||
* @param $code (string) code to print
|
* @param string $code code to print
|
||||||
* @param $type (string) type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128 : CODE 128</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extension</li><li>EAN5 : 5-Digits UPC-Based Extension</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>IMBPRE: Pre-processed Intelligent Mail Barcode - Onecode - USPS-B-3200, using only F,A,D,T letters</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
|
* @param string $type type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128 : CODE 128</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extension</li><li>EAN5 : 5-Digits UPC-Based Extension</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>IMBPRE: Pre-processed Intelligent Mail Barcode - Onecode - USPS-B-3200, using only F,A,D,T letters</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
|
||||||
* @return array barcode array
|
* @return void
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function setBarcode($code, $type) {
|
public function setBarcode($code, $type) {
|
||||||
@@ -384,9 +384,9 @@ class TCPDFBarcode {
|
|||||||
/**
|
/**
|
||||||
* CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
|
* CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
|
||||||
* General-purpose code in very wide use world-wide
|
* General-purpose code in very wide use world-wide
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @param $extended (boolean) if true uses the extended mode.
|
* @param boolean $extended if true uses the extended mode.
|
||||||
* @param $checksum (boolean) if true add a checksum to the code.
|
* @param boolean $checksum if true add a checksum to the code.
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -479,8 +479,8 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode a string to be used for CODE 39 Extended mode.
|
* Encode a string to be used for CODE 39 Extended mode.
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @return encoded string.
|
* @return string encoded string.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected function encode_code39_ext($code) {
|
protected function encode_code39_ext($code) {
|
||||||
@@ -530,8 +530,8 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate CODE 39 checksum (modulo 43).
|
* Calculate CODE 39 checksum (modulo 43).
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @return char checksum.
|
* @return string char checksum.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected function checksum_code39($code) {
|
protected function checksum_code39($code) {
|
||||||
@@ -553,7 +553,7 @@ class TCPDFBarcode {
|
|||||||
/**
|
/**
|
||||||
* CODE 93 - USS-93
|
* CODE 93 - USS-93
|
||||||
* Compact code similar to Code 39
|
* Compact code similar to Code 39
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -681,7 +681,7 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate CODE 93 checksum (modulo 47).
|
* Calculate CODE 93 checksum (modulo 47).
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @return string checksum code.
|
* @return string checksum code.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -730,7 +730,7 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checksum for standard 2 of 5 barcodes.
|
* Checksum for standard 2 of 5 barcodes.
|
||||||
* @param $code (string) code to process.
|
* @param string $code code to process.
|
||||||
* @return int checksum.
|
* @return int checksum.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -755,8 +755,8 @@ class TCPDFBarcode {
|
|||||||
* MSI.
|
* MSI.
|
||||||
* Variation of Plessey code, with similar applications
|
* Variation of Plessey code, with similar applications
|
||||||
* Contains digits (0 to 9) and encodes the data only in the width of bars.
|
* Contains digits (0 to 9) and encodes the data only in the width of bars.
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @param $checksum (boolean) if true add a checksum to the code (modulo 11)
|
* @param boolean $checksum if true add a checksum to the code (modulo 11)
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -814,8 +814,8 @@ class TCPDFBarcode {
|
|||||||
* Standard 2 of 5 barcodes.
|
* Standard 2 of 5 barcodes.
|
||||||
* Used in airline ticket marking, photofinishing
|
* Used in airline ticket marking, photofinishing
|
||||||
* Contains digits (0 to 9) and encodes the data only in the width of bars.
|
* Contains digits (0 to 9) and encodes the data only in the width of bars.
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @param $checksum (boolean) if true add a checksum to the code
|
* @param boolean $checksum if true add a checksum to the code
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -854,10 +854,9 @@ class TCPDFBarcode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert binary barcode sequence to TCPDF barcode array.
|
* Convert binary barcode sequence to WarnockPDF barcode array.
|
||||||
* @param $seq (string) barcode as binary sequence.
|
* @param string $seq barcode as binary sequence.
|
||||||
* @param $bararray (array) barcode array.
|
* @param array $bararray barcode array to fill up
|
||||||
* òparam array $bararray TCPDF barcode array to fill up
|
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -886,8 +885,8 @@ class TCPDFBarcode {
|
|||||||
* Interleaved 2 of 5 barcodes.
|
* Interleaved 2 of 5 barcodes.
|
||||||
* Compact numeric code, widely used in industry, air cargo
|
* Compact numeric code, widely used in industry, air cargo
|
||||||
* Contains digits (0 to 9) and encodes the data in the width of both bars and spaces.
|
* Contains digits (0 to 9) and encodes the data in the width of both bars and spaces.
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @param $checksum (boolean) if true add a checksum to the code
|
* @param boolean $checksum if true add a checksum to the code
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -938,7 +937,7 @@ class TCPDFBarcode {
|
|||||||
} else {
|
} else {
|
||||||
$t = false; // space
|
$t = false; // space
|
||||||
}
|
}
|
||||||
$w = $seq[$j];
|
$w = (float)$seq[$j];
|
||||||
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
|
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
|
||||||
$bararray['maxw'] += $w;
|
$bararray['maxw'] += $w;
|
||||||
++$k;
|
++$k;
|
||||||
@@ -950,8 +949,8 @@ class TCPDFBarcode {
|
|||||||
/**
|
/**
|
||||||
* C128 barcodes.
|
* C128 barcodes.
|
||||||
* Very capable code, excellent density, high reliability; in very wide use world-wide
|
* Very capable code, excellent density, high reliability; in very wide use world-wide
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @param $type (string) barcode type: A, B, C or empty for automatic switch (AUTO mode)
|
* @param string $type barcode type: A, B, C or empty for automatic switch (AUTO mode)
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1271,7 +1270,7 @@ class TCPDFBarcode {
|
|||||||
} else {
|
} else {
|
||||||
$t = false; // space
|
$t = false; // space
|
||||||
}
|
}
|
||||||
$w = $seq[$j];
|
$w = (float)$seq[$j];
|
||||||
$bararray['bcode'][] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
|
$bararray['bcode'][] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
|
||||||
$bararray['maxw'] += $w;
|
$bararray['maxw'] += $w;
|
||||||
}
|
}
|
||||||
@@ -1281,7 +1280,7 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Split text code in A/B sequence for 128 code
|
* Split text code in A/B sequence for 128 code
|
||||||
* @param $code (string) code to split.
|
* @param string $code code to split.
|
||||||
* @return array sequence
|
* @return array sequence
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1319,8 +1318,8 @@ class TCPDFBarcode {
|
|||||||
* EAN13: European Article Numbering international retail product code
|
* EAN13: European Article Numbering international retail product code
|
||||||
* UPC-A: Universal product code seen on almost all retail products in the USA and Canada
|
* UPC-A: Universal product code seen on almost all retail products in the USA and Canada
|
||||||
* UPC-E: Short version of UPC symbol
|
* UPC-E: Short version of UPC symbol
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @param $len (string) barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A
|
* @param string $len barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1512,8 +1511,8 @@ class TCPDFBarcode {
|
|||||||
* UPC-Based Extensions
|
* UPC-Based Extensions
|
||||||
* 2-Digit Ext.: Used to indicate magazines and newspaper issue numbers
|
* 2-Digit Ext.: Used to indicate magazines and newspaper issue numbers
|
||||||
* 5-Digit Ext.: Used to mark suggested retail price of books
|
* 5-Digit Ext.: Used to mark suggested retail price of books
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @param $len (string) barcode type: 2 = 2-Digit, 5 = 5-Digit
|
* @param string $len barcode type: 2 = 2-Digit, 5 = 5-Digit
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1587,8 +1586,8 @@ class TCPDFBarcode {
|
|||||||
/**
|
/**
|
||||||
* POSTNET and PLANET barcodes.
|
* POSTNET and PLANET barcodes.
|
||||||
* Used by U.S. Postal Service for automated mail sorting
|
* Used by U.S. Postal Service for automated mail sorting
|
||||||
* @param $code (string) zip code to represent. Must be a string containing a zip code of the form DDDDD or DDDDD-DDDD.
|
* @param string $code zip code to represent. Must be a string containing a zip code of the form DDDDD or DDDDD-DDDD.
|
||||||
* @param $planet (boolean) if true print the PLANET barcode, otherwise print POSTNET
|
* @param boolean $planet if true print the PLANET barcode, otherwise print POSTNET
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1660,8 +1659,8 @@ class TCPDFBarcode {
|
|||||||
* RMS4CC - CBC - KIX
|
* RMS4CC - CBC - KIX
|
||||||
* RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) - KIX (Klant index - Customer index)
|
* RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) - KIX (Klant index - Customer index)
|
||||||
* RM4SCC is the name of the barcode symbology used by the Royal Mail for its Cleanmail service.
|
* RM4SCC is the name of the barcode symbology used by the Royal Mail for its Cleanmail service.
|
||||||
* @param $code (string) code to print
|
* @param string $code code to print
|
||||||
* @param $kix (boolean) if true prints the KIX variation (doesn't use the start and end symbols, and the checksum) - in this case the house number must be sufficed with an X and placed at the end of the code.
|
* @param boolean $kix if true prints the KIX variation (doesn't use the start and end symbols, and the checksum) - in this case the house number must be sufficed with an X and placed at the end of the code.
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1812,7 +1811,7 @@ class TCPDFBarcode {
|
|||||||
/**
|
/**
|
||||||
* CODABAR barcodes.
|
* CODABAR barcodes.
|
||||||
* Older code often used in library systems, sometimes in blood banks
|
* Older code often used in library systems, sometimes in blood banks
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1856,7 +1855,7 @@ class TCPDFBarcode {
|
|||||||
} else {
|
} else {
|
||||||
$t = false; // space
|
$t = false; // space
|
||||||
}
|
}
|
||||||
$w = $seq[$j];
|
$w = (float)$seq[$j];
|
||||||
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
|
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
|
||||||
$bararray['maxw'] += $w;
|
$bararray['maxw'] += $w;
|
||||||
++$k;
|
++$k;
|
||||||
@@ -1868,7 +1867,7 @@ class TCPDFBarcode {
|
|||||||
/**
|
/**
|
||||||
* CODE11 barcodes.
|
* CODE11 barcodes.
|
||||||
* Used primarily for labeling telecommunications equipment
|
* Used primarily for labeling telecommunications equipment
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1947,7 +1946,7 @@ class TCPDFBarcode {
|
|||||||
} else {
|
} else {
|
||||||
$t = false; // space
|
$t = false; // space
|
||||||
}
|
}
|
||||||
$w = $seq[$j];
|
$w = (float)$seq[$j];
|
||||||
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
|
$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
|
||||||
$bararray['maxw'] += $w;
|
$bararray['maxw'] += $w;
|
||||||
++$k;
|
++$k;
|
||||||
@@ -1959,7 +1958,7 @@ class TCPDFBarcode {
|
|||||||
/**
|
/**
|
||||||
* Pharmacode
|
* Pharmacode
|
||||||
* Contains digits (0 to 9)
|
* Contains digits (0 to 9)
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -1985,7 +1984,7 @@ class TCPDFBarcode {
|
|||||||
/**
|
/**
|
||||||
* Pharmacode two-track
|
* Pharmacode two-track
|
||||||
* Contains digits (0 to 9)
|
* Contains digits (0 to 9)
|
||||||
* @param $code (string) code to represent.
|
* @param string $code code to represent.
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -2047,7 +2046,7 @@ class TCPDFBarcode {
|
|||||||
* (requires PHP bcmath extension)
|
* (requires PHP bcmath extension)
|
||||||
* Intelligent Mail barcode is a 65-bar code for use on mail in the United States.
|
* Intelligent Mail barcode is a 65-bar code for use on mail in the United States.
|
||||||
* The fields are described as follows:<ul><li>The Barcode Identifier shall be assigned by USPS to encode the presort identification that is currently printed in human readable form on the optional endorsement line (OEL) as well as for future USPS use. This shall be two digits, with the second digit in the range of 0–4. The allowable encoding ranges shall be 00–04, 10–14, 20–24, 30–34, 40–44, 50–54, 60–64, 70–74, 80–84, and 90–94.</li><li>The Service Type Identifier shall be assigned by USPS for any combination of services requested on the mailpiece. The allowable encoding range shall be 000http://it2.php.net/manual/en/function.dechex.php–999. Each 3-digit value shall correspond to a particular mail class with a particular combination of service(s). Each service program, such as OneCode Confirm and OneCode ACS, shall provide the list of Service Type Identifier values.</li><li>The Mailer or Customer Identifier shall be assigned by USPS as a unique, 6 or 9 digit number that identifies a business entity. The allowable encoding range for the 6 digit Mailer ID shall be 000000- 899999, while the allowable encoding range for the 9 digit Mailer ID shall be 900000000-999999999.</li><li>The Serial or Sequence Number shall be assigned by the mailer for uniquely identifying and tracking mailpieces. The allowable encoding range shall be 000000000–999999999 when used with a 6 digit Mailer ID and 000000-999999 when used with a 9 digit Mailer ID. e. The Delivery Point ZIP Code shall be assigned by the mailer for routing the mailpiece. This shall replace POSTNET for routing the mailpiece to its final delivery point. The length may be 0, 5, 9, or 11 digits. The allowable encoding ranges shall be no ZIP Code, 00000–99999, 000000000–999999999, and 00000000000–99999999999.</li></ul>
|
* The fields are described as follows:<ul><li>The Barcode Identifier shall be assigned by USPS to encode the presort identification that is currently printed in human readable form on the optional endorsement line (OEL) as well as for future USPS use. This shall be two digits, with the second digit in the range of 0–4. The allowable encoding ranges shall be 00–04, 10–14, 20–24, 30–34, 40–44, 50–54, 60–64, 70–74, 80–84, and 90–94.</li><li>The Service Type Identifier shall be assigned by USPS for any combination of services requested on the mailpiece. The allowable encoding range shall be 000http://it2.php.net/manual/en/function.dechex.php–999. Each 3-digit value shall correspond to a particular mail class with a particular combination of service(s). Each service program, such as OneCode Confirm and OneCode ACS, shall provide the list of Service Type Identifier values.</li><li>The Mailer or Customer Identifier shall be assigned by USPS as a unique, 6 or 9 digit number that identifies a business entity. The allowable encoding range for the 6 digit Mailer ID shall be 000000- 899999, while the allowable encoding range for the 9 digit Mailer ID shall be 900000000-999999999.</li><li>The Serial or Sequence Number shall be assigned by the mailer for uniquely identifying and tracking mailpieces. The allowable encoding range shall be 000000000–999999999 when used with a 6 digit Mailer ID and 000000-999999 when used with a 9 digit Mailer ID. e. The Delivery Point ZIP Code shall be assigned by the mailer for routing the mailpiece. This shall replace POSTNET for routing the mailpiece to its final delivery point. The length may be 0, 5, 9, or 11 digits. The allowable encoding ranges shall be no ZIP Code, 00000–99999, 000000000–999999999, and 00000000000–99999999999.</li></ul>
|
||||||
* @param $code (string) code to print, separate the ZIP (routing code) from the rest using a minus char '-' (BarcodeID_ServiceTypeID_MailerID_SerialNumber-RoutingCode)
|
* @param string $code code to print, separate the ZIP (routing code) from the rest using a minus char '-' (BarcodeID_ServiceTypeID_MailerID_SerialNumber-RoutingCode)
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -2172,7 +2171,7 @@ class TCPDFBarcode {
|
|||||||
/**
|
/**
|
||||||
* IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
|
* IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
|
||||||
*
|
*
|
||||||
* @param $code (string) pre-formatted IMB barcode (65 chars "FADT")
|
* @param string $code pre-formatted IMB barcode (65 chars "FADT")
|
||||||
* @return array barcode representation.
|
* @return array barcode representation.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -2223,7 +2222,7 @@ class TCPDFBarcode {
|
|||||||
/**
|
/**
|
||||||
* Convert large integer number to hexadecimal representation.
|
* Convert large integer number to hexadecimal representation.
|
||||||
* (requires PHP bcmath extension)
|
* (requires PHP bcmath extension)
|
||||||
* @param $number (string) number to convert specified as a string
|
* @param string $number number to convert specified as a string
|
||||||
* @return string hexadecimal representation
|
* @return string hexadecimal representation
|
||||||
*/
|
*/
|
||||||
public function dec_to_hex($number) {
|
public function dec_to_hex($number) {
|
||||||
@@ -2247,7 +2246,7 @@ class TCPDFBarcode {
|
|||||||
/**
|
/**
|
||||||
* Convert large hexadecimal number to decimal representation (string).
|
* Convert large hexadecimal number to decimal representation (string).
|
||||||
* (requires PHP bcmath extension)
|
* (requires PHP bcmath extension)
|
||||||
* @param $hex (string) hexadecimal number to convert specified as a string
|
* @param string $hex hexadecimal number to convert specified as a string
|
||||||
* @return string hexadecimal representation
|
* @return string hexadecimal representation
|
||||||
*/
|
*/
|
||||||
public function hex_to_dec($hex) {
|
public function hex_to_dec($hex) {
|
||||||
@@ -2263,7 +2262,7 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Intelligent Mail Barcode calculation of Frame Check Sequence
|
* Intelligent Mail Barcode calculation of Frame Check Sequence
|
||||||
* @param $code_arr (string) array of hexadecimal values (13 bytes holding 102 bits right justified).
|
* @param string $code_arr array of hexadecimal values (13 bytes holding 102 bits right justified).
|
||||||
* @return int 11 bit Frame Check Sequence as integer (decimal base)
|
* @return int 11 bit Frame Check Sequence as integer (decimal base)
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -2299,7 +2298,7 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverse unsigned short value
|
* Reverse unsigned short value
|
||||||
* @param $num (int) value to reversr
|
* @param int $num value to reversr
|
||||||
* @return int reversed value
|
* @return int reversed value
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
@@ -2315,8 +2314,8 @@ class TCPDFBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* generate Nof13 tables used for Intelligent Mail Barcode
|
* generate Nof13 tables used for Intelligent Mail Barcode
|
||||||
* @param $n (int) is the type of table: 2 for 2of13 table, 5 for 5of13table
|
* @param int $n is the type of table: 2 for 2of13 table, 5 for 5of13table
|
||||||
* @param $size (int) size of table (78 for n=2 and 1287 for n=5)
|
* @param int $size size of table (78 for n=2 and 1287 for n=5)
|
||||||
* @return array requested table
|
* @return array requested table
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
|
|||||||
42
vendor/tecnickcom/tcpdf/tcpdf_barcodes_2d.php
vendored
42
vendor/tecnickcom/tcpdf/tcpdf_barcodes_2d.php
vendored
@@ -62,8 +62,8 @@ class TCPDF2DBarcode {
|
|||||||
* <li>$arrcode['num_rows'] required number of rows</li>
|
* <li>$arrcode['num_rows'] required number of rows</li>
|
||||||
* <li>$arrcode['num_cols'] required number of columns</li>
|
* <li>$arrcode['num_cols'] required number of columns</li>
|
||||||
* <li>$arrcode['bcode'][$r][$c] value of the cell is $r row and $c column (0 = transparent, 1 = black)</li></ul>
|
* <li>$arrcode['bcode'][$r][$c] value of the cell is $r row and $c column (0 = transparent, 1 = black)</li></ul>
|
||||||
* @param $code (string) code to print
|
* @param string $code code to print
|
||||||
* @param $type (string) type of barcode: <ul><li>DATAMATRIX : Datamatrix (ISO/IEC 16022)</li><li>PDF417 : PDF417 (ISO/IEC 15438:2006)</li><li>PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".</li><li>QRCODE : QRcode Low error correction</li><li>QRCODE,L : QRcode Low error correction</li><li>QRCODE,M : QRcode Medium error correction</li><li>QRCODE,Q : QRcode Better error correction</li><li>QRCODE,H : QR-CODE Best error correction</li><li>RAW: raw mode - comma-separad list of array rows</li><li>RAW2: raw mode - array rows are surrounded by square parenthesis.</li><li>TEST : Test matrix</li></ul>
|
* @param string $type type of barcode: <ul><li>DATAMATRIX : Datamatrix (ISO/IEC 16022)</li><li>PDF417 : PDF417 (ISO/IEC 15438:2006)</li><li>PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".</li><li>QRCODE : QRcode Low error correction</li><li>QRCODE,L : QRcode Low error correction</li><li>QRCODE,M : QRcode Medium error correction</li><li>QRCODE,Q : QRcode Better error correction</li><li>QRCODE,H : QR-CODE Best error correction</li><li>RAW: raw mode - comma-separad list of array rows</li><li>RAW2: raw mode - array rows are surrounded by square parenthesis.</li><li>TEST : Test matrix</li></ul>
|
||||||
*/
|
*/
|
||||||
public function __construct($code, $type) {
|
public function __construct($code, $type) {
|
||||||
$this->setBarcode($code, $type);
|
$this->setBarcode($code, $type);
|
||||||
@@ -79,9 +79,9 @@ class TCPDF2DBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Send barcode as SVG image object to the standard output.
|
* Send barcode as SVG image object to the standard output.
|
||||||
* @param $w (int) Width of a single rectangle element in user units.
|
* @param int $w Width of a single rectangle element in user units.
|
||||||
* @param $h (int) Height of a single rectangle element in user units.
|
* @param int $h Height of a single rectangle element in user units.
|
||||||
* @param $color (string) Foreground color (in SVG format) for bar elements (background is transparent).
|
* @param string $color Foreground color (in SVG format) for bar elements (background is transparent).
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function getBarcodeSVG($w=3, $h=3, $color='black') {
|
public function getBarcodeSVG($w=3, $h=3, $color='black') {
|
||||||
@@ -99,9 +99,9 @@ class TCPDF2DBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a SVG string representation of barcode.
|
* Return a SVG string representation of barcode.
|
||||||
* @param $w (int) Width of a single rectangle element in user units.
|
* @param int $w Width of a single rectangle element in user units.
|
||||||
* @param $h (int) Height of a single rectangle element in user units.
|
* @param int $h Height of a single rectangle element in user units.
|
||||||
* @param $color (string) Foreground color (in SVG format) for bar elements (background is transparent).
|
* @param string $color Foreground color (in SVG format) for bar elements (background is transparent).
|
||||||
* @return string SVG code.
|
* @return string SVG code.
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
@@ -135,9 +135,9 @@ class TCPDF2DBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an HTML representation of barcode.
|
* Return an HTML representation of barcode.
|
||||||
* @param $w (int) Width of a single rectangle element in pixels.
|
* @param int $w Width of a single rectangle element in pixels.
|
||||||
* @param $h (int) Height of a single rectangle element in pixels.
|
* @param int $h Height of a single rectangle element in pixels.
|
||||||
* @param $color (string) Foreground color for bar elements (background is transparent).
|
* @param string $color Foreground color for bar elements (background is transparent).
|
||||||
* @return string HTML code.
|
* @return string HTML code.
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
@@ -164,9 +164,9 @@ class TCPDF2DBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a PNG image representation of barcode (requires GD or Imagick library).
|
* Send a PNG image representation of barcode (requires GD or Imagick library).
|
||||||
* @param $w (int) Width of a single rectangle element in pixels.
|
* @param int $w Width of a single rectangle element in pixels.
|
||||||
* @param $h (int) Height of a single rectangle element in pixels.
|
* @param int $h Height of a single rectangle element in pixels.
|
||||||
* @param $color (array) RGB (0-255) foreground color for bar elements (background is transparent).
|
* @param array $color RGB (0-255) foreground color for bar elements (background is transparent).
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function getBarcodePNG($w=3, $h=3, $color=array(0,0,0)) {
|
public function getBarcodePNG($w=3, $h=3, $color=array(0,0,0)) {
|
||||||
@@ -184,10 +184,10 @@ class TCPDF2DBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a PNG image representation of barcode (requires GD or Imagick library).
|
* Return a PNG image representation of barcode (requires GD or Imagick library).
|
||||||
* @param $w (int) Width of a single rectangle element in pixels.
|
* @param int $w Width of a single rectangle element in pixels.
|
||||||
* @param $h (int) Height of a single rectangle element in pixels.
|
* @param int $h Height of a single rectangle element in pixels.
|
||||||
* @param $color (array) RGB (0-255) foreground color for bar elements (background is transparent).
|
* @param array $color RGB (0-255) foreground color for bar elements (background is transparent).
|
||||||
* @return image or false in case of error.
|
* @return string|Imagick|false image or false in case of error.
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
public function getBarcodePngData($w=3, $h=3, $color=array(0,0,0)) {
|
public function getBarcodePngData($w=3, $h=3, $color=array(0,0,0)) {
|
||||||
@@ -245,9 +245,9 @@ class TCPDF2DBarcode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the barcode.
|
* Set the barcode.
|
||||||
* @param $code (string) code to print
|
* @param string $code code to print
|
||||||
* @param $type (string) type of barcode: <ul><li>DATAMATRIX : Datamatrix (ISO/IEC 16022)</li><li>PDF417 : PDF417 (ISO/IEC 15438:2006)</li><li>PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".</li><li>QRCODE : QRcode Low error correction</li><li>QRCODE,L : QRcode Low error correction</li><li>QRCODE,M : QRcode Medium error correction</li><li>QRCODE,Q : QRcode Better error correction</li><li>QRCODE,H : QR-CODE Best error correction</li><li>RAW: raw mode - comma-separad list of array rows</li><li>RAW2: raw mode - array rows are surrounded by square parenthesis.</li><li>TEST : Test matrix</li></ul>
|
* @param string $type type of barcode: <ul><li>DATAMATRIX : Datamatrix (ISO/IEC 16022)</li><li>PDF417 : PDF417 (ISO/IEC 15438:2006)</li><li>PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".</li><li>QRCODE : QRcode Low error correction</li><li>QRCODE,L : QRcode Low error correction</li><li>QRCODE,M : QRcode Medium error correction</li><li>QRCODE,Q : QRcode Better error correction</li><li>QRCODE,H : QR-CODE Best error correction</li><li>RAW: raw mode - comma-separad list of array rows</li><li>RAW2: raw mode - array rows are surrounded by square parenthesis.</li><li>TEST : Test matrix</li></ul>
|
||||||
* @return array
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setBarcode($code, $type) {
|
public function setBarcode($code, $type) {
|
||||||
$mode = explode(',', $type);
|
$mode = explode(',', $type);
|
||||||
|
|||||||
2
vendor/tecnickcom/tcpdf/tcpdf_import.php
vendored
2
vendor/tecnickcom/tcpdf/tcpdf_import.php
vendored
@@ -60,7 +60,7 @@ class TCPDF_IMPORT extends TCPDF {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Import an existing PDF document
|
* Import an existing PDF document
|
||||||
* @param $filename (string) Filename of the PDF document to import.
|
* @param string $filename Filename of the PDF document to import.
|
||||||
* @return true in case of success, false otherwise
|
* @return true in case of success, false otherwise
|
||||||
* @public
|
* @public
|
||||||
* @since 1.0.000 (2011-05-24)
|
* @since 1.0.000 (2011-05-24)
|
||||||
|
|||||||
42
vendor/tecnickcom/tcpdf/tcpdf_parser.php
vendored
42
vendor/tecnickcom/tcpdf/tcpdf_parser.php
vendored
@@ -91,8 +91,8 @@ class TCPDF_PARSER {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse a PDF document an return an array of objects.
|
* Parse a PDF document an return an array of objects.
|
||||||
* @param $data (string) PDF data to parse.
|
* @param string $data PDF data to parse.
|
||||||
* @param $cfg (array) Array of configuration parameters:
|
* @param array $cfg Array of configuration parameters:
|
||||||
* 'die_for_errors' : if true termitate the program execution in case of error, otherwise thows an exception;
|
* 'die_for_errors' : if true termitate the program execution in case of error, otherwise thows an exception;
|
||||||
* 'ignore_filter_decoding_errors' : if true ignore filter decoding errors;
|
* 'ignore_filter_decoding_errors' : if true ignore filter decoding errors;
|
||||||
* 'ignore_missing_filter_decoders' : if true ignore missing filter decoding errors.
|
* 'ignore_missing_filter_decoders' : if true ignore missing filter decoding errors.
|
||||||
@@ -130,7 +130,7 @@ class TCPDF_PARSER {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the configuration parameters.
|
* Set the configuration parameters.
|
||||||
* @param $cfg (array) Array of configuration parameters:
|
* @param array $cfg Array of configuration parameters:
|
||||||
* 'die_for_errors' : if true termitate the program execution in case of error, otherwise thows an exception;
|
* 'die_for_errors' : if true termitate the program execution in case of error, otherwise thows an exception;
|
||||||
* 'ignore_filter_decoding_errors' : if true ignore filter decoding errors;
|
* 'ignore_filter_decoding_errors' : if true ignore filter decoding errors;
|
||||||
* 'ignore_missing_filter_decoders' : if true ignore missing filter decoding errors.
|
* 'ignore_missing_filter_decoders' : if true ignore missing filter decoding errors.
|
||||||
@@ -150,7 +150,7 @@ class TCPDF_PARSER {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an array of parsed PDF document objects.
|
* Return an array of parsed PDF document objects.
|
||||||
* @return (array) Array of parsed PDF document objects.
|
* @return array Array of parsed PDF document objects.
|
||||||
* @public
|
* @public
|
||||||
* @since 1.0.000 (2011-06-26)
|
* @since 1.0.000 (2011-06-26)
|
||||||
*/
|
*/
|
||||||
@@ -160,9 +160,9 @@ class TCPDF_PARSER {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Cross-Reference (xref) table and trailer data from PDF document data.
|
* Get Cross-Reference (xref) table and trailer data from PDF document data.
|
||||||
* @param $offset (int) xref offset (if know).
|
* @param int $offset xref offset (if know).
|
||||||
* @param $xref (array) previous xref array (if any).
|
* @param array $xref previous xref array (if any).
|
||||||
* @return Array containing xref and trailer data.
|
* @return array containing xref and trailer data.
|
||||||
* @protected
|
* @protected
|
||||||
* @since 1.0.000 (2011-05-24)
|
* @since 1.0.000 (2011-05-24)
|
||||||
*/
|
*/
|
||||||
@@ -202,9 +202,9 @@ class TCPDF_PARSER {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode the Cross-Reference section
|
* Decode the Cross-Reference section
|
||||||
* @param $startxref (int) Offset at which the xref section starts (position of the 'xref' keyword).
|
* @param int $startxref Offset at which the xref section starts (position of the 'xref' keyword).
|
||||||
* @param $xref (array) Previous xref array (if any).
|
* @param array $xref Previous xref array (if any).
|
||||||
* @return Array containing xref and trailer data.
|
* @return array containing xref and trailer data.
|
||||||
* @protected
|
* @protected
|
||||||
* @since 1.0.000 (2011-06-20)
|
* @since 1.0.000 (2011-06-20)
|
||||||
*/
|
*/
|
||||||
@@ -274,9 +274,9 @@ class TCPDF_PARSER {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode the Cross-Reference Stream section
|
* Decode the Cross-Reference Stream section
|
||||||
* @param $startxref (int) Offset at which the xref section starts.
|
* @param int $startxref Offset at which the xref section starts.
|
||||||
* @param $xref (array) Previous xref array (if any).
|
* @param array $xref Previous xref array (if any).
|
||||||
* @return Array containing xref and trailer data.
|
* @return array containing xref and trailer data.
|
||||||
* @protected
|
* @protected
|
||||||
* @since 1.0.003 (2013-03-16)
|
* @since 1.0.003 (2013-03-16)
|
||||||
*/
|
*/
|
||||||
@@ -489,7 +489,7 @@ class TCPDF_PARSER {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get object type, raw value and offset to next object
|
* Get object type, raw value and offset to next object
|
||||||
* @param $offset (int) Object offset.
|
* @param int $offset Object offset.
|
||||||
* @return array containing object type, raw value and offset to next object
|
* @return array containing object type, raw value and offset to next object
|
||||||
* @protected
|
* @protected
|
||||||
* @since 1.0.000 (2011-06-20)
|
* @since 1.0.000 (2011-06-20)
|
||||||
@@ -667,9 +667,9 @@ class TCPDF_PARSER {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get content of indirect object.
|
* Get content of indirect object.
|
||||||
* @param $obj_ref (string) Object number and generation number separated by underscore character.
|
* @param string $obj_ref Object number and generation number separated by underscore character.
|
||||||
* @param $offset (int) Object offset.
|
* @param int $offset Object offset.
|
||||||
* @param $decoding (boolean) If true decode streams.
|
* @param boolean $decoding If true decode streams.
|
||||||
* @return array containing object data.
|
* @return array containing object data.
|
||||||
* @protected
|
* @protected
|
||||||
* @since 1.0.000 (2011-05-24)
|
* @since 1.0.000 (2011-05-24)
|
||||||
@@ -712,7 +712,7 @@ class TCPDF_PARSER {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the content of object, resolving indect object reference if necessary.
|
* Get the content of object, resolving indect object reference if necessary.
|
||||||
* @param $obj (string) Object value.
|
* @param string $obj Object value.
|
||||||
* @return array containing object data.
|
* @return array containing object data.
|
||||||
* @protected
|
* @protected
|
||||||
* @since 1.0.000 (2011-06-26)
|
* @since 1.0.000 (2011-06-26)
|
||||||
@@ -734,8 +734,8 @@ class TCPDF_PARSER {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode the specified stream.
|
* Decode the specified stream.
|
||||||
* @param $sdic (array) Stream's dictionary array.
|
* @param array $sdic Stream's dictionary array.
|
||||||
* @param $stream (string) Stream to decode.
|
* @param string $stream Stream to decode.
|
||||||
* @return array containing decoded stream data and remaining filters.
|
* @return array containing decoded stream data and remaining filters.
|
||||||
* @protected
|
* @protected
|
||||||
* @since 1.0.000 (2011-06-22)
|
* @since 1.0.000 (2011-06-22)
|
||||||
@@ -796,7 +796,7 @@ class TCPDF_PARSER {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Throw an exception or print an error message and die if the K_TCPDF_PARSER_THROW_EXCEPTION_ERROR constant is set to true.
|
* Throw an exception or print an error message and die if the K_TCPDF_PARSER_THROW_EXCEPTION_ERROR constant is set to true.
|
||||||
* @param $msg (string) The error message
|
* @param string $msg The error message
|
||||||
* @public
|
* @public
|
||||||
* @since 1.0.000 (2011-05-23)
|
* @since 1.0.000 (2011-05-23)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
namespace think\composer;
|
namespace think\composer;
|
||||||
|
|
||||||
use Composer\Installer\LibraryInstaller;
|
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Repository\InstalledRepositoryInterface;
|
use Composer\Repository\InstalledRepositoryInterface;
|
||||||
|
|
||||||
@@ -20,15 +19,16 @@ class ThinkExtend extends LibraryInstaller
|
|||||||
|
|
||||||
public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
|
public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
|
||||||
{
|
{
|
||||||
parent::install($repo, $package);
|
return parent::install($repo, $package)->then(function () use ($package) {
|
||||||
$this->copyExtraFiles($package);
|
$this->copyExtraFiles($package);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
|
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
|
||||||
{
|
{
|
||||||
parent::update($repo, $initial, $target);
|
return parent::update($repo, $initial, $target)->then(function () use ($target) {
|
||||||
$this->copyExtraFiles($target);
|
$this->copyExtraFiles($target);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function copyExtraFiles(PackageInterface $package)
|
protected function copyExtraFiles(PackageInterface $package)
|
||||||
|
|||||||
@@ -2,19 +2,21 @@
|
|||||||
|
|
||||||
namespace think\composer;
|
namespace think\composer;
|
||||||
|
|
||||||
use Composer\Installer\LibraryInstaller;
|
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Repository\InstalledRepositoryInterface;
|
use Composer\Repository\InstalledRepositoryInterface;
|
||||||
|
use InvalidArgumentException;
|
||||||
|
|
||||||
class ThinkFramework extends LibraryInstaller
|
class ThinkFramework extends LibraryInstaller
|
||||||
{
|
{
|
||||||
public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
|
public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
|
||||||
{
|
{
|
||||||
parent::install($repo, $package);
|
return parent::install($repo, $package)->then(function () use ($package) {
|
||||||
if ($this->composer->getPackage()->getType() == 'project' && $package->getInstallationSource() != 'source') {
|
if ($this->composer->getPackage()
|
||||||
|
->getType() == 'project' && $package->getInstallationSource() != 'source') {
|
||||||
//remove tests dir
|
//remove tests dir
|
||||||
$this->filesystem->removeDirectory($this->getInstallPath($package) . DIRECTORY_SEPARATOR . 'tests');
|
$this->filesystem->removeDirectory($this->getInstallPath($package) . DIRECTORY_SEPARATOR . 'tests');
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -23,7 +25,7 @@ class ThinkFramework extends LibraryInstaller
|
|||||||
public function getInstallPath(PackageInterface $package)
|
public function getInstallPath(PackageInterface $package)
|
||||||
{
|
{
|
||||||
if ('topthink/framework' !== $package->getPrettyName()) {
|
if ('topthink/framework' !== $package->getPrettyName()) {
|
||||||
throw new \InvalidArgumentException('Unable to install this library!');
|
throw new InvalidArgumentException('Unable to install this library!');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->composer->getPackage()->getType() !== 'project') {
|
if ($this->composer->getPackage()->getType() !== 'project') {
|
||||||
@@ -42,11 +44,12 @@ class ThinkFramework extends LibraryInstaller
|
|||||||
|
|
||||||
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
|
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
|
||||||
{
|
{
|
||||||
parent::update($repo, $initial, $target);
|
return parent::update($repo, $initial, $target)->then(function () use ($target) {
|
||||||
if ($this->composer->getPackage()->getType() == 'project' && $target->getInstallationSource() != 'source') {
|
if ($this->composer->getPackage()->getType() == 'project' && $target->getInstallationSource() != 'source') {
|
||||||
//remove tests dir
|
//remove tests dir
|
||||||
$this->filesystem->removeDirectory($this->getInstallPath($target) . DIRECTORY_SEPARATOR . 'tests');
|
$this->filesystem->removeDirectory($this->getInstallPath($target) . DIRECTORY_SEPARATOR . 'tests');
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,10 +11,9 @@
|
|||||||
|
|
||||||
namespace think\composer;
|
namespace think\composer;
|
||||||
|
|
||||||
|
|
||||||
use Composer\Installer\LibraryInstaller;
|
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Repository\InstalledRepositoryInterface;
|
use Composer\Repository\InstalledRepositoryInterface;
|
||||||
|
use InvalidArgumentException;
|
||||||
|
|
||||||
class ThinkTesting extends LibraryInstaller
|
class ThinkTesting extends LibraryInstaller
|
||||||
{
|
{
|
||||||
@@ -24,7 +23,7 @@ class ThinkTesting extends LibraryInstaller
|
|||||||
public function getInstallPath(PackageInterface $package)
|
public function getInstallPath(PackageInterface $package)
|
||||||
{
|
{
|
||||||
if ('topthink/think-testing' !== $package->getPrettyName()) {
|
if ('topthink/think-testing' !== $package->getPrettyName()) {
|
||||||
throw new \InvalidArgumentException('Unable to install this library!');
|
throw new InvalidArgumentException('Unable to install this library!');
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::getInstallPath($package);
|
return parent::getInstallPath($package);
|
||||||
@@ -32,19 +31,16 @@ class ThinkTesting extends LibraryInstaller
|
|||||||
|
|
||||||
public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
|
public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
|
||||||
{
|
{
|
||||||
parent::install($repo, $package);
|
parent::install($repo, $package)->then(function () use ($package) {
|
||||||
|
|
||||||
$this->copyTestDir($package);
|
$this->copyTestDir($package);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
|
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
|
||||||
{
|
{
|
||||||
parent::update($repo, $initial, $target);
|
return parent::update($repo, $initial, $target)->then(function () use ($target) {
|
||||||
|
|
||||||
$this->copyTestDir($target);
|
$this->copyTestDir($target);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private function copyTestDir(PackageInterface $package)
|
private function copyTestDir(PackageInterface $package)
|
||||||
|
|||||||
Reference in New Issue
Block a user