forked from devsam/core
Dep: update
주로 PHAN
This commit is contained in:
+247
File diff suppressed because one or more lines are too long
+19
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2015-2019 Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
Symfony Polyfill / Intl: Grapheme
|
||||
=================================
|
||||
|
||||
This component provides a partial, native PHP implementation of the
|
||||
[Grapheme functions](https://php.net/intl.grapheme) from the
|
||||
[Intl](https://php.net/intl) extension.
|
||||
|
||||
- [`grapheme_extract`](https://php.net/grapheme_extract): Extract a sequence of grapheme
|
||||
clusters from a text buffer, which must be encoded in UTF-8
|
||||
- [`grapheme_stripos`](https://php.net/grapheme_stripos): Find position (in grapheme units)
|
||||
of first occurrence of a case-insensitive string
|
||||
- [`grapheme_stristr`](https://php.net/grapheme_stristr): Returns part of haystack string
|
||||
from the first occurrence of case-insensitive needle to the end of haystack
|
||||
- [`grapheme_strlen`](https://php.net/grapheme_strlen): Get string length in grapheme units
|
||||
- [`grapheme_strpos`](https://php.net/grapheme_strpos): Find position (in grapheme units)
|
||||
of first occurrence of a string
|
||||
- [`grapheme_strripos`](https://php.net/grapheme_strripos): Find position (in grapheme units)
|
||||
of last occurrence of a case-insensitive string
|
||||
- [`grapheme_strrpos`](https://php.net/grapheme_strrpos): Find position (in grapheme units)
|
||||
of last occurrence of a string
|
||||
- [`grapheme_strstr`](https://php.net/grapheme_strstr): Returns part of haystack string from
|
||||
the first occurrence of needle to the end of haystack
|
||||
- [`grapheme_substr`](https://php.net/grapheme_substr): Return part of a string
|
||||
|
||||
More information can be found in the
|
||||
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
This library is released under the [MIT license](LICENSE).
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Symfony\Polyfill\Intl\Grapheme as p;
|
||||
|
||||
if (extension_loaded('intl')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (\PHP_VERSION_ID >= 80000) {
|
||||
return require __DIR__.'/bootstrap80.php';
|
||||
}
|
||||
|
||||
if (!defined('GRAPHEME_EXTR_COUNT')) {
|
||||
define('GRAPHEME_EXTR_COUNT', 0);
|
||||
}
|
||||
if (!defined('GRAPHEME_EXTR_MAXBYTES')) {
|
||||
define('GRAPHEME_EXTR_MAXBYTES', 1);
|
||||
}
|
||||
if (!defined('GRAPHEME_EXTR_MAXCHARS')) {
|
||||
define('GRAPHEME_EXTR_MAXCHARS', 2);
|
||||
}
|
||||
|
||||
if (!function_exists('grapheme_extract')) {
|
||||
function grapheme_extract($haystack, $size, $type = 0, $start = 0, &$next = 0) { return p\Grapheme::grapheme_extract($haystack, $size, $type, $start, $next); }
|
||||
}
|
||||
if (!function_exists('grapheme_stripos')) {
|
||||
function grapheme_stripos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_stripos($haystack, $needle, $offset); }
|
||||
}
|
||||
if (!function_exists('grapheme_stristr')) {
|
||||
function grapheme_stristr($haystack, $needle, $beforeNeedle = false) { return p\Grapheme::grapheme_stristr($haystack, $needle, $beforeNeedle); }
|
||||
}
|
||||
if (!function_exists('grapheme_strlen')) {
|
||||
function grapheme_strlen($input) { return p\Grapheme::grapheme_strlen($input); }
|
||||
}
|
||||
if (!function_exists('grapheme_strpos')) {
|
||||
function grapheme_strpos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strpos($haystack, $needle, $offset); }
|
||||
}
|
||||
if (!function_exists('grapheme_strripos')) {
|
||||
function grapheme_strripos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strripos($haystack, $needle, $offset); }
|
||||
}
|
||||
if (!function_exists('grapheme_strrpos')) {
|
||||
function grapheme_strrpos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strrpos($haystack, $needle, $offset); }
|
||||
}
|
||||
if (!function_exists('grapheme_strstr')) {
|
||||
function grapheme_strstr($haystack, $needle, $beforeNeedle = false) { return p\Grapheme::grapheme_strstr($haystack, $needle, $beforeNeedle); }
|
||||
}
|
||||
if (!function_exists('grapheme_substr')) {
|
||||
function grapheme_substr($string, $offset, $length = null) { return p\Grapheme::grapheme_substr($string, $offset, $length); }
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Symfony\Polyfill\Intl\Grapheme as p;
|
||||
|
||||
if (!defined('GRAPHEME_EXTR_COUNT')) {
|
||||
define('GRAPHEME_EXTR_COUNT', 0);
|
||||
}
|
||||
if (!defined('GRAPHEME_EXTR_MAXBYTES')) {
|
||||
define('GRAPHEME_EXTR_MAXBYTES', 1);
|
||||
}
|
||||
if (!defined('GRAPHEME_EXTR_MAXCHARS')) {
|
||||
define('GRAPHEME_EXTR_MAXCHARS', 2);
|
||||
}
|
||||
|
||||
if (!function_exists('grapheme_extract')) {
|
||||
function grapheme_extract(?string $haystack, ?int $size, ?int $type = GRAPHEME_EXTR_COUNT, ?int $offset = 0, &$next = null): string|false { return p\Grapheme::grapheme_extract((string) $haystack, (int) $size, (int) $type, (int) $offset, $next); }
|
||||
}
|
||||
if (!function_exists('grapheme_stripos')) {
|
||||
function grapheme_stripos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_stripos((string) $haystack, (string) $needle, (int) $offset); }
|
||||
}
|
||||
if (!function_exists('grapheme_stristr')) {
|
||||
function grapheme_stristr(?string $haystack, ?string $needle, ?bool $beforeNeedle = false): string|false { return p\Grapheme::grapheme_stristr((string) $haystack, (string) $needle, (bool) $beforeNeedle); }
|
||||
}
|
||||
if (!function_exists('grapheme_strlen')) {
|
||||
function grapheme_strlen(?string $string): int|false|null { return p\Grapheme::grapheme_strlen((string) $string); }
|
||||
}
|
||||
if (!function_exists('grapheme_strpos')) {
|
||||
function grapheme_strpos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_strpos((string) $haystack, (string) $needle, (int) $offset); }
|
||||
}
|
||||
if (!function_exists('grapheme_strripos')) {
|
||||
function grapheme_strripos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_strripos((string) $haystack, (string) $needle, (int) $offset); }
|
||||
}
|
||||
if (!function_exists('grapheme_strrpos')) {
|
||||
function grapheme_strrpos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_strrpos((string) $haystack, (string) $needle, (int) $offset); }
|
||||
}
|
||||
if (!function_exists('grapheme_strstr')) {
|
||||
function grapheme_strstr(?string $haystack, ?string $needle, ?bool $beforeNeedle = false): string|false { return p\Grapheme::grapheme_strstr((string) $haystack, (string) $needle, (bool) $beforeNeedle); }
|
||||
}
|
||||
if (!function_exists('grapheme_substr')) {
|
||||
function grapheme_substr(?string $string, ?int $offset, ?int $length = null): string|false { return p\Grapheme::grapheme_substr((string) $string, (int) $offset, $length); }
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "symfony/polyfill-intl-grapheme",
|
||||
"type": "library",
|
||||
"description": "Symfony polyfill for intl's grapheme_* functions",
|
||||
"keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "grapheme"],
|
||||
"homepage": "https://symfony.com",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Polyfill\\Intl\\Grapheme\\": "" },
|
||||
"files": [ "bootstrap.php" ]
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user