3.4.0
This commit is contained in:
@@ -154,9 +154,14 @@ class SimpleImage {
|
||||
case 'image/webp':
|
||||
$this->image = imagecreatefromwebp($file);
|
||||
break;
|
||||
case 'image/bmp':
|
||||
case 'image/x-ms-bmp':
|
||||
case 'image/x-windows-bmp':
|
||||
$this->image = imagecreatefrombmp($file);
|
||||
break;
|
||||
}
|
||||
if(!$this->image) {
|
||||
throw new \Exception("Unsupported image: $file", self::ERR_UNSUPPORTED_FORMAT);
|
||||
throw new \Exception("Unsupported format: " . $this->mimeType, self::ERR_UNSUPPORTED_FORMAT);
|
||||
}
|
||||
|
||||
// Convert pallete images to true color images
|
||||
@@ -217,7 +222,7 @@ class SimpleImage {
|
||||
//
|
||||
// Returns an array containing the image data and mime type.
|
||||
//
|
||||
private function generate($mimeType = null, $quality = 100) {
|
||||
protected function generate($mimeType = null, $quality = 100) {
|
||||
// Format defaults to the original mime type
|
||||
$mimeType = $mimeType ?: $this->mimeType;
|
||||
|
||||
@@ -253,6 +258,12 @@ class SimpleImage {
|
||||
imagesavealpha($this->image, true);
|
||||
imagewebp($this->image, null, $quality);
|
||||
break;
|
||||
case 'image/bmp':
|
||||
case 'image/x-ms-bmp':
|
||||
case 'image/x-windows-bmp':
|
||||
imageinterlace($this->image, true);
|
||||
imagebmp($this->image, null, $quality);
|
||||
break;
|
||||
default:
|
||||
throw new \Exception('Unsupported format: ' . $mimeType, self::ERR_UNSUPPORTED_FORMAT);
|
||||
}
|
||||
@@ -372,7 +383,7 @@ class SimpleImage {
|
||||
//
|
||||
// Returns an int|float value.
|
||||
//
|
||||
private static function keepWithin($value, $min, $max) {
|
||||
protected static function keepWithin($value, $min, $max) {
|
||||
if($value < $min) return $min;
|
||||
if($value > $max) return $max;
|
||||
return $value;
|
||||
@@ -428,6 +439,15 @@ class SimpleImage {
|
||||
return 'square';
|
||||
}
|
||||
|
||||
//
|
||||
// Gets the resolution of the image
|
||||
//
|
||||
// Returns the resolution as an array of integers: [96, 96]
|
||||
//
|
||||
public function getResolution() {
|
||||
return imageresolution($this->image);
|
||||
}
|
||||
|
||||
//
|
||||
// Gets the image's current width.
|
||||
//
|
||||
@@ -444,7 +464,7 @@ class SimpleImage {
|
||||
//
|
||||
// Same as PHP's imagecopymerge, but works with transparent images. Used internally for overlay.
|
||||
//
|
||||
private static function imageCopyMergeAlpha($dstIm, $srcIm, $dstX, $dstY, $srcX, $srcY, $srcW, $srcH, $pct) {
|
||||
protected static function imageCopyMergeAlpha($dstIm, $srcIm, $dstX, $dstY, $srcX, $srcY, $srcW, $srcH, $pct) {
|
||||
// Are we merging with transparency?
|
||||
if($pct < 100) {
|
||||
// Disable alpha blending and "colorize" the image using a transparent color
|
||||
@@ -801,6 +821,24 @@ class SimpleImage {
|
||||
return $this;
|
||||
}
|
||||
|
||||
//
|
||||
// Sets an image's resolution, as per https://www.php.net/manual/en/function.imageresolution.php
|
||||
//
|
||||
// $res_x* (int) - The horizontal resolution in DPI
|
||||
// $res_y (int) - The vertical resolution in DPI
|
||||
//
|
||||
// Returns a SimpleImage object.
|
||||
//
|
||||
public function resolution($res_x, $res_y = null) {
|
||||
if(is_null($res_y)) {
|
||||
imageresolution($this->image, $res_x);
|
||||
} else {
|
||||
imageresolution($this->image, $res_x, $res_y);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
//
|
||||
// Rotates the image.
|
||||
//
|
||||
@@ -819,6 +857,7 @@ class SimpleImage {
|
||||
-(self::keepWithin($angle, -360, 360)),
|
||||
$backgroundColor
|
||||
);
|
||||
imagecolortransparent($this->image, imagecolorallocatealpha($this->image, 0, 0, 0, 127));
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -1457,7 +1496,7 @@ class SimpleImage {
|
||||
self::imageCopyMergeAlpha(
|
||||
$newImage->image,
|
||||
$this->image,
|
||||
$x, $y,
|
||||
0, 0,
|
||||
0, 0,
|
||||
$this->getWidth(),
|
||||
$this->getHeight(),
|
||||
@@ -1495,13 +1534,18 @@ class SimpleImage {
|
||||
//
|
||||
// Sharpens the image.
|
||||
//
|
||||
// $amount (int) - Sharpening amount (default 50)
|
||||
//
|
||||
// Returns a SimpleImage object.
|
||||
//
|
||||
public function sharpen() {
|
||||
public function sharpen($amount = 50) {
|
||||
// Normalize amount
|
||||
$amount = max(1, min(100, $amount)) / 100;
|
||||
|
||||
$sharpen = [
|
||||
[0, -1, 0],
|
||||
[-1, 5, -1],
|
||||
[0, -1, 0]
|
||||
[-1, -1, -1],
|
||||
[-1, 8 / $amount, -1],
|
||||
[-1, -1, -1],
|
||||
];
|
||||
$divisor = array_sum(array_map('array_sum', $sharpen));
|
||||
|
||||
@@ -1533,7 +1577,7 @@ class SimpleImage {
|
||||
//
|
||||
// Returns a color identifier.
|
||||
//
|
||||
private function allocateColor($color) {
|
||||
protected function allocateColor($color) {
|
||||
$color = self::normalizeColor($color);
|
||||
|
||||
// Was this color already allocated?
|
||||
|
2
kirby/vendor/composer/autoload_classmap.php
vendored
2
kirby/vendor/composer/autoload_classmap.php
vendored
@@ -34,6 +34,7 @@ return array(
|
||||
'Kirby\\Cms\\ContentTranslation' => $baseDir . '/src/Cms/ContentTranslation.php',
|
||||
'Kirby\\Cms\\Dir' => $baseDir . '/src/Cms/Dir.php',
|
||||
'Kirby\\Cms\\Email' => $baseDir . '/src/Cms/Email.php',
|
||||
'Kirby\\Cms\\Event' => $baseDir . '/src/Cms/Event.php',
|
||||
'Kirby\\Cms\\Field' => $baseDir . '/src/Cms/Field.php',
|
||||
'Kirby\\Cms\\File' => $baseDir . '/src/Cms/File.php',
|
||||
'Kirby\\Cms\\FileActions' => $baseDir . '/src/Cms/FileActions.php',
|
||||
@@ -119,6 +120,7 @@ return array(
|
||||
'Kirby\\Data\\Json' => $baseDir . '/src/Data/Json.php',
|
||||
'Kirby\\Data\\PHP' => $baseDir . '/src/Data/PHP.php',
|
||||
'Kirby\\Data\\Txt' => $baseDir . '/src/Data/Txt.php',
|
||||
'Kirby\\Data\\Xml' => $baseDir . '/src/Data/Xml.php',
|
||||
'Kirby\\Data\\Yaml' => $baseDir . '/src/Data/Yaml.php',
|
||||
'Kirby\\Database\\Database' => $baseDir . '/src/Database/Database.php',
|
||||
'Kirby\\Database\\Db' => $baseDir . '/src/Database/Db.php',
|
||||
|
2
kirby/vendor/composer/autoload_static.php
vendored
2
kirby/vendor/composer/autoload_static.php
vendored
@@ -128,6 +128,7 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
|
||||
'Kirby\\Cms\\ContentTranslation' => __DIR__ . '/../..' . '/src/Cms/ContentTranslation.php',
|
||||
'Kirby\\Cms\\Dir' => __DIR__ . '/../..' . '/src/Cms/Dir.php',
|
||||
'Kirby\\Cms\\Email' => __DIR__ . '/../..' . '/src/Cms/Email.php',
|
||||
'Kirby\\Cms\\Event' => __DIR__ . '/../..' . '/src/Cms/Event.php',
|
||||
'Kirby\\Cms\\Field' => __DIR__ . '/../..' . '/src/Cms/Field.php',
|
||||
'Kirby\\Cms\\File' => __DIR__ . '/../..' . '/src/Cms/File.php',
|
||||
'Kirby\\Cms\\FileActions' => __DIR__ . '/../..' . '/src/Cms/FileActions.php',
|
||||
@@ -213,6 +214,7 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
|
||||
'Kirby\\Data\\Json' => __DIR__ . '/../..' . '/src/Data/Json.php',
|
||||
'Kirby\\Data\\PHP' => __DIR__ . '/../..' . '/src/Data/PHP.php',
|
||||
'Kirby\\Data\\Txt' => __DIR__ . '/../..' . '/src/Data/Txt.php',
|
||||
'Kirby\\Data\\Xml' => __DIR__ . '/../..' . '/src/Data/Xml.php',
|
||||
'Kirby\\Data\\Yaml' => __DIR__ . '/../..' . '/src/Data/Yaml.php',
|
||||
'Kirby\\Database\\Database' => __DIR__ . '/../..' . '/src/Database/Database.php',
|
||||
'Kirby\\Database\\Db' => __DIR__ . '/../..' . '/src/Database/Db.php',
|
||||
|
@@ -119,7 +119,11 @@ class Frame implements Serializable
|
||||
return null;
|
||||
}
|
||||
|
||||
$this->fileContentsCache = file_get_contents($filePath);
|
||||
try {
|
||||
$this->fileContentsCache = file_get_contents($filePath);
|
||||
} catch (ErrorException $exception) {
|
||||
// Internal file paths of PHP extensions cannot be opened
|
||||
}
|
||||
}
|
||||
|
||||
return $this->fileContentsCache;
|
||||
@@ -187,7 +191,7 @@ class Frame implements Serializable
|
||||
* $frame->getFileLines(); // => array( 0 => '<?php', 1 => '...', ...)
|
||||
* @example
|
||||
* Get one line for this file, starting at line 10 (zero-indexed, remember!)
|
||||
* $frame->getFileLines(9, 1); // array( 10 => '...', 11 => '...')
|
||||
* $frame->getFileLines(9, 1); // array( 9 => '...' )
|
||||
*
|
||||
* @throws InvalidArgumentException if $length is less than or equal to 0
|
||||
* @param int $start
|
||||
|
@@ -61,7 +61,7 @@ class FrameCollection implements ArrayAccess, IteratorAggregate, Serializable, C
|
||||
|
||||
if (!$frame instanceof Frame) {
|
||||
throw new UnexpectedValueException(
|
||||
"Callable to " . __METHOD__ . " must return a Frame object"
|
||||
"Callable to " . __CLASS__ . "::map must return a Frame object"
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -252,7 +252,7 @@ class Inspector
|
||||
}
|
||||
|
||||
if (!extension_loaded('xdebug') || !xdebug_is_enabled()) {
|
||||
return [];
|
||||
return $traces;
|
||||
}
|
||||
|
||||
// Use xdebug to get the full stack trace and remove the shutdown handler stack trace
|
||||
|
@@ -46,6 +46,11 @@ class PlainTextHandler extends Handler
|
||||
*/
|
||||
private $traceFunctionArgsOutputLimit = 1024;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $addPreviousToOutput = true;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
@@ -114,6 +119,21 @@ class PlainTextHandler extends Handler
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add previous exceptions to output.
|
||||
* @param bool|null $addPreviousToOutput
|
||||
* @return bool|$this
|
||||
*/
|
||||
public function addPreviousToOutput($addPreviousToOutput = null)
|
||||
{
|
||||
if (func_num_args() == 0) {
|
||||
return $this->addPreviousToOutput;
|
||||
}
|
||||
|
||||
$this->addPreviousToOutput = (bool) $addPreviousToOutput;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add error trace function arguments to output.
|
||||
* Set to True for all frame args, or integer for the n first frame args.
|
||||
@@ -151,14 +171,18 @@ class PlainTextHandler extends Handler
|
||||
public function generateResponse()
|
||||
{
|
||||
$exception = $this->getException();
|
||||
return sprintf(
|
||||
"%s: %s in file %s on line %d%s\n",
|
||||
get_class($exception),
|
||||
$exception->getMessage(),
|
||||
$exception->getFile(),
|
||||
$exception->getLine(),
|
||||
$this->getTraceOutput()
|
||||
);
|
||||
$message = $this->getExceptionOutput($exception);
|
||||
|
||||
if ($this->addPreviousToOutput) {
|
||||
$previous = $exception->getPrevious();
|
||||
while ($previous) {
|
||||
$message .= "\n\nCaused by\n" . $this->getExceptionOutput($previous);
|
||||
$previous = $previous->getPrevious();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $message . $this->getTraceOutput() . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -284,6 +308,22 @@ class PlainTextHandler extends Handler
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the exception as plain text.
|
||||
* @param \Throwable $exception
|
||||
* @return string
|
||||
*/
|
||||
private function getExceptionOutput($exception)
|
||||
{
|
||||
return sprintf(
|
||||
"%s: %s in file %s on line %d",
|
||||
get_class($exception),
|
||||
$exception->getMessage(),
|
||||
$exception->getFile(),
|
||||
$exception->getLine()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
|
@@ -17,9 +17,21 @@ use Whoops\Util\TemplateHelper;
|
||||
|
||||
class PrettyPageHandler extends Handler
|
||||
{
|
||||
const EDITOR_SUBLIME = "sublime";
|
||||
const EDITOR_TEXTMATE = "textmate";
|
||||
const EDITOR_EMACS = "emacs";
|
||||
const EDITOR_MACVIM = "macvim";
|
||||
const EDITOR_PHPSTORM = "phpstorm";
|
||||
const EDITOR_IDEA = "idea";
|
||||
const EDITOR_VSCODE = "vscode";
|
||||
const EDITOR_ATOM = "atom";
|
||||
const EDITOR_ESPRESSO = "espresso";
|
||||
const EDITOR_XDEBUG = "xdebug";
|
||||
|
||||
/**
|
||||
* Search paths to be scanned for resources, in the reverse
|
||||
* order they're declared.
|
||||
* Search paths to be scanned for resources.
|
||||
*
|
||||
* Stored in the reverse order they're declared.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
@@ -39,6 +51,13 @@ class PrettyPageHandler extends Handler
|
||||
*/
|
||||
private $customCss = null;
|
||||
|
||||
/**
|
||||
* The name of the custom js file.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $customJs = null;
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
*/
|
||||
@@ -73,19 +92,22 @@ class PrettyPageHandler extends Handler
|
||||
];
|
||||
|
||||
/**
|
||||
* A string identifier for a known IDE/text editor, or a closure
|
||||
* that resolves a string that can be used to open a given file
|
||||
* in an editor. If the string contains the special substrings
|
||||
* %file or %line, they will be replaced with the correct data.
|
||||
* An identifier for a known IDE/text editor.
|
||||
*
|
||||
* Either a string, or a calalble that resolves a string, that can be used
|
||||
* to open a given file in an editor. If the string contains the special
|
||||
* substrings %file or %line, they will be replaced with the correct data.
|
||||
*
|
||||
* @example
|
||||
* "txmt://open?url=%file&line=%line"
|
||||
* @var mixed $editor
|
||||
* "txmt://open?url=%file&line=%line"
|
||||
*
|
||||
* @var callable|string $editor
|
||||
*/
|
||||
protected $editor;
|
||||
|
||||
/**
|
||||
* A list of known editor strings
|
||||
* A list of known editor strings.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $editors = [
|
||||
@@ -97,15 +119,18 @@ class PrettyPageHandler extends Handler
|
||||
"idea" => "idea://open?file=%file&line=%line",
|
||||
"vscode" => "vscode://file/%file:%line",
|
||||
"atom" => "atom://core/open/file?filename=%file&line=%line",
|
||||
"espresso" => "x-espresso://open?filepath=%file&lines=%line",
|
||||
];
|
||||
|
||||
/**
|
||||
* @var TemplateHelper
|
||||
*/
|
||||
private $templateHelper;
|
||||
protected $templateHelper;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -114,6 +139,9 @@ class PrettyPageHandler extends Handler
|
||||
$this->editors['xdebug'] = function ($file, $line) {
|
||||
return str_replace(['%f', '%l'], [$file, $line], ini_get('xdebug.file_link_format'));
|
||||
};
|
||||
|
||||
// If xdebug is available, use it as default editor.
|
||||
$this->setEditor('xdebug');
|
||||
}
|
||||
|
||||
// Add the default, local resource search path:
|
||||
@@ -126,10 +154,11 @@ class PrettyPageHandler extends Handler
|
||||
|
||||
if (class_exists('Symfony\Component\VarDumper\Cloner\VarCloner')) {
|
||||
$cloner = new VarCloner();
|
||||
// Only dump object internals if a custom caster exists.
|
||||
// Only dump object internals if a custom caster exists for performance reasons
|
||||
// https://github.com/filp/whoops/pull/404
|
||||
$cloner->addCasters(['*' => function ($obj, $a, $stub, $isNested, $filter = 0) {
|
||||
$class = $stub->class;
|
||||
$classes = [$class => $class] + class_parents($class) + class_implements($class);
|
||||
$classes = [$class => $class] + class_parents($obj) + class_implements($obj);
|
||||
|
||||
foreach ($classes as $class) {
|
||||
if (isset(AbstractCloner::$defaultCasters[$class])) {
|
||||
@@ -177,6 +206,10 @@ class PrettyPageHandler extends Handler
|
||||
$customCssFile = $this->getResource($this->customCss);
|
||||
}
|
||||
|
||||
if ($this->customJs) {
|
||||
$customJsFile = $this->getResource($this->customJs);
|
||||
}
|
||||
|
||||
$inspector = $this->getInspector();
|
||||
$frames = $this->getExceptionFrames();
|
||||
$code = $this->getExceptionCode();
|
||||
@@ -236,6 +269,10 @@ class PrettyPageHandler extends Handler
|
||||
$vars["stylesheet"] .= file_get_contents($customCssFile);
|
||||
}
|
||||
|
||||
if (isset($customJsFile)) {
|
||||
$vars["javascript"] .= file_get_contents($customJsFile);
|
||||
}
|
||||
|
||||
// Add extra entries list of data tables:
|
||||
// @todo: Consolidate addDataTable and addDataTableCallback
|
||||
$extraTables = array_map(function ($table) use ($inspector) {
|
||||
@@ -255,9 +292,9 @@ class PrettyPageHandler extends Handler
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the stack trace frames of the exception that is currently being handled.
|
||||
* Get the stack trace frames of the exception currently being handled.
|
||||
*
|
||||
* @return \Whoops\Exception\FrameCollection;
|
||||
* @return \Whoops\Exception\FrameCollection
|
||||
*/
|
||||
protected function getExceptionFrames()
|
||||
{
|
||||
@@ -278,7 +315,7 @@ class PrettyPageHandler extends Handler
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the code of the exception that is currently being handled.
|
||||
* Get the code of the exception currently being handled.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -305,10 +342,14 @@ class PrettyPageHandler extends Handler
|
||||
|
||||
/**
|
||||
* Adds an entry to the list of tables displayed in the template.
|
||||
*
|
||||
* The expected data is a simple associative array. Any nested arrays
|
||||
* will be flattened with print_r
|
||||
* will be flattened with `print_r`.
|
||||
*
|
||||
* @param string $label
|
||||
* @param array $data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addDataTable($label, array $data)
|
||||
{
|
||||
@@ -317,13 +358,17 @@ class PrettyPageHandler extends Handler
|
||||
|
||||
/**
|
||||
* Lazily adds an entry to the list of tables displayed in the table.
|
||||
* The supplied callback argument will be called when the error is rendered,
|
||||
* it should produce a simple associative array. Any nested arrays will
|
||||
* be flattened with print_r.
|
||||
*
|
||||
* The supplied callback argument will be called when the error is
|
||||
* rendered, it should produce a simple associative array. Any nested
|
||||
* arrays will be flattened with `print_r`.
|
||||
*
|
||||
* @param string $label
|
||||
* @param callable $callback Callable returning an associative array
|
||||
*
|
||||
* @throws InvalidArgumentException If $callback is not callable
|
||||
* @param string $label
|
||||
* @param callable $callback Callable returning an associative array
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addDataTableCallback($label, /* callable */ $callback)
|
||||
{
|
||||
@@ -346,9 +391,12 @@ class PrettyPageHandler extends Handler
|
||||
|
||||
/**
|
||||
* Returns all the extra data tables registered with this handler.
|
||||
* Optionally accepts a 'label' parameter, to only return the data
|
||||
* table under that label.
|
||||
* @param string|null $label
|
||||
*
|
||||
* Optionally accepts a 'label' parameter, to only return the data table
|
||||
* under that label.
|
||||
*
|
||||
* @param string|null $label
|
||||
*
|
||||
* @return array[]|callable
|
||||
*/
|
||||
public function getDataTables($label = null)
|
||||
@@ -362,10 +410,14 @@ class PrettyPageHandler extends Handler
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows to disable all attempts to dynamically decide whether to
|
||||
* handle or return prematurely.
|
||||
* Set this to ensure that the handler will perform no matter what.
|
||||
* @param bool|null $value
|
||||
* Set whether to handle unconditionally.
|
||||
*
|
||||
* Allows to disable all attempts to dynamically decide whether to handle
|
||||
* or return prematurely. Set this to ensure that the handler will perform,
|
||||
* no matter what.
|
||||
*
|
||||
* @param bool|null $value
|
||||
*
|
||||
* @return bool|null
|
||||
*/
|
||||
public function handleUnconditionally($value = null)
|
||||
@@ -378,10 +430,11 @@ class PrettyPageHandler extends Handler
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an editor resolver, identified by a string
|
||||
* name, and that may be a string path, or a callable
|
||||
* resolver. If the callable returns a string, it will
|
||||
* be set as the file reference's href attribute.
|
||||
* Adds an editor resolver.
|
||||
*
|
||||
* Either a string, or a closure that resolves a string, that can be used
|
||||
* to open a given file in an editor. If the string contains the special
|
||||
* substrings %file or %line, they will be replaced with the correct data.
|
||||
*
|
||||
* @example
|
||||
* $run->addEditor('macvim', "mvim://open?url=file://%file&line=%line")
|
||||
@@ -390,8 +443,11 @@ class PrettyPageHandler extends Handler
|
||||
* unlink($file);
|
||||
* return "http://stackoverflow.com";
|
||||
* });
|
||||
* @param string $identifier
|
||||
* @param string $resolver
|
||||
*
|
||||
* @param string $identifier
|
||||
* @param string|callable $resolver
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addEditor($identifier, $resolver)
|
||||
{
|
||||
@@ -399,18 +455,21 @@ class PrettyPageHandler extends Handler
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the editor to use to open referenced files, by a string
|
||||
* identifier, or a callable that will be executed for every
|
||||
* file reference, with a $file and $line argument, and should
|
||||
* return a string.
|
||||
* Set the editor to use to open referenced files.
|
||||
*
|
||||
* Pass either the name of a configured editor, or a closure that directly
|
||||
* resolves an editor string.
|
||||
*
|
||||
* @example
|
||||
* $run->setEditor(function($file, $line) { return "file:///{$file}"; });
|
||||
* @example
|
||||
* $run->setEditor('sublime');
|
||||
*
|
||||
* @param string|callable $editor
|
||||
*
|
||||
* @throws InvalidArgumentException If invalid argument identifier provided
|
||||
* @param string|callable $editor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setEditor($editor)
|
||||
{
|
||||
@@ -425,14 +484,13 @@ class PrettyPageHandler extends Handler
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a string file path, and an integer file line,
|
||||
* executes the editor resolver and returns, if available,
|
||||
* a string that may be used as the href property for that
|
||||
* file reference.
|
||||
* Get the editor href for a given file and line, if available.
|
||||
*
|
||||
* @param string $filePath
|
||||
* @param int $line
|
||||
*
|
||||
* @throws InvalidArgumentException If editor resolver does not return a string
|
||||
* @param string $filePath
|
||||
* @param int $line
|
||||
*
|
||||
* @return string|bool
|
||||
*/
|
||||
public function getEditorHref($filePath, $line)
|
||||
@@ -458,13 +516,13 @@ class PrettyPageHandler extends Handler
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a boolean if the editor link should
|
||||
* act as an Ajax request. The editor must be a
|
||||
* valid callable function/closure
|
||||
* Determine if the editor link should act as an Ajax request.
|
||||
*
|
||||
* @param string $filePath
|
||||
* @param int $line
|
||||
*
|
||||
* @throws UnexpectedValueException If editor resolver does not return a boolean
|
||||
*
|
||||
* @throws UnexpectedValueException If editor resolver does not return a boolean
|
||||
* @param string $filePath
|
||||
* @param int $line
|
||||
* @return bool
|
||||
*/
|
||||
public function getEditorAjax($filePath, $line)
|
||||
@@ -481,12 +539,11 @@ class PrettyPageHandler extends Handler
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a boolean if the editor link should
|
||||
* act as an Ajax request. The editor must be a
|
||||
* valid callable function/closure
|
||||
* Determines both the editor and if ajax should be used.
|
||||
*
|
||||
* @param string $filePath
|
||||
* @param int $line
|
||||
*
|
||||
* @param string $filePath
|
||||
* @param int $line
|
||||
* @return array
|
||||
*/
|
||||
protected function getEditor($filePath, $line)
|
||||
@@ -530,7 +587,10 @@ class PrettyPageHandler extends Handler
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $title
|
||||
* Set the page title.
|
||||
*
|
||||
* @param string $title
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setPageTitle($title)
|
||||
@@ -539,6 +599,8 @@ class PrettyPageHandler extends Handler
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the page title.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPageTitle()
|
||||
@@ -547,12 +609,12 @@ class PrettyPageHandler extends Handler
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a path to the list of paths to be searched for
|
||||
* resources.
|
||||
* Adds a path to the list of paths to be searched for resources.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @throws InvalidArgumentException If $path is not a valid directory
|
||||
*
|
||||
* @param string $path
|
||||
* @return void
|
||||
*/
|
||||
public function addResourcePath($path)
|
||||
@@ -569,7 +631,8 @@ class PrettyPageHandler extends Handler
|
||||
/**
|
||||
* Adds a custom css file to be loaded.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addCustomCss($name)
|
||||
@@ -577,6 +640,17 @@ class PrettyPageHandler extends Handler
|
||||
$this->customCss = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a custom js file to be loaded.
|
||||
*
|
||||
* @param string $name
|
||||
* @return void
|
||||
*/
|
||||
public function addCustomJs($name)
|
||||
{
|
||||
$this->customJs = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
@@ -587,13 +661,15 @@ class PrettyPageHandler extends Handler
|
||||
|
||||
/**
|
||||
* Finds a resource, by its relative path, in all available search paths.
|
||||
*
|
||||
* The search is performed starting at the last search path, and all the
|
||||
* way back to the first, enabling a cascading-type system of overrides
|
||||
* for all resources.
|
||||
* way back to the first, enabling a cascading-type system of overrides for
|
||||
* all resources.
|
||||
*
|
||||
* @param string $resource
|
||||
*
|
||||
* @throws RuntimeException If resource cannot be found in any of the available paths
|
||||
*
|
||||
* @param string $resource
|
||||
* @return string
|
||||
*/
|
||||
protected function getResource($resource)
|
||||
@@ -639,7 +715,8 @@ class PrettyPageHandler extends Handler
|
||||
/**
|
||||
* @deprecated
|
||||
*
|
||||
* @param string $resourcesPath
|
||||
* @param string $resourcesPath
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setResourcesPath($resourcesPath)
|
||||
@@ -661,6 +738,8 @@ class PrettyPageHandler extends Handler
|
||||
* Set the application paths.
|
||||
*
|
||||
* @param array $applicationPaths
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setApplicationPaths($applicationPaths)
|
||||
{
|
||||
@@ -671,6 +750,8 @@ class PrettyPageHandler extends Handler
|
||||
* Set the application root path.
|
||||
*
|
||||
* @param string $applicationRootPath
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setApplicationRootPath($applicationRootPath)
|
||||
{
|
||||
@@ -680,8 +761,10 @@ class PrettyPageHandler extends Handler
|
||||
/**
|
||||
* blacklist a sensitive value within one of the superglobal arrays.
|
||||
*
|
||||
* @param $superGlobalName string the name of the superglobal array, e.g. '_GET'
|
||||
* @param $key string the key within the superglobal
|
||||
* @param string $superGlobalName The name of the superglobal array, e.g. '_GET'
|
||||
* @param string $key The key within the superglobal
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function blacklist($superGlobalName, $key)
|
||||
{
|
||||
@@ -690,12 +773,14 @@ class PrettyPageHandler extends Handler
|
||||
|
||||
/**
|
||||
* Checks all values within the given superGlobal array.
|
||||
* Blacklisted values will be replaced by a equal length string cointaining only '*' characters.
|
||||
*
|
||||
* We intentionally dont rely on $GLOBALS as it depends on 'auto_globals_jit' php.ini setting.
|
||||
* Blacklisted values will be replaced by a equal length string cointaining
|
||||
* only '*' characters. We intentionally dont rely on $GLOBALS as it
|
||||
* depends on the 'auto_globals_jit' php.ini setting.
|
||||
*
|
||||
* @param array $superGlobal One of the superglobal arrays
|
||||
* @param string $superGlobalName The name of the superglobal array, e.g. '_GET'
|
||||
*
|
||||
* @param $superGlobal array One of the superglobal arrays
|
||||
* @param $superGlobalName string the name of the superglobal array, e.g. '_GET'
|
||||
* @return array $values without sensitive data
|
||||
*/
|
||||
private function masked(array $superGlobal, $superGlobalName)
|
||||
@@ -703,11 +788,13 @@ class PrettyPageHandler extends Handler
|
||||
$blacklisted = $this->blacklist[$superGlobalName];
|
||||
|
||||
$values = $superGlobal;
|
||||
|
||||
foreach ($blacklisted as $key) {
|
||||
if (isset($superGlobal[$key])) {
|
||||
if (isset($superGlobal[$key]) && is_string($superGlobal[$key])) {
|
||||
$values[$key] = str_repeat('*', strlen($superGlobal[$key]));
|
||||
}
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ class XmlResponseHandler extends Handler
|
||||
),
|
||||
];
|
||||
|
||||
echo $this->toXml($response);
|
||||
echo self::toXml($response);
|
||||
|
||||
return Handler::QUIT;
|
||||
}
|
||||
|
@@ -12,6 +12,11 @@ body {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.Whoops.container {
|
||||
position: relative;
|
||||
z-index: 9999999999;
|
||||
}
|
||||
|
||||
.panel {
|
||||
overflow-y: scroll;
|
||||
height: 100%;
|
||||
@@ -414,12 +419,9 @@ pre:not(.prettyprinted) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#copy-button {
|
||||
.rightButton {
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.clipboard {
|
||||
opacity: .8;
|
||||
background: none;
|
||||
|
||||
@@ -431,7 +433,7 @@ pre:not(.prettyprinted) {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.clipboard:hover {
|
||||
.rightButton:hover {
|
||||
box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
@@ -32,9 +32,9 @@
|
||||
<?php /* List registered handlers, in order of first to last registered */ ?>
|
||||
<div class="data-table-container" id="handlers">
|
||||
<label>Registered Handlers</label>
|
||||
<?php foreach ($handlers as $i => $handler): ?>
|
||||
<div class="handler <?php echo ($handler === $handler) ? 'active' : ''?>">
|
||||
<?php echo $i ?>. <?php echo $tpl->escape(get_class($handler)) ?>
|
||||
<?php foreach ($handlers as $i => $h): ?>
|
||||
<div class="handler <?php echo ($h === $handler) ? 'active' : ''?>">
|
||||
<?php echo $i ?>. <?php echo $tpl->escape(get_class($h)) ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
@@ -1,14 +1,8 @@
|
||||
<div class="frames-description <?php echo $has_frames_tabs ? 'frames-description-application' : '' ?>">
|
||||
<?php if ($has_frames_tabs): ?>
|
||||
<?php if ($active_frames_tab == 'application'): ?>
|
||||
<span href="#" id="application-frames-tab" class="frames-tab frames-tab-active">
|
||||
<a href="#" id="application-frames-tab" class="frames-tab <?php echo $active_frames_tab == 'application' ? 'frames-tab-active' : '' ?>">
|
||||
Application frames (<?php echo $frames->countIsApplication() ?>)
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<a href="#" id="application-frames-tab" class="frames-tab">
|
||||
Application frames (<?php echo $frames->countIsApplication() ?>)
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<a href="#" id="all-frames-tab" class="frames-tab <?php echo $active_frames_tab == 'all' ? 'frames-tab-active' : '' ?>">
|
||||
All frames (<?php echo count($frames) ?>)
|
||||
</a>
|
||||
|
@@ -86,8 +86,11 @@
|
||||
</ul>
|
||||
|
||||
<span id="plain-exception"><?php echo $tpl->escape($plain_exception) ?></span>
|
||||
<button id="copy-button" class="clipboard" data-clipboard-text="<?php echo $tpl->escape($plain_exception) ?>" title="Copy exception details to clipboard">
|
||||
<button id="copy-button" class="rightButton clipboard" data-clipboard-text="<?php echo $tpl->escape($plain_exception) ?>" title="Copy exception details to clipboard">
|
||||
COPY
|
||||
</button>
|
||||
<button id="hide-error" class="rightButton" title="Hide error message" onclick="document.getElementsByClassName('Whoops')[0].style.display = 'none';">
|
||||
HIDE
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
114
kirby/vendor/filp/whoops/src/Whoops/Run.php
vendored
114
kirby/vendor/filp/whoops/src/Whoops/Run.php
vendored
@@ -41,7 +41,25 @@ final class Run implements RunInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Pushes a handler to the end of the stack
|
||||
* Explicitly request your handler runs as the last of all currently registered handlers
|
||||
*/
|
||||
public function appendHandler($handler)
|
||||
{
|
||||
array_unshift($this->handlerStack, $this->resolveHandler($handler));
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Explicitly request your handler runs as the first of all currently registered handlers
|
||||
*/
|
||||
public function prependHandler($handler)
|
||||
{
|
||||
return $this->pushHandler($handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register your handler as the last of all currently registered handlers.
|
||||
* Prefer using appendHandler and prependHandler for clarity.
|
||||
*
|
||||
* @throws InvalidArgumentException If argument is not callable or instance of HandlerInterface
|
||||
* @param Callable|HandlerInterface $handler
|
||||
@@ -49,24 +67,12 @@ final class Run implements RunInterface
|
||||
*/
|
||||
public function pushHandler($handler)
|
||||
{
|
||||
if (is_callable($handler)) {
|
||||
$handler = new CallbackHandler($handler);
|
||||
}
|
||||
|
||||
if (!$handler instanceof HandlerInterface) {
|
||||
throw new InvalidArgumentException(
|
||||
"Argument to " . __METHOD__ . " must be a callable, or instance of "
|
||||
. "Whoops\\Handler\\HandlerInterface"
|
||||
);
|
||||
}
|
||||
|
||||
$this->handlerStack[] = $handler;
|
||||
$this->handlerStack[] = $this->resolveHandler($handler);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the last handler in the stack and returns it.
|
||||
* Returns null if there"s nothing else to pop.
|
||||
* See removeFirstHandler and removeLastHandler
|
||||
* @return null|HandlerInterface
|
||||
*/
|
||||
public function popHandler()
|
||||
@@ -74,6 +80,23 @@ final class Run implements RunInterface
|
||||
return array_pop($this->handlerStack);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Removes the first handler
|
||||
*/
|
||||
public function removeFirstHandler()
|
||||
{
|
||||
array_pop($this->handlerStack);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the last handler
|
||||
*/
|
||||
public function removeLastHandler()
|
||||
{
|
||||
array_shift($this->handlerStack);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array with all handlers, in the
|
||||
* order they were added to the stack.
|
||||
@@ -260,33 +283,35 @@ final class Run implements RunInterface
|
||||
$handlerResponse = null;
|
||||
$handlerContentType = null;
|
||||
|
||||
foreach (array_reverse($this->handlerStack) as $handler) {
|
||||
$handler->setRun($this);
|
||||
$handler->setInspector($inspector);
|
||||
$handler->setException($exception);
|
||||
try {
|
||||
foreach (array_reverse($this->handlerStack) as $handler) {
|
||||
$handler->setRun($this);
|
||||
$handler->setInspector($inspector);
|
||||
$handler->setException($exception);
|
||||
|
||||
// The HandlerInterface does not require an Exception passed to handle()
|
||||
// and neither of our bundled handlers use it.
|
||||
// However, 3rd party handlers may have already relied on this parameter,
|
||||
// and removing it would be possibly breaking for users.
|
||||
$handlerResponse = $handler->handle($exception);
|
||||
// The HandlerInterface does not require an Exception passed to handle()
|
||||
// and neither of our bundled handlers use it.
|
||||
// However, 3rd party handlers may have already relied on this parameter,
|
||||
// and removing it would be possibly breaking for users.
|
||||
$handlerResponse = $handler->handle($exception);
|
||||
|
||||
// Collect the content type for possible sending in the headers.
|
||||
$handlerContentType = method_exists($handler, 'contentType') ? $handler->contentType() : null;
|
||||
// Collect the content type for possible sending in the headers.
|
||||
$handlerContentType = method_exists($handler, 'contentType') ? $handler->contentType() : null;
|
||||
|
||||
if (in_array($handlerResponse, [Handler::LAST_HANDLER, Handler::QUIT])) {
|
||||
// The Handler has handled the exception in some way, and
|
||||
// wishes to quit execution (Handler::QUIT), or skip any
|
||||
// other handlers (Handler::LAST_HANDLER). If $this->allowQuit
|
||||
// is false, Handler::QUIT behaves like Handler::LAST_HANDLER
|
||||
break;
|
||||
if (in_array($handlerResponse, [Handler::LAST_HANDLER, Handler::QUIT])) {
|
||||
// The Handler has handled the exception in some way, and
|
||||
// wishes to quit execution (Handler::QUIT), or skip any
|
||||
// other handlers (Handler::LAST_HANDLER). If $this->allowQuit
|
||||
// is false, Handler::QUIT behaves like Handler::LAST_HANDLER
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$willQuit = $handlerResponse == Handler::QUIT && $this->allowQuit();
|
||||
} finally {
|
||||
$output = $this->system->cleanOutputBuffer();
|
||||
}
|
||||
|
||||
$willQuit = $handlerResponse == Handler::QUIT && $this->allowQuit();
|
||||
|
||||
$output = $this->system->cleanOutputBuffer();
|
||||
|
||||
// If we're allowed to, send output generated by handlers directly
|
||||
// to the output, otherwise, and if the script doesn't quit, return
|
||||
// it so that it may be used by the caller
|
||||
@@ -375,6 +400,7 @@ final class Run implements RunInterface
|
||||
if ($error && Misc::isLevelFatal($error['type'])) {
|
||||
// If there was a fatal error,
|
||||
// it was not handled in handleError yet.
|
||||
$this->allowQuit = false;
|
||||
$this->handleError(
|
||||
$error['type'],
|
||||
$error['message'],
|
||||
@@ -390,6 +416,22 @@ final class Run implements RunInterface
|
||||
*/
|
||||
private $canThrowExceptions = true;
|
||||
|
||||
private function resolveHandler($handler)
|
||||
{
|
||||
if (is_callable($handler)) {
|
||||
$handler = new CallbackHandler($handler);
|
||||
}
|
||||
|
||||
if (!$handler instanceof HandlerInterface) {
|
||||
throw new InvalidArgumentException(
|
||||
"Handler must be a callable, or instance of "
|
||||
. "Whoops\\Handler\\HandlerInterface"
|
||||
);
|
||||
}
|
||||
|
||||
return $handler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Echo something to the browser
|
||||
* @param string $output
|
||||
|
@@ -26,9 +26,9 @@ class SystemFacade
|
||||
*/
|
||||
public function setErrorHandler(callable $handler, $types = 'use-php-defaults')
|
||||
{
|
||||
// Workaround for PHP 5.5
|
||||
// Since PHP 5.4 the constant E_ALL contains all errors (even E_STRICT)
|
||||
if ($types === 'use-php-defaults') {
|
||||
$types = E_ALL | E_STRICT;
|
||||
$types = E_ALL;
|
||||
}
|
||||
return set_error_handler($handler, $types);
|
||||
}
|
||||
|
@@ -104,7 +104,7 @@ class TemplateHelper
|
||||
{
|
||||
$parts = explode($delimiter, $s);
|
||||
foreach ($parts as &$part) {
|
||||
$part = '<div class="delimiter">' . $part . '</div>';
|
||||
$part = '<span class="delimiter">' . $part . '</span>';
|
||||
}
|
||||
|
||||
return implode($delimiter, $parts);
|
||||
|
@@ -11,7 +11,7 @@ use Composer\Package\PackageInterface;
|
||||
* @author Lukas Bestle <lukas@getkirby.com>
|
||||
* @link https://getkirby.com
|
||||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
* @license MIT
|
||||
*/
|
||||
class CmsInstaller extends Installer
|
||||
{
|
||||
|
@@ -12,7 +12,7 @@ use Composer\Repository\InstalledRepositoryInterface;
|
||||
* @author Lukas Bestle <lukas@getkirby.com>
|
||||
* @link https://getkirby.com
|
||||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
* @license MIT
|
||||
*/
|
||||
class Installer extends LibraryInstaller
|
||||
{
|
||||
|
@@ -11,7 +11,7 @@ use Composer\Plugin\PluginInterface;
|
||||
* @author Lukas Bestle <lukas@getkirby.com>
|
||||
* @link https://getkirby.com
|
||||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
* @license MIT
|
||||
*/
|
||||
class Plugin implements PluginInterface
|
||||
{
|
||||
|
@@ -9,7 +9,7 @@ use Composer\Package\PackageInterface;
|
||||
* @author Lukas Bestle <lukas@getkirby.com>
|
||||
* @link https://getkirby.com
|
||||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
* @license MIT
|
||||
*/
|
||||
class PluginInstaller extends Installer
|
||||
{
|
||||
|
@@ -3,6 +3,7 @@
|
||||
return [
|
||||
// NEVER REWRITE
|
||||
'zendframework/zendframework' => 'zendframework/zendframework',
|
||||
'zend-developer-tools/toolbar/bjy' => 'zend-developer-tools/toolbar/bjy',
|
||||
'zend-developer-tools/toolbar/doctrine' => 'zend-developer-tools/toolbar/doctrine',
|
||||
|
||||
// NAMESPACES
|
||||
|
37
kirby/vendor/mustangostang/spyc/Spyc.php
vendored
37
kirby/vendor/mustangostang/spyc/Spyc.php
vendored
@@ -88,6 +88,12 @@ class Spyc {
|
||||
*/
|
||||
public $setting_use_syck_is_possible = false;
|
||||
|
||||
/**
|
||||
* Setting this to true will forse YAMLLoad to use syck_load function when
|
||||
* possible. False by default.
|
||||
* @var bool
|
||||
*/
|
||||
public $setting_empty_hash_as_object = false;
|
||||
|
||||
|
||||
/**#@+
|
||||
@@ -147,9 +153,15 @@ class Spyc {
|
||||
* @access public
|
||||
* @return array
|
||||
* @param string $input Path of YAML file or string containing YAML
|
||||
* @param array set options
|
||||
*/
|
||||
public static function YAMLLoad($input) {
|
||||
public static function YAMLLoad($input, $options = []) {
|
||||
$Spyc = new Spyc;
|
||||
foreach ($options as $key => $value) {
|
||||
if (property_exists($Spyc, $key)) {
|
||||
$Spyc->$key = $value;
|
||||
}
|
||||
}
|
||||
return $Spyc->_load($input);
|
||||
}
|
||||
|
||||
@@ -171,9 +183,15 @@ class Spyc {
|
||||
* @access public
|
||||
* @return array
|
||||
* @param string $input String containing YAML
|
||||
* @param array set options
|
||||
*/
|
||||
public static function YAMLLoadString($input) {
|
||||
public static function YAMLLoadString($input, $options = []) {
|
||||
$Spyc = new Spyc;
|
||||
foreach ($options as $key => $value) {
|
||||
if (property_exists($Spyc, $key)) {
|
||||
$Spyc->$key = $value;
|
||||
}
|
||||
}
|
||||
return $Spyc->_loadString($input);
|
||||
}
|
||||
|
||||
@@ -574,19 +592,20 @@ class Spyc {
|
||||
$line = $this->stripGroup ($line, $group);
|
||||
}
|
||||
|
||||
if ($this->startsMappedSequence($line))
|
||||
if ($this->startsMappedSequence($line)) {
|
||||
return $this->returnMappedSequence($line);
|
||||
}
|
||||
|
||||
if ($this->startsMappedValue($line))
|
||||
if ($this->startsMappedValue($line)) {
|
||||
return $this->returnMappedValue($line);
|
||||
}
|
||||
|
||||
if ($this->isArrayElement($line))
|
||||
return $this->returnArrayElement($line);
|
||||
return $this->returnArrayElement($line);
|
||||
|
||||
if ($this->isPlainArray($line))
|
||||
return $this->returnPlainArray($line);
|
||||
|
||||
|
||||
return $this->returnKeyValuePair($line);
|
||||
|
||||
}
|
||||
@@ -599,6 +618,11 @@ class Spyc {
|
||||
*/
|
||||
private function _toType($value) {
|
||||
if ($value === '') return "";
|
||||
|
||||
if ($this->setting_empty_hash_as_object && $value === '{}') {
|
||||
return new stdClass();
|
||||
}
|
||||
|
||||
$first_character = $value[0];
|
||||
$last_character = substr($value, -1, 1);
|
||||
|
||||
@@ -1101,6 +1125,7 @@ class Spyc {
|
||||
}
|
||||
// Set the type of the value. Int, string, etc
|
||||
$value = $this->_toType($value);
|
||||
|
||||
if ($key === '0') $key = '__!YAMLZero';
|
||||
$array[$key] = $value;
|
||||
} else {
|
||||
|
25
kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php
vendored
Executable file
25
kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php
vendored
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Afrikaans PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: kon nie geverifieer word nie.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon nie aan SMTP-verbind nie.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data nie aanvaar nie.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Boodskapliggaam leeg.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Onbekende kodering: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kon nie uitvoer nie: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Kon nie lêer oopmaak nie: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Lêerfout: Kon nie lêer oopmaak nie: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Die volgende Van adres misluk: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kon nie posfunksie instansieer nie.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Ongeldige adres: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer word nie ondersteun nie.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'U moet ten minste een ontvanger e-pos adres verskaf.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: Die volgende ontvangers het misluk: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Ondertekening Fout: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP-verbinding () misluk.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP-bediener fout: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Kan nie veranderlike instel of herstel nie: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Uitbreiding ontbreek: ';
|
@@ -2,25 +2,27 @@
|
||||
/**
|
||||
* Danish PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Mikael Stokkebro <info@stokkebro.dk>
|
||||
* @author John Sebastian <jms@iwb.dk>
|
||||
* Rewrite and extension of the work by Mikael Stokkebro <info@stokkebro.dk>
|
||||
*
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Login mislykkedes.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Forbindelse til SMTP serveren kunne ikke oprettes.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data blev ikke accepteret.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Meddelelsen er uden indhold';
|
||||
$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kunne ikke afvikle: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Kunne ikke tilgå filen: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.';
|
||||
//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Email funktionen kunne ikke initialiseres.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Udgyldig adresse: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Indtast mindst en modtagers email adresse.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Signeringsfejl: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fejlede.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP server fejl: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Kunne ikke definere eller nulstille variablen: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Udvidelse mangler: ';
|
||||
|
@@ -24,4 +24,4 @@ $PHPMAILER_LANG['signing'] = 'خطا در امضا: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیرها وجود ندارد: ';
|
||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'افزونه موجود نیست: ';
|
||||
|
@@ -16,6 +16,8 @@ $PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen
|
||||
$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: ';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'Ongeldige hostentry: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'Ongeldige host: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: ';
|
||||
|
@@ -26,4 +26,4 @@ $PHPMAILER_LANG['signing'] = 'Erro de Assinatura: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extensão ausente: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extensão não existe: ';
|
||||
|
@@ -7,21 +7,21 @@
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к серверу SMTP.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к SMTP-серверу.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Неизвестный вид кодировки: ';
|
||||
$PHPMAILER_LANG['encoding'] = 'Неизвестная кодировка: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удается открыть файл: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удаётся открыть файл: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail().';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один email-адрес получателя.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: ';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: не удалась отправка таким адресатам: ';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: ';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Не отправлено из-за неправильного формата email-адреса: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Ошибка подписи: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или переустановить переменную: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или сбросить переменную: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Расширение отсутствует: ';
|
||||
|
@@ -7,21 +7,21 @@
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Помилка SMTP: помилка авторизації.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Помилка SMTP: не вдається під\'єднатися до серверу SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Помилка SMTP: дані не прийняті.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Невідомий тип кодування: ';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Помилка SMTP: не вдається під\'єднатися до SMTP-серверу.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Помилка SMTP: дані не прийнято.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Невідоме кодування: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Неможливо виконати команду: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Немає доступу до файлу: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Помилка файлової системи: не вдається відкрити файл: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Невірна адреса відправника: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Будь-ласка, введіть хоча б одну адресу e-mail отримувача.';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail().';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Будь-ласка, введіть хоча б одну email-адресу отримувача.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: відправлення наступним отримувачам не вдалося: ';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Пусте тіло повідомлення';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Не відправлено, невірний формат адреси e-mail: ';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: не вдалося відправлення для таких отримувачів: ';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Пусте повідомлення';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Не відправлено через невірний формат email-адреси: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Помилка підпису: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання із SMTP-сервером';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання з SMTP-сервером';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Неможливо встановити або перевстановити змінну: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Не знайдено розширення: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Неможливо встановити або скинути змінну: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Розширення відсутнє: ';
|
||||
|
@@ -23,7 +23,7 @@ namespace PHPMailer\PHPMailer;
|
||||
/**
|
||||
* PHPMailer exception handler.
|
||||
*
|
||||
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
|
||||
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
|
||||
*/
|
||||
class Exception extends \Exception
|
||||
{
|
||||
|
@@ -123,7 +123,7 @@ class OAuth
|
||||
public function getOauth64()
|
||||
{
|
||||
// Get a new token if it's not available or has expired
|
||||
if (null === $this->oauthToken or $this->oauthToken->hasExpired()) {
|
||||
if (null === $this->oauthToken || $this->oauthToken->hasExpired()) {
|
||||
$this->oauthToken = $this->getToken();
|
||||
}
|
||||
|
||||
|
1368
kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php
vendored
1368
kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php
vendored
File diff suppressed because it is too large
Load Diff
20
kirby/vendor/phpmailer/phpmailer/src/POP3.php
vendored
20
kirby/vendor/phpmailer/phpmailer/src/POP3.php
vendored
@@ -3,13 +3,13 @@
|
||||
* PHPMailer POP-Before-SMTP Authentication Class.
|
||||
* PHP Version 5.5.
|
||||
*
|
||||
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
|
||||
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
|
||||
*
|
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
* @author Brent R. Matzelle (original founder)
|
||||
* @copyright 2012 - 2017 Marcus Bointon
|
||||
* @copyright 2012 - 2019 Marcus Bointon
|
||||
* @copyright 2010 - 2012 Jim Jagielski
|
||||
* @copyright 2004 - 2009 Andy Prevost
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||
@@ -29,14 +29,14 @@ namespace PHPMailer\PHPMailer;
|
||||
* and then loop through your mail sending script. Providing this process doesn't
|
||||
* take longer than the verification period lasts on your POP3 server, you should be fine.
|
||||
* 3) This is really ancient technology; you should only need to use it to talk to very old systems.
|
||||
* 4) This POP3 class is deliberately lightweight and incomplete, and implements just
|
||||
* 4) This POP3 class is deliberately lightweight and incomplete, implementing just
|
||||
* enough to do authentication.
|
||||
* If you want a more complete class there are other POP3 classes for PHP available.
|
||||
*
|
||||
* @author Richard Davey (original author) <rich@corephp.co.uk>
|
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
* @author Richard Davey (original author) <rich@corephp.co.uk>
|
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
*/
|
||||
class POP3
|
||||
{
|
||||
@@ -45,7 +45,7 @@ class POP3
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.0.7';
|
||||
const VERSION = '6.1.6';
|
||||
|
||||
/**
|
||||
* Default POP3 port number.
|
||||
@@ -230,6 +230,8 @@ class POP3
|
||||
}
|
||||
|
||||
// connect to the POP3 server
|
||||
$errno = 0;
|
||||
$errstr = '';
|
||||
$this->pop_conn = fsockopen(
|
||||
$host, // POP3 Host
|
||||
$port, // Port #
|
||||
@@ -364,7 +366,7 @@ class POP3
|
||||
*/
|
||||
protected function checkResponse($string)
|
||||
{
|
||||
if (substr($string, 0, 3) !== '+OK') {
|
||||
if (strpos($string, '+OK') !== 0) {
|
||||
$this->setError("Server reported an error: $string");
|
||||
|
||||
return false;
|
||||
|
139
kirby/vendor/phpmailer/phpmailer/src/SMTP.php
vendored
139
kirby/vendor/phpmailer/phpmailer/src/SMTP.php
vendored
@@ -9,7 +9,7 @@
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
* @author Brent R. Matzelle (original founder)
|
||||
* @copyright 2012 - 2017 Marcus Bointon
|
||||
* @copyright 2012 - 2019 Marcus Bointon
|
||||
* @copyright 2010 - 2012 Jim Jagielski
|
||||
* @copyright 2004 - 2009 Andy Prevost
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||
@@ -24,8 +24,8 @@ namespace PHPMailer\PHPMailer;
|
||||
* PHPMailer RFC821 SMTP email transport class.
|
||||
* Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server.
|
||||
*
|
||||
* @author Chris Ryan
|
||||
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
|
||||
* @author Chris Ryan
|
||||
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
|
||||
*/
|
||||
class SMTP
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class SMTP
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.0.7';
|
||||
const VERSION = '6.1.6';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
@@ -51,34 +51,57 @@ class SMTP
|
||||
const DEFAULT_PORT = 25;
|
||||
|
||||
/**
|
||||
* The maximum line length allowed by RFC 2822 section 2.1.1.
|
||||
* The maximum line length allowed by RFC 5321 section 4.5.3.1.6,
|
||||
* *excluding* a trailing CRLF break.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/rfc5321#section-4.5.3.1.6
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const MAX_LINE_LENGTH = 998;
|
||||
|
||||
/**
|
||||
* The maximum line length allowed for replies in RFC 5321 section 4.5.3.1.5,
|
||||
* *including* a trailing CRLF line break.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/rfc5321#section-4.5.3.1.5
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const MAX_REPLY_LENGTH = 512;
|
||||
|
||||
/**
|
||||
* Debug level for no output.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const DEBUG_OFF = 0;
|
||||
|
||||
/**
|
||||
* Debug level to show client -> server messages.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const DEBUG_CLIENT = 1;
|
||||
|
||||
/**
|
||||
* Debug level to show client -> server and server -> client messages.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const DEBUG_SERVER = 2;
|
||||
|
||||
/**
|
||||
* Debug level to show connection status, client -> server and server -> client messages.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const DEBUG_CONNECTION = 3;
|
||||
|
||||
/**
|
||||
* Debug level to show all messages.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const DEBUG_LOWLEVEL = 4;
|
||||
|
||||
@@ -197,7 +220,7 @@ class SMTP
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
protected $helo_rply = null;
|
||||
protected $helo_rply;
|
||||
|
||||
/**
|
||||
* The set of SMTP extensions sent in reply to EHLO command.
|
||||
@@ -209,7 +232,7 @@ class SMTP
|
||||
*
|
||||
* @var array|null
|
||||
*/
|
||||
protected $server_caps = null;
|
||||
protected $server_caps;
|
||||
|
||||
/**
|
||||
* The most recent reply received from the server.
|
||||
@@ -239,7 +262,7 @@ class SMTP
|
||||
return;
|
||||
}
|
||||
//Avoid clash with built-in function names
|
||||
if (!in_array($this->Debugoutput, ['error_log', 'html', 'echo']) and is_callable($this->Debugoutput)) {
|
||||
if (is_callable($this->Debugoutput) && !in_array($this->Debugoutput, ['error_log', 'html', 'echo'])) {
|
||||
call_user_func($this->Debugoutput, $str, $level);
|
||||
|
||||
return;
|
||||
@@ -260,12 +283,12 @@ class SMTP
|
||||
case 'echo':
|
||||
default:
|
||||
//Normalize line breaks
|
||||
$str = preg_replace('/\r\n|\r/ms', "\n", $str);
|
||||
$str = preg_replace('/\r\n|\r/m', "\n", $str);
|
||||
echo gmdate('Y-m-d H:i:s'),
|
||||
"\t",
|
||||
//Trim trailing space
|
||||
trim(
|
||||
//Indent for readability, except for trailing break
|
||||
//Indent for readability, except for trailing break
|
||||
str_replace(
|
||||
"\n",
|
||||
"\n \t ",
|
||||
@@ -348,7 +371,7 @@ class SMTP
|
||||
'Failed to connect to server',
|
||||
'',
|
||||
(string) $errno,
|
||||
(string) $errstr
|
||||
$errstr
|
||||
);
|
||||
$this->edebug(
|
||||
'SMTP ERROR: ' . $this->error['error']
|
||||
@@ -361,10 +384,10 @@ class SMTP
|
||||
$this->edebug('Connection: opened', self::DEBUG_CONNECTION);
|
||||
// SMTP server can take longer to respond, give longer timeout for first read
|
||||
// Windows does not have support for this timeout function
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN') {
|
||||
$max = ini_get('max_execution_time');
|
||||
if (strpos(PHP_OS, 'WIN') !== 0) {
|
||||
$max = (int) ini_get('max_execution_time');
|
||||
// Don't bother if unlimited
|
||||
if (0 != $max and $timeout > $max) {
|
||||
if (0 !== $max && $timeout > $max) {
|
||||
@set_time_limit($timeout);
|
||||
}
|
||||
stream_set_timeout($this->smtp_conn, $timeout, 0);
|
||||
@@ -444,14 +467,14 @@ class SMTP
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNSPECIFIED'), self::DEBUG_LOWLEVEL);
|
||||
$this->edebug('Auth method requested: ' . ($authtype ?: 'UNSPECIFIED'), self::DEBUG_LOWLEVEL);
|
||||
$this->edebug(
|
||||
'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']),
|
||||
self::DEBUG_LOWLEVEL
|
||||
);
|
||||
|
||||
//If we have requested a specific auth type, check the server supports it before trying others
|
||||
if (null !== $authtype and !in_array($authtype, $this->server_caps['AUTH'])) {
|
||||
if (null !== $authtype && !in_array($authtype, $this->server_caps['AUTH'], true)) {
|
||||
$this->edebug('Requested auth method not available: ' . $authtype, self::DEBUG_LOWLEVEL);
|
||||
$authtype = null;
|
||||
}
|
||||
@@ -460,7 +483,7 @@ class SMTP
|
||||
//If no auth mechanism is specified, attempt to use these, in this order
|
||||
//Try CRAM-MD5 first as it's more secure than the others
|
||||
foreach (['CRAM-MD5', 'LOGIN', 'PLAIN', 'XOAUTH2'] as $method) {
|
||||
if (in_array($method, $this->server_caps['AUTH'])) {
|
||||
if (in_array($method, $this->server_caps['AUTH'], true)) {
|
||||
$authtype = $method;
|
||||
break;
|
||||
}
|
||||
@@ -470,10 +493,10 @@ class SMTP
|
||||
|
||||
return false;
|
||||
}
|
||||
self::edebug('Auth method selected: ' . $authtype, self::DEBUG_LOWLEVEL);
|
||||
$this->edebug('Auth method selected: ' . $authtype, self::DEBUG_LOWLEVEL);
|
||||
}
|
||||
|
||||
if (!in_array($authtype, $this->server_caps['AUTH'])) {
|
||||
if (!in_array($authtype, $this->server_caps['AUTH'], true)) {
|
||||
$this->setError("The requested authentication method \"$authtype\" is not supported by the server");
|
||||
|
||||
return false;
|
||||
@@ -663,13 +686,13 @@ class SMTP
|
||||
|
||||
$field = substr($lines[0], 0, strpos($lines[0], ':'));
|
||||
$in_headers = false;
|
||||
if (!empty($field) and strpos($field, ' ') === false) {
|
||||
if (!empty($field) && strpos($field, ' ') === false) {
|
||||
$in_headers = true;
|
||||
}
|
||||
|
||||
foreach ($lines as $line) {
|
||||
$lines_out = [];
|
||||
if ($in_headers and $line == '') {
|
||||
if ($in_headers && $line === '') {
|
||||
$in_headers = false;
|
||||
}
|
||||
//Break this line up into several smaller lines if it's too long
|
||||
@@ -700,7 +723,7 @@ class SMTP
|
||||
//Send the lines to the server
|
||||
foreach ($lines_out as $line_out) {
|
||||
//RFC2821 section 4.5.2
|
||||
if (!empty($line_out) and $line_out[0] == '.') {
|
||||
if (!empty($line_out) && $line_out[0] === '.') {
|
||||
$line_out = '.' . $line_out;
|
||||
}
|
||||
$this->client_send($line_out . static::LE, 'DATA');
|
||||
@@ -710,7 +733,7 @@ class SMTP
|
||||
//Message data has been sent, complete the command
|
||||
//Increase timelimit for end of DATA command
|
||||
$savetimelimit = $this->Timelimit;
|
||||
$this->Timelimit = $this->Timelimit * 2;
|
||||
$this->Timelimit *= 2;
|
||||
$result = $this->sendCommand('DATA END', '.', 250);
|
||||
$this->recordLastTransactionID();
|
||||
//Restore timelimit
|
||||
@@ -745,7 +768,7 @@ class SMTP
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @see hello()
|
||||
* @see hello()
|
||||
*/
|
||||
protected function sendHello($hello, $host)
|
||||
{
|
||||
@@ -838,7 +861,7 @@ class SMTP
|
||||
{
|
||||
$noerror = $this->sendCommand('QUIT', 'QUIT', 221);
|
||||
$err = $this->error; //Save any error
|
||||
if ($noerror or $close_on_error) {
|
||||
if ($noerror || $close_on_error) {
|
||||
$this->close();
|
||||
$this->error = $err; //Restore any error from the quit command
|
||||
}
|
||||
@@ -853,14 +876,35 @@ class SMTP
|
||||
* Implements from RFC 821: RCPT <SP> TO:<forward-path> <CRLF>.
|
||||
*
|
||||
* @param string $address The address the message is being sent to
|
||||
* @param string $dsn Comma separated list of DSN notifications. NEVER, SUCCESS, FAILURE
|
||||
* or DELAY. If you specify NEVER all other notifications are ignored.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function recipient($address)
|
||||
public function recipient($address, $dsn = '')
|
||||
{
|
||||
if (empty($dsn)) {
|
||||
$rcpt = 'RCPT TO:<' . $address . '>';
|
||||
} else {
|
||||
$dsn = strtoupper($dsn);
|
||||
$notify = [];
|
||||
|
||||
if (strpos($dsn, 'NEVER') !== false) {
|
||||
$notify[] = 'NEVER';
|
||||
} else {
|
||||
foreach (['SUCCESS', 'FAILURE', 'DELAY'] as $value) {
|
||||
if (strpos($dsn, $value) !== false) {
|
||||
$notify[] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$rcpt = 'RCPT TO:<' . $address . '> NOTIFY=' . implode(',', $notify);
|
||||
}
|
||||
|
||||
return $this->sendCommand(
|
||||
'RCPT TO',
|
||||
'RCPT TO:<' . $address . '>',
|
||||
$rcpt,
|
||||
[250, 251]
|
||||
);
|
||||
}
|
||||
@@ -894,7 +938,7 @@ class SMTP
|
||||
return false;
|
||||
}
|
||||
//Reject line breaks in all commands
|
||||
if (strpos($commandstring, "\n") !== false or strpos($commandstring, "\r") !== false) {
|
||||
if ((strpos($commandstring, "\n") !== false) || (strpos($commandstring, "\r") !== false)) {
|
||||
$this->setError("Command '$command' contained line breaks");
|
||||
|
||||
return false;
|
||||
@@ -904,8 +948,8 @@ class SMTP
|
||||
$this->last_reply = $this->get_lines();
|
||||
// Fetch SMTP code and possible error code explanation
|
||||
$matches = [];
|
||||
if (preg_match('/^([0-9]{3})[ -](?:([0-9]\\.[0-9]\\.[0-9]) )?/', $this->last_reply, $matches)) {
|
||||
$code = $matches[1];
|
||||
if (preg_match('/^([\d]{3})[ -](?:([\d]\\.[\d]\\.[\d]{1,2}) )?/', $this->last_reply, $matches)) {
|
||||
$code = (int) $matches[1];
|
||||
$code_ex = (count($matches) > 2 ? $matches[2] : null);
|
||||
// Cut off error code from each response line
|
||||
$detail = preg_replace(
|
||||
@@ -916,14 +960,14 @@ class SMTP
|
||||
);
|
||||
} else {
|
||||
// Fall back to simple parsing if regex fails
|
||||
$code = substr($this->last_reply, 0, 3);
|
||||
$code = (int) substr($this->last_reply, 0, 3);
|
||||
$code_ex = null;
|
||||
$detail = substr($this->last_reply, 4);
|
||||
}
|
||||
|
||||
$this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);
|
||||
|
||||
if (!in_array($code, (array) $expect)) {
|
||||
if (!in_array($code, (array) $expect, true)) {
|
||||
$this->setError(
|
||||
"$command command failed",
|
||||
$detail,
|
||||
@@ -1014,9 +1058,9 @@ class SMTP
|
||||
{
|
||||
//If SMTP transcripts are left enabled, or debug output is posted online
|
||||
//it can leak credentials, so hide credentials in all but lowest level
|
||||
if (self::DEBUG_LOWLEVEL > $this->do_debug and
|
||||
if (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 {
|
||||
$this->edebug('CLIENT -> SERVER: ' . $data, self::DEBUG_CLIENT);
|
||||
}
|
||||
@@ -1062,7 +1106,7 @@ class SMTP
|
||||
*
|
||||
* @param string $name Name of SMTP extension or 'HELO'|'EHLO'
|
||||
*
|
||||
* @return mixed
|
||||
* @return string|bool|null
|
||||
*/
|
||||
public function getServerExt($name)
|
||||
{
|
||||
@@ -1073,10 +1117,10 @@ class SMTP
|
||||
}
|
||||
|
||||
if (!array_key_exists($name, $this->server_caps)) {
|
||||
if ('HELO' == $name) {
|
||||
if ('HELO' === $name) {
|
||||
return $this->server_caps['EHLO'];
|
||||
}
|
||||
if ('EHLO' == $name || array_key_exists('EHLO', $this->server_caps)) {
|
||||
if ('EHLO' === $name || array_key_exists('EHLO', $this->server_caps)) {
|
||||
return false;
|
||||
}
|
||||
$this->setError('HELO handshake was used; No information about server extensions available');
|
||||
@@ -1120,36 +1164,36 @@ class SMTP
|
||||
}
|
||||
$selR = [$this->smtp_conn];
|
||||
$selW = null;
|
||||
while (is_resource($this->smtp_conn) and !feof($this->smtp_conn)) {
|
||||
while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) {
|
||||
//Must pass vars in here as params are by reference
|
||||
if (!stream_select($selR, $selW, $selW, $this->Timelimit)) {
|
||||
$this->edebug(
|
||||
'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)',
|
||||
'SMTP -> get_lines(): select timed-out in (' . $this->Timelimit . ' sec)',
|
||||
self::DEBUG_LOWLEVEL
|
||||
);
|
||||
break;
|
||||
}
|
||||
//Deliberate noise suppression - errors are handled afterwards
|
||||
$str = @fgets($this->smtp_conn, 515);
|
||||
$str = @fgets($this->smtp_conn, self::MAX_REPLY_LENGTH);
|
||||
$this->edebug('SMTP INBOUND: "' . trim($str) . '"', self::DEBUG_LOWLEVEL);
|
||||
$data .= $str;
|
||||
// If response is only 3 chars (not valid, but RFC5321 S4.2 says it must be handled),
|
||||
// or 4th character is a space, we are done reading, break the loop,
|
||||
// string array access is a micro-optimisation over strlen
|
||||
if (!isset($str[3]) or (isset($str[3]) and $str[3] == ' ')) {
|
||||
// or 4th character is a space or a line break char, we are done reading, break the loop.
|
||||
// String array access is a significant micro-optimisation over strlen
|
||||
if (!isset($str[3]) || $str[3] === ' ' || $str[3] === "\r" || $str[3] === "\n") {
|
||||
break;
|
||||
}
|
||||
// Timed-out? Log and break
|
||||
$info = stream_get_meta_data($this->smtp_conn);
|
||||
if ($info['timed_out']) {
|
||||
$this->edebug(
|
||||
'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)',
|
||||
'SMTP -> get_lines(): stream timed-out (' . $this->Timeout . ' sec)',
|
||||
self::DEBUG_LOWLEVEL
|
||||
);
|
||||
break;
|
||||
}
|
||||
// Now check if reads took too long
|
||||
if ($endtime and time() > $endtime) {
|
||||
if ($endtime && time() > $endtime) {
|
||||
$this->edebug(
|
||||
'SMTP -> get_lines(): timelimit reached (' .
|
||||
$this->Timelimit . ' sec)',
|
||||
@@ -1289,7 +1333,7 @@ class SMTP
|
||||
* If no reply has been received yet, it will return null.
|
||||
* If no pattern was matched, it will return false.
|
||||
*
|
||||
* @return bool|null|string
|
||||
* @return bool|string|null
|
||||
*/
|
||||
protected function recordLastTransactionID()
|
||||
{
|
||||
@@ -1300,6 +1344,7 @@ class SMTP
|
||||
} else {
|
||||
$this->last_smtp_transaction_id = false;
|
||||
foreach ($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
|
||||
$matches = [];
|
||||
if (preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
|
||||
$this->last_smtp_transaction_id = trim($matches[1]);
|
||||
break;
|
||||
@@ -1315,7 +1360,7 @@ class SMTP
|
||||
* If no reply has been received yet, it will return null.
|
||||
* If no pattern was matched, it will return false.
|
||||
*
|
||||
* @return bool|null|string
|
||||
* @return bool|string|null
|
||||
*
|
||||
* @see recordLastTransactionID()
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
return array (
|
||||
'A' => 'a',
|
||||
'B' => 'b',
|
||||
'C' => 'c',
|
||||
@@ -510,6 +510,138 @@ return array(
|
||||
'Ⴥ' => 'ⴥ',
|
||||
'Ⴧ' => 'ⴧ',
|
||||
'Ⴭ' => 'ⴭ',
|
||||
'Ꭰ' => 'ꭰ',
|
||||
'Ꭱ' => 'ꭱ',
|
||||
'Ꭲ' => 'ꭲ',
|
||||
'Ꭳ' => 'ꭳ',
|
||||
'Ꭴ' => 'ꭴ',
|
||||
'Ꭵ' => 'ꭵ',
|
||||
'Ꭶ' => 'ꭶ',
|
||||
'Ꭷ' => 'ꭷ',
|
||||
'Ꭸ' => 'ꭸ',
|
||||
'Ꭹ' => 'ꭹ',
|
||||
'Ꭺ' => 'ꭺ',
|
||||
'Ꭻ' => 'ꭻ',
|
||||
'Ꭼ' => 'ꭼ',
|
||||
'Ꭽ' => 'ꭽ',
|
||||
'Ꭾ' => 'ꭾ',
|
||||
'Ꭿ' => 'ꭿ',
|
||||
'Ꮀ' => 'ꮀ',
|
||||
'Ꮁ' => 'ꮁ',
|
||||
'Ꮂ' => 'ꮂ',
|
||||
'Ꮃ' => 'ꮃ',
|
||||
'Ꮄ' => 'ꮄ',
|
||||
'Ꮅ' => 'ꮅ',
|
||||
'Ꮆ' => 'ꮆ',
|
||||
'Ꮇ' => 'ꮇ',
|
||||
'Ꮈ' => 'ꮈ',
|
||||
'Ꮉ' => 'ꮉ',
|
||||
'Ꮊ' => 'ꮊ',
|
||||
'Ꮋ' => 'ꮋ',
|
||||
'Ꮌ' => 'ꮌ',
|
||||
'Ꮍ' => 'ꮍ',
|
||||
'Ꮎ' => 'ꮎ',
|
||||
'Ꮏ' => 'ꮏ',
|
||||
'Ꮐ' => 'ꮐ',
|
||||
'Ꮑ' => 'ꮑ',
|
||||
'Ꮒ' => 'ꮒ',
|
||||
'Ꮓ' => 'ꮓ',
|
||||
'Ꮔ' => 'ꮔ',
|
||||
'Ꮕ' => 'ꮕ',
|
||||
'Ꮖ' => 'ꮖ',
|
||||
'Ꮗ' => 'ꮗ',
|
||||
'Ꮘ' => 'ꮘ',
|
||||
'Ꮙ' => 'ꮙ',
|
||||
'Ꮚ' => 'ꮚ',
|
||||
'Ꮛ' => 'ꮛ',
|
||||
'Ꮜ' => 'ꮜ',
|
||||
'Ꮝ' => 'ꮝ',
|
||||
'Ꮞ' => 'ꮞ',
|
||||
'Ꮟ' => 'ꮟ',
|
||||
'Ꮠ' => 'ꮠ',
|
||||
'Ꮡ' => 'ꮡ',
|
||||
'Ꮢ' => 'ꮢ',
|
||||
'Ꮣ' => 'ꮣ',
|
||||
'Ꮤ' => 'ꮤ',
|
||||
'Ꮥ' => 'ꮥ',
|
||||
'Ꮦ' => 'ꮦ',
|
||||
'Ꮧ' => 'ꮧ',
|
||||
'Ꮨ' => 'ꮨ',
|
||||
'Ꮩ' => 'ꮩ',
|
||||
'Ꮪ' => 'ꮪ',
|
||||
'Ꮫ' => 'ꮫ',
|
||||
'Ꮬ' => 'ꮬ',
|
||||
'Ꮭ' => 'ꮭ',
|
||||
'Ꮮ' => 'ꮮ',
|
||||
'Ꮯ' => 'ꮯ',
|
||||
'Ꮰ' => 'ꮰ',
|
||||
'Ꮱ' => 'ꮱ',
|
||||
'Ꮲ' => 'ꮲ',
|
||||
'Ꮳ' => 'ꮳ',
|
||||
'Ꮴ' => 'ꮴ',
|
||||
'Ꮵ' => 'ꮵ',
|
||||
'Ꮶ' => 'ꮶ',
|
||||
'Ꮷ' => 'ꮷ',
|
||||
'Ꮸ' => 'ꮸ',
|
||||
'Ꮹ' => 'ꮹ',
|
||||
'Ꮺ' => 'ꮺ',
|
||||
'Ꮻ' => 'ꮻ',
|
||||
'Ꮼ' => 'ꮼ',
|
||||
'Ꮽ' => 'ꮽ',
|
||||
'Ꮾ' => 'ꮾ',
|
||||
'Ꮿ' => 'ꮿ',
|
||||
'Ᏸ' => 'ᏸ',
|
||||
'Ᏹ' => 'ᏹ',
|
||||
'Ᏺ' => 'ᏺ',
|
||||
'Ᏻ' => 'ᏻ',
|
||||
'Ᏼ' => 'ᏼ',
|
||||
'Ᏽ' => 'ᏽ',
|
||||
'Ა' => 'ა',
|
||||
'Ბ' => 'ბ',
|
||||
'Გ' => 'გ',
|
||||
'Დ' => 'დ',
|
||||
'Ე' => 'ე',
|
||||
'Ვ' => 'ვ',
|
||||
'Ზ' => 'ზ',
|
||||
'Თ' => 'თ',
|
||||
'Ი' => 'ი',
|
||||
'Კ' => 'კ',
|
||||
'Ლ' => 'ლ',
|
||||
'Მ' => 'მ',
|
||||
'Ნ' => 'ნ',
|
||||
'Ო' => 'ო',
|
||||
'Პ' => 'პ',
|
||||
'Ჟ' => 'ჟ',
|
||||
'Რ' => 'რ',
|
||||
'Ს' => 'ს',
|
||||
'Ტ' => 'ტ',
|
||||
'Უ' => 'უ',
|
||||
'Ფ' => 'ფ',
|
||||
'Ქ' => 'ქ',
|
||||
'Ღ' => 'ღ',
|
||||
'Ყ' => 'ყ',
|
||||
'Შ' => 'შ',
|
||||
'Ჩ' => 'ჩ',
|
||||
'Ც' => 'ც',
|
||||
'Ძ' => 'ძ',
|
||||
'Წ' => 'წ',
|
||||
'Ჭ' => 'ჭ',
|
||||
'Ხ' => 'ხ',
|
||||
'Ჯ' => 'ჯ',
|
||||
'Ჰ' => 'ჰ',
|
||||
'Ჱ' => 'ჱ',
|
||||
'Ჲ' => 'ჲ',
|
||||
'Ჳ' => 'ჳ',
|
||||
'Ჴ' => 'ჴ',
|
||||
'Ჵ' => 'ჵ',
|
||||
'Ჶ' => 'ჶ',
|
||||
'Ჷ' => 'ჷ',
|
||||
'Ჸ' => 'ჸ',
|
||||
'Ჹ' => 'ჹ',
|
||||
'Ჺ' => 'ჺ',
|
||||
'Ჽ' => 'ჽ',
|
||||
'Ჾ' => 'ჾ',
|
||||
'Ჿ' => 'ჿ',
|
||||
'Ḁ' => 'ḁ',
|
||||
'Ḃ' => 'ḃ',
|
||||
'Ḅ' => 'ḅ',
|
||||
@@ -993,8 +1125,24 @@ return array(
|
||||
'Ɜ' => 'ɜ',
|
||||
'Ɡ' => 'ɡ',
|
||||
'Ɬ' => 'ɬ',
|
||||
'Ɪ' => 'ɪ',
|
||||
'Ʞ' => 'ʞ',
|
||||
'Ʇ' => 'ʇ',
|
||||
'Ʝ' => 'ʝ',
|
||||
'Ꭓ' => 'ꭓ',
|
||||
'Ꞵ' => 'ꞵ',
|
||||
'Ꞷ' => 'ꞷ',
|
||||
'Ꞹ' => 'ꞹ',
|
||||
'Ꞻ' => 'ꞻ',
|
||||
'Ꞽ' => 'ꞽ',
|
||||
'Ꞿ' => 'ꞿ',
|
||||
'Ꟃ' => 'ꟃ',
|
||||
'Ꞔ' => 'ꞔ',
|
||||
'Ʂ' => 'ʂ',
|
||||
'Ᶎ' => 'ᶎ',
|
||||
'Ꟈ' => 'ꟈ',
|
||||
'Ꟊ' => 'ꟊ',
|
||||
'Ꟶ' => 'ꟶ',
|
||||
'A' => 'a',
|
||||
'B' => 'b',
|
||||
'C' => 'c',
|
||||
@@ -1061,6 +1209,93 @@ return array(
|
||||
'𐐥' => '𐑍',
|
||||
'𐐦' => '𐑎',
|
||||
'𐐧' => '𐑏',
|
||||
'𐒰' => '𐓘',
|
||||
'𐒱' => '𐓙',
|
||||
'𐒲' => '𐓚',
|
||||
'𐒳' => '𐓛',
|
||||
'𐒴' => '𐓜',
|
||||
'𐒵' => '𐓝',
|
||||
'𐒶' => '𐓞',
|
||||
'𐒷' => '𐓟',
|
||||
'𐒸' => '𐓠',
|
||||
'𐒹' => '𐓡',
|
||||
'𐒺' => '𐓢',
|
||||
'𐒻' => '𐓣',
|
||||
'𐒼' => '𐓤',
|
||||
'𐒽' => '𐓥',
|
||||
'𐒾' => '𐓦',
|
||||
'𐒿' => '𐓧',
|
||||
'𐓀' => '𐓨',
|
||||
'𐓁' => '𐓩',
|
||||
'𐓂' => '𐓪',
|
||||
'𐓃' => '𐓫',
|
||||
'𐓄' => '𐓬',
|
||||
'𐓅' => '𐓭',
|
||||
'𐓆' => '𐓮',
|
||||
'𐓇' => '𐓯',
|
||||
'𐓈' => '𐓰',
|
||||
'𐓉' => '𐓱',
|
||||
'𐓊' => '𐓲',
|
||||
'𐓋' => '𐓳',
|
||||
'𐓌' => '𐓴',
|
||||
'𐓍' => '𐓵',
|
||||
'𐓎' => '𐓶',
|
||||
'𐓏' => '𐓷',
|
||||
'𐓐' => '𐓸',
|
||||
'𐓑' => '𐓹',
|
||||
'𐓒' => '𐓺',
|
||||
'𐓓' => '𐓻',
|
||||
'𐲀' => '𐳀',
|
||||
'𐲁' => '𐳁',
|
||||
'𐲂' => '𐳂',
|
||||
'𐲃' => '𐳃',
|
||||
'𐲄' => '𐳄',
|
||||
'𐲅' => '𐳅',
|
||||
'𐲆' => '𐳆',
|
||||
'𐲇' => '𐳇',
|
||||
'𐲈' => '𐳈',
|
||||
'𐲉' => '𐳉',
|
||||
'𐲊' => '𐳊',
|
||||
'𐲋' => '𐳋',
|
||||
'𐲌' => '𐳌',
|
||||
'𐲍' => '𐳍',
|
||||
'𐲎' => '𐳎',
|
||||
'𐲏' => '𐳏',
|
||||
'𐲐' => '𐳐',
|
||||
'𐲑' => '𐳑',
|
||||
'𐲒' => '𐳒',
|
||||
'𐲓' => '𐳓',
|
||||
'𐲔' => '𐳔',
|
||||
'𐲕' => '𐳕',
|
||||
'𐲖' => '𐳖',
|
||||
'𐲗' => '𐳗',
|
||||
'𐲘' => '𐳘',
|
||||
'𐲙' => '𐳙',
|
||||
'𐲚' => '𐳚',
|
||||
'𐲛' => '𐳛',
|
||||
'𐲜' => '𐳜',
|
||||
'𐲝' => '𐳝',
|
||||
'𐲞' => '𐳞',
|
||||
'𐲟' => '𐳟',
|
||||
'𐲠' => '𐳠',
|
||||
'𐲡' => '𐳡',
|
||||
'𐲢' => '𐳢',
|
||||
'𐲣' => '𐳣',
|
||||
'𐲤' => '𐳤',
|
||||
'𐲥' => '𐳥',
|
||||
'𐲦' => '𐳦',
|
||||
'𐲧' => '𐳧',
|
||||
'𐲨' => '𐳨',
|
||||
'𐲩' => '𐳩',
|
||||
'𐲪' => '𐳪',
|
||||
'𐲫' => '𐳫',
|
||||
'𐲬' => '𐳬',
|
||||
'𐲭' => '𐳭',
|
||||
'𐲮' => '𐳮',
|
||||
'𐲯' => '𐳯',
|
||||
'𐲰' => '𐳰',
|
||||
'𐲱' => '𐳱',
|
||||
'𐲲' => '𐳲',
|
||||
'𑢠' => '𑣀',
|
||||
'𑢡' => '𑣁',
|
||||
'𑢢' => '𑣂',
|
||||
@@ -1093,4 +1328,70 @@ return array(
|
||||
'𑢽' => '𑣝',
|
||||
'𑢾' => '𑣞',
|
||||
'𑢿' => '𑣟',
|
||||
'𖹀' => '𖹠',
|
||||
'𖹁' => '𖹡',
|
||||
'𖹂' => '𖹢',
|
||||
'𖹃' => '𖹣',
|
||||
'𖹄' => '𖹤',
|
||||
'𖹅' => '𖹥',
|
||||
'𖹆' => '𖹦',
|
||||
'𖹇' => '𖹧',
|
||||
'𖹈' => '𖹨',
|
||||
'𖹉' => '𖹩',
|
||||
'𖹊' => '𖹪',
|
||||
'𖹋' => '𖹫',
|
||||
'𖹌' => '𖹬',
|
||||
'𖹍' => '𖹭',
|
||||
'𖹎' => '𖹮',
|
||||
'𖹏' => '𖹯',
|
||||
'𖹐' => '𖹰',
|
||||
'𖹑' => '𖹱',
|
||||
'𖹒' => '𖹲',
|
||||
'𖹓' => '𖹳',
|
||||
'𖹔' => '𖹴',
|
||||
'𖹕' => '𖹵',
|
||||
'𖹖' => '𖹶',
|
||||
'𖹗' => '𖹷',
|
||||
'𖹘' => '𖹸',
|
||||
'𖹙' => '𖹹',
|
||||
'𖹚' => '𖹺',
|
||||
'𖹛' => '𖹻',
|
||||
'𖹜' => '𖹼',
|
||||
'𖹝' => '𖹽',
|
||||
'𖹞' => '𖹾',
|
||||
'𖹟' => '𖹿',
|
||||
'𞤀' => '𞤢',
|
||||
'𞤁' => '𞤣',
|
||||
'𞤂' => '𞤤',
|
||||
'𞤃' => '𞤥',
|
||||
'𞤄' => '𞤦',
|
||||
'𞤅' => '𞤧',
|
||||
'𞤆' => '𞤨',
|
||||
'𞤇' => '𞤩',
|
||||
'𞤈' => '𞤪',
|
||||
'𞤉' => '𞤫',
|
||||
'𞤊' => '𞤬',
|
||||
'𞤋' => '𞤭',
|
||||
'𞤌' => '𞤮',
|
||||
'𞤍' => '𞤯',
|
||||
'𞤎' => '𞤰',
|
||||
'𞤏' => '𞤱',
|
||||
'𞤐' => '𞤲',
|
||||
'𞤑' => '𞤳',
|
||||
'𞤒' => '𞤴',
|
||||
'𞤓' => '𞤵',
|
||||
'𞤔' => '𞤶',
|
||||
'𞤕' => '𞤷',
|
||||
'𞤖' => '𞤸',
|
||||
'𞤗' => '𞤹',
|
||||
'𞤘' => '𞤺',
|
||||
'𞤙' => '𞤻',
|
||||
'𞤚' => '𞤼',
|
||||
'𞤛' => '𞤽',
|
||||
'𞤜' => '𞤾',
|
||||
'𞤝' => '𞤿',
|
||||
'𞤞' => '𞥀',
|
||||
'𞤟' => '𞥁',
|
||||
'𞤠' => '𞥂',
|
||||
'𞤡' => '𞥃',
|
||||
);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
return array (
|
||||
'a' => 'A',
|
||||
'b' => 'B',
|
||||
'c' => 'C',
|
||||
@@ -225,6 +225,7 @@ return array(
|
||||
'ɦ' => 'Ɦ',
|
||||
'ɨ' => 'Ɨ',
|
||||
'ɩ' => 'Ɩ',
|
||||
'ɪ' => 'Ɪ',
|
||||
'ɫ' => 'Ɫ',
|
||||
'ɬ' => 'Ɬ',
|
||||
'ɯ' => 'Ɯ',
|
||||
@@ -233,6 +234,7 @@ return array(
|
||||
'ɵ' => 'Ɵ',
|
||||
'ɽ' => 'Ɽ',
|
||||
'ʀ' => 'Ʀ',
|
||||
'ʂ' => 'Ʂ',
|
||||
'ʃ' => 'Ʃ',
|
||||
'ʇ' => 'Ʇ',
|
||||
'ʈ' => 'Ʈ',
|
||||
@@ -241,6 +243,7 @@ return array(
|
||||
'ʋ' => 'Ʋ',
|
||||
'ʌ' => 'Ʌ',
|
||||
'ʒ' => 'Ʒ',
|
||||
'ʝ' => 'Ʝ',
|
||||
'ʞ' => 'Ʞ',
|
||||
'ͅ' => 'Ι',
|
||||
'ͱ' => 'Ͱ',
|
||||
@@ -493,8 +496,70 @@ return array(
|
||||
'ք' => 'Ք',
|
||||
'օ' => 'Օ',
|
||||
'ֆ' => 'Ֆ',
|
||||
'ა' => 'Ა',
|
||||
'ბ' => 'Ბ',
|
||||
'გ' => 'Გ',
|
||||
'დ' => 'Დ',
|
||||
'ე' => 'Ე',
|
||||
'ვ' => 'Ვ',
|
||||
'ზ' => 'Ზ',
|
||||
'თ' => 'Თ',
|
||||
'ი' => 'Ი',
|
||||
'კ' => 'Კ',
|
||||
'ლ' => 'Ლ',
|
||||
'მ' => 'Მ',
|
||||
'ნ' => 'Ნ',
|
||||
'ო' => 'Ო',
|
||||
'პ' => 'Პ',
|
||||
'ჟ' => 'Ჟ',
|
||||
'რ' => 'Რ',
|
||||
'ს' => 'Ს',
|
||||
'ტ' => 'Ტ',
|
||||
'უ' => 'Უ',
|
||||
'ფ' => 'Ფ',
|
||||
'ქ' => 'Ქ',
|
||||
'ღ' => 'Ღ',
|
||||
'ყ' => 'Ყ',
|
||||
'შ' => 'Შ',
|
||||
'ჩ' => 'Ჩ',
|
||||
'ც' => 'Ც',
|
||||
'ძ' => 'Ძ',
|
||||
'წ' => 'Წ',
|
||||
'ჭ' => 'Ჭ',
|
||||
'ხ' => 'Ხ',
|
||||
'ჯ' => 'Ჯ',
|
||||
'ჰ' => 'Ჰ',
|
||||
'ჱ' => 'Ჱ',
|
||||
'ჲ' => 'Ჲ',
|
||||
'ჳ' => 'Ჳ',
|
||||
'ჴ' => 'Ჴ',
|
||||
'ჵ' => 'Ჵ',
|
||||
'ჶ' => 'Ჶ',
|
||||
'ჷ' => 'Ჷ',
|
||||
'ჸ' => 'Ჸ',
|
||||
'ჹ' => 'Ჹ',
|
||||
'ჺ' => 'Ჺ',
|
||||
'ჽ' => 'Ჽ',
|
||||
'ჾ' => 'Ჾ',
|
||||
'ჿ' => 'Ჿ',
|
||||
'ᏸ' => 'Ᏸ',
|
||||
'ᏹ' => 'Ᏹ',
|
||||
'ᏺ' => 'Ᏺ',
|
||||
'ᏻ' => 'Ᏻ',
|
||||
'ᏼ' => 'Ᏼ',
|
||||
'ᏽ' => 'Ᏽ',
|
||||
'ᲀ' => 'В',
|
||||
'ᲁ' => 'Д',
|
||||
'ᲂ' => 'О',
|
||||
'ᲃ' => 'С',
|
||||
'ᲄ' => 'Т',
|
||||
'ᲅ' => 'Т',
|
||||
'ᲆ' => 'Ъ',
|
||||
'ᲇ' => 'Ѣ',
|
||||
'ᲈ' => 'Ꙋ',
|
||||
'ᵹ' => 'Ᵹ',
|
||||
'ᵽ' => 'Ᵽ',
|
||||
'ᶎ' => 'Ᶎ',
|
||||
'ḁ' => 'Ḁ',
|
||||
'ḃ' => 'Ḃ',
|
||||
'ḅ' => 'Ḅ',
|
||||
@@ -993,6 +1058,7 @@ return array(
|
||||
'ꞌ' => 'Ꞌ',
|
||||
'ꞑ' => 'Ꞑ',
|
||||
'ꞓ' => 'Ꞓ',
|
||||
'ꞔ' => 'Ꞔ',
|
||||
'ꞗ' => 'Ꞗ',
|
||||
'ꞙ' => 'Ꞙ',
|
||||
'ꞛ' => 'Ꞛ',
|
||||
@@ -1003,6 +1069,97 @@ return array(
|
||||
'ꞥ' => 'Ꞥ',
|
||||
'ꞧ' => 'Ꞧ',
|
||||
'ꞩ' => 'Ꞩ',
|
||||
'ꞵ' => 'Ꞵ',
|
||||
'ꞷ' => 'Ꞷ',
|
||||
'ꞹ' => 'Ꞹ',
|
||||
'ꞻ' => 'Ꞻ',
|
||||
'ꞽ' => 'Ꞽ',
|
||||
'ꞿ' => 'Ꞿ',
|
||||
'ꟃ' => 'Ꟃ',
|
||||
'ꟈ' => 'Ꟈ',
|
||||
'ꟊ' => 'Ꟊ',
|
||||
'ꟶ' => 'Ꟶ',
|
||||
'ꭓ' => 'Ꭓ',
|
||||
'ꭰ' => 'Ꭰ',
|
||||
'ꭱ' => 'Ꭱ',
|
||||
'ꭲ' => 'Ꭲ',
|
||||
'ꭳ' => 'Ꭳ',
|
||||
'ꭴ' => 'Ꭴ',
|
||||
'ꭵ' => 'Ꭵ',
|
||||
'ꭶ' => 'Ꭶ',
|
||||
'ꭷ' => 'Ꭷ',
|
||||
'ꭸ' => 'Ꭸ',
|
||||
'ꭹ' => 'Ꭹ',
|
||||
'ꭺ' => 'Ꭺ',
|
||||
'ꭻ' => 'Ꭻ',
|
||||
'ꭼ' => 'Ꭼ',
|
||||
'ꭽ' => 'Ꭽ',
|
||||
'ꭾ' => 'Ꭾ',
|
||||
'ꭿ' => 'Ꭿ',
|
||||
'ꮀ' => 'Ꮀ',
|
||||
'ꮁ' => 'Ꮁ',
|
||||
'ꮂ' => 'Ꮂ',
|
||||
'ꮃ' => 'Ꮃ',
|
||||
'ꮄ' => 'Ꮄ',
|
||||
'ꮅ' => 'Ꮅ',
|
||||
'ꮆ' => 'Ꮆ',
|
||||
'ꮇ' => 'Ꮇ',
|
||||
'ꮈ' => 'Ꮈ',
|
||||
'ꮉ' => 'Ꮉ',
|
||||
'ꮊ' => 'Ꮊ',
|
||||
'ꮋ' => 'Ꮋ',
|
||||
'ꮌ' => 'Ꮌ',
|
||||
'ꮍ' => 'Ꮍ',
|
||||
'ꮎ' => 'Ꮎ',
|
||||
'ꮏ' => 'Ꮏ',
|
||||
'ꮐ' => 'Ꮐ',
|
||||
'ꮑ' => 'Ꮑ',
|
||||
'ꮒ' => 'Ꮒ',
|
||||
'ꮓ' => 'Ꮓ',
|
||||
'ꮔ' => 'Ꮔ',
|
||||
'ꮕ' => 'Ꮕ',
|
||||
'ꮖ' => 'Ꮖ',
|
||||
'ꮗ' => 'Ꮗ',
|
||||
'ꮘ' => 'Ꮘ',
|
||||
'ꮙ' => 'Ꮙ',
|
||||
'ꮚ' => 'Ꮚ',
|
||||
'ꮛ' => 'Ꮛ',
|
||||
'ꮜ' => 'Ꮜ',
|
||||
'ꮝ' => 'Ꮝ',
|
||||
'ꮞ' => 'Ꮞ',
|
||||
'ꮟ' => 'Ꮟ',
|
||||
'ꮠ' => 'Ꮠ',
|
||||
'ꮡ' => 'Ꮡ',
|
||||
'ꮢ' => 'Ꮢ',
|
||||
'ꮣ' => 'Ꮣ',
|
||||
'ꮤ' => 'Ꮤ',
|
||||
'ꮥ' => 'Ꮥ',
|
||||
'ꮦ' => 'Ꮦ',
|
||||
'ꮧ' => 'Ꮧ',
|
||||
'ꮨ' => 'Ꮨ',
|
||||
'ꮩ' => 'Ꮩ',
|
||||
'ꮪ' => 'Ꮪ',
|
||||
'ꮫ' => 'Ꮫ',
|
||||
'ꮬ' => 'Ꮬ',
|
||||
'ꮭ' => 'Ꮭ',
|
||||
'ꮮ' => 'Ꮮ',
|
||||
'ꮯ' => 'Ꮯ',
|
||||
'ꮰ' => 'Ꮰ',
|
||||
'ꮱ' => 'Ꮱ',
|
||||
'ꮲ' => 'Ꮲ',
|
||||
'ꮳ' => 'Ꮳ',
|
||||
'ꮴ' => 'Ꮴ',
|
||||
'ꮵ' => 'Ꮵ',
|
||||
'ꮶ' => 'Ꮶ',
|
||||
'ꮷ' => 'Ꮷ',
|
||||
'ꮸ' => 'Ꮸ',
|
||||
'ꮹ' => 'Ꮹ',
|
||||
'ꮺ' => 'Ꮺ',
|
||||
'ꮻ' => 'Ꮻ',
|
||||
'ꮼ' => 'Ꮼ',
|
||||
'ꮽ' => 'Ꮽ',
|
||||
'ꮾ' => 'Ꮾ',
|
||||
'ꮿ' => 'Ꮿ',
|
||||
'a' => 'A',
|
||||
'b' => 'B',
|
||||
'c' => 'C',
|
||||
@@ -1069,6 +1226,93 @@ return array(
|
||||
'𐑍' => '𐐥',
|
||||
'𐑎' => '𐐦',
|
||||
'𐑏' => '𐐧',
|
||||
'𐓘' => '𐒰',
|
||||
'𐓙' => '𐒱',
|
||||
'𐓚' => '𐒲',
|
||||
'𐓛' => '𐒳',
|
||||
'𐓜' => '𐒴',
|
||||
'𐓝' => '𐒵',
|
||||
'𐓞' => '𐒶',
|
||||
'𐓟' => '𐒷',
|
||||
'𐓠' => '𐒸',
|
||||
'𐓡' => '𐒹',
|
||||
'𐓢' => '𐒺',
|
||||
'𐓣' => '𐒻',
|
||||
'𐓤' => '𐒼',
|
||||
'𐓥' => '𐒽',
|
||||
'𐓦' => '𐒾',
|
||||
'𐓧' => '𐒿',
|
||||
'𐓨' => '𐓀',
|
||||
'𐓩' => '𐓁',
|
||||
'𐓪' => '𐓂',
|
||||
'𐓫' => '𐓃',
|
||||
'𐓬' => '𐓄',
|
||||
'𐓭' => '𐓅',
|
||||
'𐓮' => '𐓆',
|
||||
'𐓯' => '𐓇',
|
||||
'𐓰' => '𐓈',
|
||||
'𐓱' => '𐓉',
|
||||
'𐓲' => '𐓊',
|
||||
'𐓳' => '𐓋',
|
||||
'𐓴' => '𐓌',
|
||||
'𐓵' => '𐓍',
|
||||
'𐓶' => '𐓎',
|
||||
'𐓷' => '𐓏',
|
||||
'𐓸' => '𐓐',
|
||||
'𐓹' => '𐓑',
|
||||
'𐓺' => '𐓒',
|
||||
'𐓻' => '𐓓',
|
||||
'𐳀' => '𐲀',
|
||||
'𐳁' => '𐲁',
|
||||
'𐳂' => '𐲂',
|
||||
'𐳃' => '𐲃',
|
||||
'𐳄' => '𐲄',
|
||||
'𐳅' => '𐲅',
|
||||
'𐳆' => '𐲆',
|
||||
'𐳇' => '𐲇',
|
||||
'𐳈' => '𐲈',
|
||||
'𐳉' => '𐲉',
|
||||
'𐳊' => '𐲊',
|
||||
'𐳋' => '𐲋',
|
||||
'𐳌' => '𐲌',
|
||||
'𐳍' => '𐲍',
|
||||
'𐳎' => '𐲎',
|
||||
'𐳏' => '𐲏',
|
||||
'𐳐' => '𐲐',
|
||||
'𐳑' => '𐲑',
|
||||
'𐳒' => '𐲒',
|
||||
'𐳓' => '𐲓',
|
||||
'𐳔' => '𐲔',
|
||||
'𐳕' => '𐲕',
|
||||
'𐳖' => '𐲖',
|
||||
'𐳗' => '𐲗',
|
||||
'𐳘' => '𐲘',
|
||||
'𐳙' => '𐲙',
|
||||
'𐳚' => '𐲚',
|
||||
'𐳛' => '𐲛',
|
||||
'𐳜' => '𐲜',
|
||||
'𐳝' => '𐲝',
|
||||
'𐳞' => '𐲞',
|
||||
'𐳟' => '𐲟',
|
||||
'𐳠' => '𐲠',
|
||||
'𐳡' => '𐲡',
|
||||
'𐳢' => '𐲢',
|
||||
'𐳣' => '𐲣',
|
||||
'𐳤' => '𐲤',
|
||||
'𐳥' => '𐲥',
|
||||
'𐳦' => '𐲦',
|
||||
'𐳧' => '𐲧',
|
||||
'𐳨' => '𐲨',
|
||||
'𐳩' => '𐲩',
|
||||
'𐳪' => '𐲪',
|
||||
'𐳫' => '𐲫',
|
||||
'𐳬' => '𐲬',
|
||||
'𐳭' => '𐲭',
|
||||
'𐳮' => '𐲮',
|
||||
'𐳯' => '𐲯',
|
||||
'𐳰' => '𐲰',
|
||||
'𐳱' => '𐲱',
|
||||
'𐳲' => '𐲲',
|
||||
'𑣀' => '𑢠',
|
||||
'𑣁' => '𑢡',
|
||||
'𑣂' => '𑢢',
|
||||
@@ -1101,4 +1345,70 @@ return array(
|
||||
'𑣝' => '𑢽',
|
||||
'𑣞' => '𑢾',
|
||||
'𑣟' => '𑢿',
|
||||
'𖹠' => '𖹀',
|
||||
'𖹡' => '𖹁',
|
||||
'𖹢' => '𖹂',
|
||||
'𖹣' => '𖹃',
|
||||
'𖹤' => '𖹄',
|
||||
'𖹥' => '𖹅',
|
||||
'𖹦' => '𖹆',
|
||||
'𖹧' => '𖹇',
|
||||
'𖹨' => '𖹈',
|
||||
'𖹩' => '𖹉',
|
||||
'𖹪' => '𖹊',
|
||||
'𖹫' => '𖹋',
|
||||
'𖹬' => '𖹌',
|
||||
'𖹭' => '𖹍',
|
||||
'𖹮' => '𖹎',
|
||||
'𖹯' => '𖹏',
|
||||
'𖹰' => '𖹐',
|
||||
'𖹱' => '𖹑',
|
||||
'𖹲' => '𖹒',
|
||||
'𖹳' => '𖹓',
|
||||
'𖹴' => '𖹔',
|
||||
'𖹵' => '𖹕',
|
||||
'𖹶' => '𖹖',
|
||||
'𖹷' => '𖹗',
|
||||
'𖹸' => '𖹘',
|
||||
'𖹹' => '𖹙',
|
||||
'𖹺' => '𖹚',
|
||||
'𖹻' => '𖹛',
|
||||
'𖹼' => '𖹜',
|
||||
'𖹽' => '𖹝',
|
||||
'𖹾' => '𖹞',
|
||||
'𖹿' => '𖹟',
|
||||
'𞤢' => '𞤀',
|
||||
'𞤣' => '𞤁',
|
||||
'𞤤' => '𞤂',
|
||||
'𞤥' => '𞤃',
|
||||
'𞤦' => '𞤄',
|
||||
'𞤧' => '𞤅',
|
||||
'𞤨' => '𞤆',
|
||||
'𞤩' => '𞤇',
|
||||
'𞤪' => '𞤈',
|
||||
'𞤫' => '𞤉',
|
||||
'𞤬' => '𞤊',
|
||||
'𞤭' => '𞤋',
|
||||
'𞤮' => '𞤌',
|
||||
'𞤯' => '𞤍',
|
||||
'𞤰' => '𞤎',
|
||||
'𞤱' => '𞤏',
|
||||
'𞤲' => '𞤐',
|
||||
'𞤳' => '𞤑',
|
||||
'𞤴' => '𞤒',
|
||||
'𞤵' => '𞤓',
|
||||
'𞤶' => '𞤔',
|
||||
'𞤷' => '𞤕',
|
||||
'𞤸' => '𞤖',
|
||||
'𞤹' => '𞤗',
|
||||
'𞤺' => '𞤘',
|
||||
'𞤻' => '𞤙',
|
||||
'𞤼' => '𞤚',
|
||||
'𞤽' => '𞤛',
|
||||
'𞤾' => '𞤜',
|
||||
'𞤿' => '𞤝',
|
||||
'𞥀' => '𞤞',
|
||||
'𞥁' => '𞤟',
|
||||
'𞥂' => '𞤠',
|
||||
'𞥃' => '𞤡',
|
||||
);
|
||||
|
@@ -11,54 +11,131 @@
|
||||
|
||||
use Symfony\Polyfill\Mbstring as p;
|
||||
|
||||
if (!defined('MB_CASE_UPPER')) {
|
||||
define('MB_CASE_UPPER', 0);
|
||||
define('MB_CASE_LOWER', 1);
|
||||
define('MB_CASE_TITLE', 2);
|
||||
}
|
||||
|
||||
if (!function_exists('mb_strlen')) {
|
||||
if (!function_exists('mb_convert_encoding')) {
|
||||
function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); }
|
||||
}
|
||||
if (!function_exists('mb_decode_mimeheader')) {
|
||||
function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); }
|
||||
}
|
||||
if (!function_exists('mb_encode_mimeheader')) {
|
||||
function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); }
|
||||
}
|
||||
if (!function_exists('mb_decode_numericentity')) {
|
||||
function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_encode_numericentity')) {
|
||||
function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); }
|
||||
}
|
||||
if (!function_exists('mb_convert_case')) {
|
||||
function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_internal_encoding')) {
|
||||
function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); }
|
||||
}
|
||||
if (!function_exists('mb_language')) {
|
||||
function mb_language($lang = null) { return p\Mbstring::mb_language($lang); }
|
||||
}
|
||||
if (!function_exists('mb_list_encodings')) {
|
||||
function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
|
||||
}
|
||||
if (!function_exists('mb_encoding_aliases')) {
|
||||
function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
|
||||
}
|
||||
if (!function_exists('mb_check_encoding')) {
|
||||
function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_detect_encoding')) {
|
||||
function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); }
|
||||
}
|
||||
if (!function_exists('mb_detect_order')) {
|
||||
function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); }
|
||||
}
|
||||
if (!function_exists('mb_parse_str')) {
|
||||
function mb_parse_str($s, &$result = array()) { parse_str($s, $result); }
|
||||
}
|
||||
if (!function_exists('mb_strlen')) {
|
||||
function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_strpos')) {
|
||||
function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_strtolower')) {
|
||||
function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_strtoupper')) {
|
||||
function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_substitute_character')) {
|
||||
function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); }
|
||||
}
|
||||
if (!function_exists('mb_substr')) {
|
||||
function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_stripos')) {
|
||||
function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_stristr')) {
|
||||
function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_strrchr')) {
|
||||
function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_strrichr')) {
|
||||
function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_strripos')) {
|
||||
function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_strrpos')) {
|
||||
function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_strstr')) {
|
||||
function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_get_info')) {
|
||||
function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
|
||||
}
|
||||
if (!function_exists('mb_http_output')) {
|
||||
function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); }
|
||||
}
|
||||
if (!function_exists('mb_strwidth')) {
|
||||
function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_substr_count')) {
|
||||
function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_output_handler')) {
|
||||
function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); }
|
||||
}
|
||||
if (!function_exists('mb_http_input')) {
|
||||
function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); }
|
||||
}
|
||||
if (!function_exists('mb_convert_variables')) {
|
||||
function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); }
|
||||
}
|
||||
if (!function_exists('mb_chr')) {
|
||||
if (!function_exists('mb_ord')) {
|
||||
function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_chr')) {
|
||||
function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); }
|
||||
}
|
||||
if (!function_exists('mb_scrub')) {
|
||||
function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_str_split')) {
|
||||
function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); }
|
||||
}
|
||||
|
||||
if (extension_loaded('mbstring')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!defined('MB_CASE_UPPER')) {
|
||||
define('MB_CASE_UPPER', 0);
|
||||
}
|
||||
if (!defined('MB_CASE_LOWER')) {
|
||||
define('MB_CASE_LOWER', 1);
|
||||
}
|
||||
if (!defined('MB_CASE_TITLE')) {
|
||||
define('MB_CASE_TITLE', 2);
|
||||
}
|
||||
|
Reference in New Issue
Block a user