9 |
10 | Permission is hereby granted, free of charge, to any person obtaining a copy
11 | of this software and associated documentation files (the "Software"), to deal
12 | in the Software without restriction, including without limitation the rights
13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 | copies of the Software, and to permit persons to whom the Software is
15 | furnished to do so, subject to the following conditions:
16 |
17 | The above copyright notice and this permission notice shall be included in
18 | all copies or substantial portions of the Software.
19 |
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26 | THE SOFTWARE.
27 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/DroppingStream.php:
--------------------------------------------------------------------------------
1 | stream = $stream;
30 | $this->maxLength = $maxLength;
31 | }
32 |
33 | public function write($string): int
34 | {
35 | $diff = $this->maxLength - $this->stream->getSize();
36 |
37 | // Begin returning 0 when the underlying stream is too large.
38 | if ($diff <= 0) {
39 | return 0;
40 | }
41 |
42 | // Write the stream or a subset of the stream if needed.
43 | if (strlen($string) < $diff) {
44 | return $this->stream->write($string);
45 | }
46 |
47 | return $this->stream->write(substr($string, 0, $diff));
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php:
--------------------------------------------------------------------------------
1 | 15 + 32]);
35 | $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource));
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:
--------------------------------------------------------------------------------
1 | filename = $filename;
35 | $this->mode = $mode;
36 |
37 | // unsetting the property forces the first access to go through
38 | // __get().
39 | unset($this->stream);
40 | }
41 |
42 | /**
43 | * Creates the underlying stream lazily when required.
44 | */
45 | protected function createStream(): StreamInterface
46 | {
47 | return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/NoSeekStream.php:
--------------------------------------------------------------------------------
1 | @,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";
22 | public const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)";
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/UriComparator.php:
--------------------------------------------------------------------------------
1 | getHost(), $modified->getHost()) !== 0) {
23 | return true;
24 | }
25 |
26 | if ($original->getScheme() !== $modified->getScheme()) {
27 | return true;
28 | }
29 |
30 | if (self::computePort($original) !== self::computePort($modified)) {
31 | return true;
32 | }
33 |
34 | return false;
35 | }
36 |
37 | private static function computePort(UriInterface $uri): int
38 | {
39 | $port = $uri->getPort();
40 |
41 | if (null !== $port) {
42 | return $port;
43 | }
44 |
45 | return 'https' === $uri->getScheme() ? 443 : 80;
46 | }
47 |
48 | private function __construct()
49 | {
50 | // cannot be instantiated
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/intervention/image/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Oliver Vogel
4 |
5 | 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:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | 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.
--------------------------------------------------------------------------------
/vendor/intervention/image/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "intervention/image",
3 | "description": "Image handling and manipulation library with support for Laravel integration",
4 | "homepage": "http://image.intervention.io/",
5 | "keywords": ["image", "gd", "imagick", "laravel", "watermark", "thumbnail"],
6 | "license": "MIT",
7 | "authors": [
8 | {
9 | "name": "Oliver Vogel",
10 | "email": "oliver@intervention.io",
11 | "homepage": "https://intervention.io/"
12 | }
13 | ],
14 | "require": {
15 | "php": ">=5.4.0",
16 | "ext-fileinfo": "*",
17 | "guzzlehttp/psr7": "~1.1 || ^2.0"
18 | },
19 | "require-dev": {
20 | "phpunit/phpunit": "^4.8 || ^5.7 || ^7.5.15",
21 | "mockery/mockery": "~0.9.2"
22 | },
23 | "suggest": {
24 | "ext-gd": "to use GD library based image processing.",
25 | "ext-imagick": "to use Imagick based image processing.",
26 | "intervention/imagecache": "Caching extension for the Intervention Image library"
27 | },
28 | "autoload": {
29 | "psr-4": {
30 | "Intervention\\Image\\": "src/Intervention/Image"
31 | }
32 | },
33 | "extra": {
34 | "branch-alias": {
35 | "dev-master": "2.4-dev"
36 | },
37 | "laravel": {
38 | "providers": [
39 | "Intervention\\Image\\ImageServiceProvider"
40 | ],
41 | "aliases": {
42 | "Image": "Intervention\\Image\\Facades\\Image"
43 | }
44 | }
45 | },
46 | "minimum-stability": "stable"
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/intervention/image/provides.json:
--------------------------------------------------------------------------------
1 | {
2 | "providers": [
3 | "Intervention\\Image\\ImageServiceProvider"
4 | ],
5 | "aliases": [
6 | {
7 | "alias": "Image",
8 | "facade": "Intervention\\Image\\Facades\\Image"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/AbstractShape.php:
--------------------------------------------------------------------------------
1 | background = $color;
47 | }
48 |
49 | /**
50 | * Set border width and color of current shape
51 | *
52 | * @param int $width
53 | * @param string $color
54 | * @return void
55 | */
56 | public function border($width, $color = null)
57 | {
58 | $this->border_width = is_numeric($width) ? intval($width) : 0;
59 | $this->border_color = is_null($color) ? '#000000' : $color;
60 | }
61 |
62 | /**
63 | * Determines if current shape has border
64 | *
65 | * @return boolean
66 | */
67 | public function hasBorder()
68 | {
69 | return ($this->border_width >= 1);
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Commands/ChecksumCommand.php:
--------------------------------------------------------------------------------
1 | getSize();
18 |
19 | for ($x=0; $x <= ($size->width-1); $x++) {
20 | for ($y=0; $y <= ($size->height-1); $y++) {
21 | $colors[] = $image->pickColor($x, $y, 'array');
22 | }
23 | }
24 |
25 | $this->setOutput(md5(serialize($colors)));
26 |
27 | return true;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Commands/CircleCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('numeric')->required()->value();
18 | $x = $this->argument(1)->type('numeric')->required()->value();
19 | $y = $this->argument(2)->type('numeric')->required()->value();
20 | $callback = $this->argument(3)->type('closure')->value();
21 |
22 | $circle_classname = sprintf('\Intervention\Image\%s\Shapes\CircleShape',
23 | $image->getDriver()->getDriverName());
24 |
25 | $circle = new $circle_classname($diameter);
26 |
27 | if ($callback instanceof Closure) {
28 | $callback($circle);
29 | }
30 |
31 | $circle->applyToImage($image, $x, $y);
32 |
33 | return true;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Commands/EllipseCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('numeric')->required()->value();
18 | $height = $this->argument(1)->type('numeric')->required()->value();
19 | $x = $this->argument(2)->type('numeric')->required()->value();
20 | $y = $this->argument(3)->type('numeric')->required()->value();
21 | $callback = $this->argument(4)->type('closure')->value();
22 |
23 | $ellipse_classname = sprintf('\Intervention\Image\%s\Shapes\EllipseShape',
24 | $image->getDriver()->getDriverName());
25 |
26 | $ellipse = new $ellipse_classname($width, $height);
27 |
28 | if ($callback instanceof Closure) {
29 | $callback($ellipse);
30 | }
31 |
32 | $ellipse->applyToImage($image, $x, $y);
33 |
34 | return true;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Commands/LineCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('numeric')->required()->value();
18 | $y1 = $this->argument(1)->type('numeric')->required()->value();
19 | $x2 = $this->argument(2)->type('numeric')->required()->value();
20 | $y2 = $this->argument(3)->type('numeric')->required()->value();
21 | $callback = $this->argument(4)->type('closure')->value();
22 |
23 | $line_classname = sprintf('\Intervention\Image\%s\Shapes\LineShape',
24 | $image->getDriver()->getDriverName());
25 |
26 | $line = new $line_classname($x2, $y2);
27 |
28 | if ($callback instanceof Closure) {
29 | $callback($line);
30 | }
31 |
32 | $line->applyToImage($image, $x1, $y1);
33 |
34 | return true;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Commands/OrientateCommand.php:
--------------------------------------------------------------------------------
1 | exif('Orientation')) {
16 |
17 | case 2:
18 | $image->flip();
19 | break;
20 |
21 | case 3:
22 | $image->rotate(180);
23 | break;
24 |
25 | case 4:
26 | $image->rotate(180)->flip();
27 | break;
28 |
29 | case 5:
30 | $image->rotate(270)->flip();
31 | break;
32 |
33 | case 6:
34 | $image->rotate(270);
35 | break;
36 |
37 | case 7:
38 | $image->rotate(90)->flip();
39 | break;
40 |
41 | case 8:
42 | $image->rotate(90);
43 | break;
44 | }
45 |
46 | return true;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Commands/PolygonCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('array')->required()->value();
19 | $callback = $this->argument(1)->type('closure')->value();
20 |
21 | $vertices_count = count($points);
22 |
23 | // check if number if coordinates is even
24 | if ($vertices_count % 2 !== 0) {
25 | throw new InvalidArgumentException(
26 | "The number of given polygon vertices must be even."
27 | );
28 | }
29 |
30 | if ($vertices_count < 6) {
31 | throw new InvalidArgumentException(
32 | "You must have at least 3 points in your array."
33 | );
34 | }
35 |
36 | $polygon_classname = sprintf('\Intervention\Image\%s\Shapes\PolygonShape',
37 | $image->getDriver()->getDriverName());
38 |
39 | $polygon = new $polygon_classname($points);
40 |
41 | if ($callback instanceof Closure) {
42 | $callback($polygon);
43 | }
44 |
45 | $polygon->applyToImage($image);
46 |
47 | return true;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Commands/PsrResponseCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->value();
24 | $quality = $this->argument(1)->between(0, 100)->value();
25 |
26 | //Encoded property will be populated at this moment
27 | $stream = $image->stream($format, $quality);
28 |
29 | $mimetype = finfo_buffer(
30 | finfo_open(FILEINFO_MIME_TYPE),
31 | $image->getEncoded()
32 | );
33 |
34 | $this->setOutput(new Response(
35 | 200,
36 | [
37 | 'Content-Type' => $mimetype,
38 | 'Content-Length' => strlen($image->getEncoded())
39 | ],
40 | $stream
41 | ));
42 |
43 | return true;
44 | }
45 | }
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Commands/RectangleCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('numeric')->required()->value();
18 | $y1 = $this->argument(1)->type('numeric')->required()->value();
19 | $x2 = $this->argument(2)->type('numeric')->required()->value();
20 | $y2 = $this->argument(3)->type('numeric')->required()->value();
21 | $callback = $this->argument(4)->type('closure')->value();
22 |
23 | $rectangle_classname = sprintf('\Intervention\Image\%s\Shapes\RectangleShape',
24 | $image->getDriver()->getDriverName());
25 |
26 | $rectangle = new $rectangle_classname($x1, $y1, $x2, $y2);
27 |
28 | if ($callback instanceof Closure) {
29 | $callback($rectangle);
30 | }
31 |
32 | $rectangle->applyToImage($image, $x1, $y1);
33 |
34 | return true;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Commands/ResponseCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->value();
18 | $quality = $this->argument(1)->between(0, 100)->value();
19 |
20 | $response = new Response($image, $format, $quality);
21 |
22 | $this->setOutput($response->make());
23 |
24 | return true;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Commands/StreamCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->value();
17 | $quality = $this->argument(1)->between(0, 100)->value();
18 | $data = $image->encode($format, $quality)->getEncoded();
19 |
20 | $this->setOutput($this->getStream($data));
21 |
22 | return true;
23 | }
24 |
25 | /**
26 | * Create stream from given data
27 | *
28 | * @param string $data
29 | * @return \Psr\Http\Message\StreamInterface
30 | */
31 | protected function getStream($data)
32 | {
33 | if (class_exists(\GuzzleHttp\Psr7\Utils::class)) {
34 | return \GuzzleHttp\Psr7\Utils::streamFor($data); // guzzlehttp/psr7 >= 2.0
35 | }
36 |
37 | return \GuzzleHttp\Psr7\stream_for($data); // guzzlehttp/psr7 < 2.0
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Commands/TextCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->required()->value();
17 | $x = $this->argument(1)->type('numeric')->value(0);
18 | $y = $this->argument(2)->type('numeric')->value(0);
19 | $callback = $this->argument(3)->type('closure')->value();
20 |
21 | $fontclassname = sprintf('\Intervention\Image\%s\Font',
22 | $image->getDriver()->getDriverName());
23 |
24 | $font = new $fontclassname($text);
25 |
26 | if ($callback instanceof Closure) {
27 | $callback($font);
28 | }
29 |
30 | $font->applyToImage($image, $x, $y);
31 |
32 | return true;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Exception/ImageException.php:
--------------------------------------------------------------------------------
1 | size = is_numeric($size) ? intval($size) : self::DEFAULT_SIZE;
29 | }
30 |
31 | /**
32 | * Applies filter effects to given image
33 | *
34 | * @param \Intervention\Image\Image $image
35 | * @return \Intervention\Image\Image
36 | */
37 | public function applyFilter(Image $image)
38 | {
39 | $image->pixelate($this->size);
40 | $image->greyscale();
41 |
42 | return $image;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Filters/FilterInterface.php:
--------------------------------------------------------------------------------
1 | argument(0)->value();
18 |
19 | // clone current image resource
20 | $clone = clone $image;
21 | $image->setBackup($clone->getCore(), $backupName);
22 |
23 | return true;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BlurCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->between(0, 100)->value(1);
18 |
19 | for ($i=0; $i < intval($amount); $i++) {
20 | imagefilter($image->getCore(), IMG_FILTER_GAUSSIAN_BLUR);
21 | }
22 |
23 | return true;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BrightnessCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->between(-100, 100)->required()->value();
18 |
19 | return imagefilter($image->getCore(), IMG_FILTER_BRIGHTNESS, ($level * 2.55));
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ColorizeCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->between(-100, 100)->required()->value();
18 | $green = $this->argument(1)->between(-100, 100)->required()->value();
19 | $blue = $this->argument(2)->between(-100, 100)->required()->value();
20 |
21 | // normalize colorize levels
22 | $red = round($red * 2.55);
23 | $green = round($green * 2.55);
24 | $blue = round($blue * 2.55);
25 |
26 | // apply filter
27 | return imagefilter($image->getCore(), IMG_FILTER_COLORIZE, $red, $green, $blue);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ContrastCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->between(-100, 100)->required()->value();
18 |
19 | return imagefilter($image->getCore(), IMG_FILTER_CONTRAST, ($level * -1));
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/CropCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('digit')->required()->value();
19 | $height = $this->argument(1)->type('digit')->required()->value();
20 | $x = $this->argument(2)->type('digit')->value();
21 | $y = $this->argument(3)->type('digit')->value();
22 |
23 | if (is_null($width) || is_null($height)) {
24 | throw new \Intervention\Image\Exception\InvalidArgumentException(
25 | "Width and height of cutout needs to be defined."
26 | );
27 | }
28 |
29 | $cropped = new Size($width, $height);
30 | $position = new Point($x, $y);
31 |
32 | // align boxes
33 | if (is_null($x) && is_null($y)) {
34 | $position = $image->getSize()->align('center')->relativePosition($cropped->align('center'));
35 | }
36 |
37 | // crop image core
38 | return $this->modify($image, 0, 0, $position->x, $position->y, $cropped->width, $cropped->height, $cropped->width, $cropped->height);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/DestroyCommand.php:
--------------------------------------------------------------------------------
1 | getCore());
19 |
20 | // destroy backups
21 | foreach ($image->getBackups() as $backup) {
22 | imagedestroy($backup);
23 | }
24 |
25 | return true;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FitCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('digit')->required()->value();
18 | $height = $this->argument(1)->type('digit')->value($width);
19 | $constraints = $this->argument(2)->type('closure')->value();
20 | $position = $this->argument(3)->type('string')->value('center');
21 |
22 | // calculate size
23 | $cropped = $image->getSize()->fit(new Size($width, $height), $position);
24 | $resized = clone $cropped;
25 | $resized = $resized->resize($width, $height, $constraints);
26 |
27 | // modify image
28 | $this->modify($image, 0, 0, $cropped->pivot->x, $cropped->pivot->y, $resized->getWidth(), $resized->getHeight(), $cropped->getWidth(), $cropped->getHeight());
29 |
30 | return true;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FlipCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->value('h');
16 |
17 | $size = $image->getSize();
18 | $dst = clone $size;
19 |
20 | switch (strtolower($mode)) {
21 | case 2:
22 | case 'v':
23 | case 'vert':
24 | case 'vertical':
25 | $size->pivot->y = $size->height - 1;
26 | $size->height = $size->height * (-1);
27 | break;
28 |
29 | default:
30 | $size->pivot->x = $size->width - 1;
31 | $size->width = $size->width * (-1);
32 | break;
33 | }
34 |
35 | return $this->modify($image, 0, 0, $size->pivot->x, $size->pivot->y, $dst->width, $dst->height, $size->width, $size->height);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GammaCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('numeric')->required()->value();
18 |
19 | return imagegammacorrect($image->getCore(), 1, $gamma);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GetSizeCommand.php:
--------------------------------------------------------------------------------
1 | setOutput(new Size(
19 | imagesx($image->getCore()),
20 | imagesy($image->getCore())
21 | ));
22 |
23 | return true;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GreyscaleCommand.php:
--------------------------------------------------------------------------------
1 | getCore(), IMG_FILTER_GRAYSCALE);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/HeightenCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('digit')->required()->value();
16 | $additionalConstraints = $this->argument(1)->type('closure')->value();
17 |
18 | $this->arguments[0] = null;
19 | $this->arguments[1] = $height;
20 | $this->arguments[2] = function ($constraint) use ($additionalConstraints) {
21 | $constraint->aspectRatio();
22 | if(is_callable($additionalConstraints))
23 | $additionalConstraints($constraint);
24 | };
25 |
26 | return parent::execute($image);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InsertCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->required()->value();
18 | $position = $this->argument(1)->type('string')->value();
19 | $x = $this->argument(2)->type('digit')->value(0);
20 | $y = $this->argument(3)->type('digit')->value(0);
21 |
22 | // build watermark
23 | $watermark = $image->getDriver()->init($source);
24 |
25 | // define insertion point
26 | $image_size = $image->getSize()->align($position, $x, $y);
27 | $watermark_size = $watermark->getSize()->align($position);
28 | $target = $image_size->relativePosition($watermark_size);
29 |
30 | // insert image at position
31 | imagealphablending($image->getCore(), true);
32 | return imagecopy($image->getCore(), $watermark->getCore(), $target->x, $target->y, 0, 0, $watermark_size->width, $watermark_size->height);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InterlaceCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('bool')->value(true);
18 |
19 | imageinterlace($image->getCore(), $mode);
20 |
21 | return true;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InvertCommand.php:
--------------------------------------------------------------------------------
1 | getCore(), IMG_FILTER_NEGATE);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/LimitColorsCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->value();
19 | $matte = $this->argument(1)->value();
20 |
21 | // get current image size
22 | $size = $image->getSize();
23 |
24 | // create empty canvas
25 | $resource = imagecreatetruecolor($size->width, $size->height);
26 |
27 | // define matte
28 | if (is_null($matte)) {
29 | $matte = imagecolorallocatealpha($resource, 255, 255, 255, 127);
30 | } else {
31 | $matte = $image->getDriver()->parseColor($matte)->getInt();
32 | }
33 |
34 | // fill with matte and copy original image
35 | imagefill($resource, 0, 0, $matte);
36 |
37 | // set transparency
38 | imagecolortransparent($resource, $matte);
39 |
40 | // copy original image
41 | imagecopy($resource, $image->getCore(), 0, 0, 0, 0, $size->width, $size->height);
42 |
43 | if (is_numeric($count) && $count <= 256) {
44 | // decrease colors
45 | imagetruecolortopalette($resource, true, $count);
46 | }
47 |
48 | // set new resource
49 | $image->setCore($resource);
50 |
51 | return true;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/OpacityCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->between(0, 100)->required()->value();
18 |
19 | // get size of image
20 | $size = $image->getSize();
21 |
22 | // build temp alpha mask
23 | $mask_color = sprintf('rgba(0, 0, 0, %.1F)', $transparency / 100);
24 | $mask = $image->getDriver()->newImage($size->width, $size->height, $mask_color);
25 |
26 | // mask image
27 | $image->mask($mask->getCore(), true);
28 |
29 | return true;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PickColorCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('digit')->required()->value();
19 | $y = $this->argument(1)->type('digit')->required()->value();
20 | $format = $this->argument(2)->type('string')->value('array');
21 |
22 | // pick color
23 | $color = imagecolorat($image->getCore(), $x, $y);
24 |
25 | if ( ! imageistruecolor($image->getCore())) {
26 | $color = imagecolorsforindex($image->getCore(), $color);
27 | $color['alpha'] = round(1 - $color['alpha'] / 127, 2);
28 | }
29 |
30 | $color = new Color($color);
31 |
32 | // format to output
33 | $this->setOutput($color->format($format));
34 |
35 | return true;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->required()->value();
19 | $color = new Color($color);
20 | $x = $this->argument(1)->type('digit')->required()->value();
21 | $y = $this->argument(2)->type('digit')->required()->value();
22 |
23 | return imagesetpixel($image->getCore(), $x, $y, $color->getInt());
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelateCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('digit')->value(10);
18 |
19 | return imagefilter($image->getCore(), IMG_FILTER_PIXELATE, $size, true);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResetCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->value();
19 | $backup = $image->getBackup($backupName);
20 |
21 | if (is_resource($backup) || $backup instanceof \GdImage) {
22 |
23 | // destroy current resource
24 | imagedestroy($image->getCore());
25 |
26 | // clone backup
27 | $backup = $image->getDriver()->cloneCore($backup);
28 |
29 | // reset to new resource
30 | $image->setCore($backup);
31 |
32 | return true;
33 | }
34 |
35 | throw new RuntimeException(
36 | "Backup not available. Call backup() before reset()."
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/RotateCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('numeric')->required()->value();
19 | $color = $this->argument(1)->value();
20 | $color = new Color($color);
21 |
22 | // restrict rotations beyond 360 degrees, since the end result is the same
23 | $angle = fmod($angle, 360);
24 |
25 | // rotate image
26 | $image->setCore(imagerotate($image->getCore(), $angle, $color->getInt()));
27 |
28 | return true;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/SharpenCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->between(0, 100)->value(10);
18 |
19 | // build matrix
20 | $min = $amount >= 10 ? $amount * -0.01 : 0;
21 | $max = $amount * -0.025;
22 | $abs = ((4 * $min + 4 * $max) * -1) + 1;
23 | $div = 1;
24 |
25 | $matrix = [
26 | [$min, $max, $min],
27 | [$max, $abs, $max],
28 | [$min, $max, $min]
29 | ];
30 |
31 | // apply the matrix
32 | return imageconvolution($image->getCore(), $matrix, $div, 0);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Commands/WidenCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('digit')->required()->value();
16 | $additionalConstraints = $this->argument(1)->type('closure')->value();
17 |
18 | $this->arguments[0] = $width;
19 | $this->arguments[1] = null;
20 | $this->arguments[2] = function ($constraint) use ($additionalConstraints) {
21 | $constraint->aspectRatio();
22 | if(is_callable($additionalConstraints))
23 | $additionalConstraints($constraint);
24 | };
25 |
26 | return parent::execute($image);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/CircleShape.php:
--------------------------------------------------------------------------------
1 | width = is_numeric($diameter) ? intval($diameter) : $this->diameter;
24 | $this->height = is_numeric($diameter) ? intval($diameter) : $this->diameter;
25 | $this->diameter = is_numeric($diameter) ? intval($diameter) : $this->diameter;
26 | }
27 |
28 | /**
29 | * Draw current circle on given image
30 | *
31 | * @param Image $image
32 | * @param int $x
33 | * @param int $y
34 | * @return boolean
35 | */
36 | public function applyToImage(Image $image, $x = 0, $y = 0)
37 | {
38 | return parent::applyToImage($image, $x, $y);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/PolygonShape.php:
--------------------------------------------------------------------------------
1 | points = $points;
26 | }
27 |
28 | /**
29 | * Draw polygon on given image
30 | *
31 | * @param Image $image
32 | * @param int $x
33 | * @param int $y
34 | * @return boolean
35 | */
36 | public function applyToImage(Image $image, $x = 0, $y = 0)
37 | {
38 | $background = new Color($this->background);
39 | imagefilledpolygon($image->getCore(), $this->points, intval(count($this->points) / 2), $background->getInt());
40 |
41 | if ($this->hasBorder()) {
42 | $border_color = new Color($this->border_color);
43 | imagesetthickness($image->getCore(), $this->border_width);
44 | imagepolygon($image->getCore(), $this->points, intval(count($this->points) / 2), $border_color->getInt());
45 | }
46 |
47 | return true;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLeague.php:
--------------------------------------------------------------------------------
1 | config = $config;
29 | }
30 |
31 | /**
32 | * Register the server provider.
33 | *
34 | * @return void
35 | */
36 | public function register()
37 | {
38 | $this->getContainer()->share('Intervention\Image\ImageManager', function () {
39 | return new ImageManager($this->config);
40 | });
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLumen.php:
--------------------------------------------------------------------------------
1 | app;
17 |
18 | // merge default config
19 | $this->mergeConfigFrom(
20 | __DIR__.'/../../config/config.php',
21 | 'image'
22 | );
23 |
24 | // set configuration
25 | $app->configure('image');
26 |
27 | // create image
28 | $app->singleton('image',function ($app) {
29 | return new ImageManager($app['config']->get('image'));
30 | });
31 |
32 | $app->alias('image', 'Intervention\Image\ImageManager');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BackupCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->value();
18 |
19 | // clone current image resource
20 | $clone = clone $image;
21 | $image->setBackup($clone->getCore(), $backupName);
22 |
23 | return true;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BlurCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->between(0, 100)->value(1);
18 |
19 | return $image->getCore()->blurImage(1 * $amount, 0.5 * $amount);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BrightnessCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->between(-100, 100)->required()->value();
18 |
19 | return $image->getCore()->modulateImage(100 + $level, 100, 100);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ColorizeCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->between(-100, 100)->required()->value();
18 | $green = $this->argument(1)->between(-100, 100)->required()->value();
19 | $blue = $this->argument(2)->between(-100, 100)->required()->value();
20 |
21 | // normalize colorize levels
22 | $red = $this->normalizeLevel($red);
23 | $green = $this->normalizeLevel($green);
24 | $blue = $this->normalizeLevel($blue);
25 |
26 | $qrange = $image->getCore()->getQuantumRange();
27 |
28 | // apply
29 | $image->getCore()->levelImage(0, $red, $qrange['quantumRangeLong'], \Imagick::CHANNEL_RED);
30 | $image->getCore()->levelImage(0, $green, $qrange['quantumRangeLong'], \Imagick::CHANNEL_GREEN);
31 | $image->getCore()->levelImage(0, $blue, $qrange['quantumRangeLong'], \Imagick::CHANNEL_BLUE);
32 |
33 | return true;
34 | }
35 |
36 | private function normalizeLevel($level)
37 | {
38 | if ($level > 0) {
39 | return $level/5;
40 | } else {
41 | return ($level+100)/100;
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ContrastCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->between(-100, 100)->required()->value();
18 |
19 | return $image->getCore()->sigmoidalContrastImage($level > 0, $level / 4, 0);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/CropCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('digit')->required()->value();
21 | $height = $this->argument(1)->type('digit')->required()->value();
22 | $x = $this->argument(2)->type('digit')->value();
23 | $y = $this->argument(3)->type('digit')->value();
24 |
25 | if (is_null($width) || is_null($height)) {
26 | throw new InvalidArgumentException(
27 | "Width and height of cutout needs to be defined."
28 | );
29 | }
30 |
31 | $cropped = new Size($width, $height);
32 | $position = new Point($x, $y);
33 |
34 | // align boxes
35 | if (is_null($x) && is_null($y)) {
36 | $position = $image->getSize()->align('center')->relativePosition($cropped->align('center'));
37 | }
38 |
39 | // crop image core
40 | $image->getCore()->cropImage($cropped->width, $cropped->height, $position->x, $position->y);
41 | $image->getCore()->setImagePage(0,0,0,0);
42 |
43 | return true;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/DestroyCommand.php:
--------------------------------------------------------------------------------
1 | getCore()->clear();
19 |
20 | // destroy backups
21 | foreach ($image->getBackups() as $backup) {
22 | $backup->clear();
23 | }
24 |
25 | return true;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ExifCommand.php:
--------------------------------------------------------------------------------
1 | preferExtension = false;
22 | }
23 |
24 | /**
25 | * Read Exif data from the given image
26 | *
27 | * @param \Intervention\Image\Image $image
28 | * @return boolean
29 | */
30 | public function execute($image)
31 | {
32 | if ($this->preferExtension && function_exists('exif_read_data')) {
33 | return parent::execute($image);
34 | }
35 |
36 | $core = $image->getCore();
37 |
38 | if ( ! method_exists($core, 'getImageProperties')) {
39 | throw new NotSupportedException(
40 | "Reading Exif data is not supported by this PHP installation."
41 | );
42 | }
43 |
44 | $requestedKey = $this->argument(0)->value();
45 | if ($requestedKey !== null) {
46 | $this->setOutput($core->getImageProperty('exif:' . $requestedKey));
47 | return true;
48 | }
49 |
50 | $exif = [];
51 | $properties = $core->getImageProperties();
52 | foreach ($properties as $key => $value) {
53 | if (substr($key, 0, 5) !== 'exif:') {
54 | continue;
55 | }
56 |
57 | $exif[substr($key, 5)] = $value;
58 | }
59 |
60 | $this->setOutput($exif);
61 | return true;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FitCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('digit')->required()->value();
19 | $height = $this->argument(1)->type('digit')->value($width);
20 | $constraints = $this->argument(2)->type('closure')->value();
21 | $position = $this->argument(3)->type('string')->value('center');
22 |
23 | // calculate size
24 | $cropped = $image->getSize()->fit(new Size($width, $height), $position);
25 | $resized = clone $cropped;
26 | $resized = $resized->resize($width, $height, $constraints);
27 |
28 | // crop image
29 | $image->getCore()->cropImage(
30 | $cropped->width,
31 | $cropped->height,
32 | $cropped->pivot->x,
33 | $cropped->pivot->y
34 | );
35 |
36 | // resize image
37 | $image->getCore()->scaleImage($resized->getWidth(), $resized->getHeight());
38 | $image->getCore()->setImagePage(0,0,0,0);
39 |
40 | return true;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FlipCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->value('h');
18 |
19 | if (in_array(strtolower($mode), [2, 'v', 'vert', 'vertical'])) {
20 | // flip vertical
21 | return $image->getCore()->flipImage();
22 | } else {
23 | // flip horizontal
24 | return $image->getCore()->flopImage();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GammaCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('numeric')->required()->value();
18 |
19 | return $image->getCore()->gammaImage($gamma);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GetSizeCommand.php:
--------------------------------------------------------------------------------
1 | getCore();
20 |
21 | $this->setOutput(new Size(
22 | $core->getImageWidth(),
23 | $core->getImageHeight()
24 | ));
25 |
26 | return true;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GreyscaleCommand.php:
--------------------------------------------------------------------------------
1 | getCore()->modulateImage(100, 0, 100);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/HeightenCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('digit')->required()->value();
16 | $additionalConstraints = $this->argument(1)->type('closure')->value();
17 |
18 | $this->arguments[0] = null;
19 | $this->arguments[1] = $height;
20 | $this->arguments[2] = function ($constraint) use ($additionalConstraints) {
21 | $constraint->aspectRatio();
22 | if(is_callable($additionalConstraints))
23 | $additionalConstraints($constraint);
24 | };
25 |
26 | return parent::execute($image);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InsertCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->required()->value();
18 | $position = $this->argument(1)->type('string')->value();
19 | $x = $this->argument(2)->type('digit')->value(0);
20 | $y = $this->argument(3)->type('digit')->value(0);
21 |
22 | // build watermark
23 | $watermark = $image->getDriver()->init($source);
24 |
25 | // define insertion point
26 | $image_size = $image->getSize()->align($position, $x, $y);
27 | $watermark_size = $watermark->getSize()->align($position);
28 | $target = $image_size->relativePosition($watermark_size);
29 |
30 | // insert image at position
31 | return $image->getCore()->compositeImage($watermark->getCore(), \Imagick::COMPOSITE_DEFAULT, $target->x, $target->y);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InterlaceCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('bool')->value(true);
18 |
19 | if ($mode) {
20 | $mode = \Imagick::INTERLACE_LINE;
21 | } else {
22 | $mode = \Imagick::INTERLACE_NO;
23 | }
24 |
25 | $image->getCore()->setInterlaceScheme($mode);
26 |
27 | return true;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InvertCommand.php:
--------------------------------------------------------------------------------
1 | getCore()->negateImage(false);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/OpacityCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->between(0, 100)->required()->value();
18 |
19 | $transparency = $transparency > 0 ? (100 / $transparency) : 1000;
20 |
21 | return $image->getCore()->evaluateImage(\Imagick::EVALUATE_DIVIDE, $transparency, \Imagick::CHANNEL_ALPHA);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PickColorCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('digit')->required()->value();
19 | $y = $this->argument(1)->type('digit')->required()->value();
20 | $format = $this->argument(2)->type('string')->value('array');
21 |
22 | // pick color
23 | $color = new Color($image->getCore()->getImagePixelColor($x, $y));
24 |
25 | // format to output
26 | $this->setOutput($color->format($format));
27 |
28 | return true;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PixelCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->required()->value();
19 | $color = new Color($color);
20 | $x = $this->argument(1)->type('digit')->required()->value();
21 | $y = $this->argument(2)->type('digit')->required()->value();
22 |
23 | // prepare pixel
24 | $draw = new \ImagickDraw;
25 | $draw->setFillColor($color->getPixel());
26 | $draw->point($x, $y);
27 |
28 | // apply pixel
29 | return $image->getCore()->drawImage($draw);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PixelateCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('digit')->value(10);
18 |
19 | $width = $image->getWidth();
20 | $height = $image->getHeight();
21 |
22 | $image->getCore()->scaleImage(max(1, intval($width / $size)), max(1, intval($height / $size)));
23 | $image->getCore()->scaleImage($width, $height);
24 |
25 | return true;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResetCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->value();
19 |
20 | $backup = $image->getBackup($backupName);
21 |
22 | if ($backup instanceof \Imagick) {
23 |
24 | // destroy current core
25 | $image->getCore()->clear();
26 |
27 | // clone backup
28 | $backup = clone $backup;
29 |
30 | // reset to new resource
31 | $image->setCore($backup);
32 |
33 | return true;
34 | }
35 |
36 | throw new RuntimeException(
37 | "Backup not available. Call backup({$backupName}) before reset()."
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResizeCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->value();
18 | $height = $this->argument(1)->value();
19 | $constraints = $this->argument(2)->type('closure')->value();
20 |
21 | // resize box
22 | $resized = $image->getSize()->resize($width, $height, $constraints);
23 |
24 | // modify image
25 | $image->getCore()->scaleImage($resized->getWidth(), $resized->getHeight());
26 |
27 | return true;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/RotateCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('numeric')->required()->value();
19 | $color = $this->argument(1)->value();
20 | $color = new Color($color);
21 |
22 | // restrict rotations beyond 360 degrees, since the end result is the same
23 | $angle = fmod($angle, 360);
24 |
25 | // rotate image
26 | $image->getCore()->rotateImage($color->getPixel(), ($angle * -1));
27 |
28 | return true;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/SharpenCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->between(0, 100)->value(10);
18 |
19 | return $image->getCore()->unsharpMaskImage(1, 1, $amount / 6.25, 0);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/WidenCommand.php:
--------------------------------------------------------------------------------
1 | argument(0)->type('digit')->required()->value();
16 | $additionalConstraints = $this->argument(1)->type('closure')->value();
17 |
18 | $this->arguments[0] = $width;
19 | $this->arguments[1] = null;
20 | $this->arguments[2] = function ($constraint) use ($additionalConstraints) {
21 | $constraint->aspectRatio();
22 | if(is_callable($additionalConstraints))
23 | $additionalConstraints($constraint);
24 | };
25 |
26 | return parent::execute($image);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/CircleShape.php:
--------------------------------------------------------------------------------
1 | width = is_numeric($diameter) ? intval($diameter) : $this->diameter;
24 | $this->height = is_numeric($diameter) ? intval($diameter) : $this->diameter;
25 | $this->diameter = is_numeric($diameter) ? intval($diameter) : $this->diameter;
26 | }
27 |
28 | /**
29 | * Draw current circle on given image
30 | *
31 | * @param Image $image
32 | * @param int $x
33 | * @param int $y
34 | * @return boolean
35 | */
36 | public function applyToImage(Image $image, $x = 0, $y = 0)
37 | {
38 | return parent::applyToImage($image, $x, $y);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/Intervention/Image/Point.php:
--------------------------------------------------------------------------------
1 | x = is_numeric($x) ? intval($x) : 0;
30 | $this->y = is_numeric($y) ? intval($y) : 0;
31 | }
32 |
33 | /**
34 | * Sets X coordinate
35 | *
36 | * @param int $x
37 | */
38 | public function setX($x)
39 | {
40 | $this->x = intval($x);
41 | }
42 |
43 | /**
44 | * Sets Y coordinate
45 | *
46 | * @param int $y
47 | */
48 | public function setY($y)
49 | {
50 | $this->y = intval($y);
51 | }
52 |
53 | /**
54 | * Sets both X and Y coordinate
55 | *
56 | * @param int $x
57 | * @param int $y
58 | */
59 | public function setPosition($x, $y)
60 | {
61 | $this->setX($x);
62 | $this->setY($y);
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/vendor/intervention/image/src/config/config.php:
--------------------------------------------------------------------------------
1 | 'gd'
19 |
20 | ];
21 |
--------------------------------------------------------------------------------
/vendor/overtrue/pinyin/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: overtrue
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | custom: # Replace with a single custom sponsorship URL
10 |
--------------------------------------------------------------------------------
/vendor/overtrue/pinyin/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: composer
4 | directory: "/"
5 | schedule:
6 | interval: daily
7 | time: "21:00"
8 | open-pull-requests-limit: 10
9 | ignore:
10 | - dependency-name: phpunit/phpunit
11 | versions:
12 | - ">= 8.a, < 9"
13 |
--------------------------------------------------------------------------------
/vendor/overtrue/pinyin/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 安正超
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/vendor/overtrue/pinyin/data/surnames:
--------------------------------------------------------------------------------
1 | ' mò qí',
4 | '尉迟' => ' yù chí',
5 | '单于' => ' chán yú',
6 | '不' => ' fǒu',
7 | '沈' => ' shěn',
8 | '称' => ' chēng',
9 | '车' => ' chē',
10 | '万' => ' wàn',
11 | '汤' => ' tāng',
12 | '阿' => ' ā',
13 | '丁' => ' dīng',
14 | '强' => ' qiáng',
15 | '仇' => ' qiú',
16 | '叶' => ' yè',
17 | '阚' => ' kàn',
18 | '乐' => ' yuè',
19 | '乜' => ' niè',
20 | '陆' => ' lù',
21 | '殷' => ' yīn',
22 | '牟' => ' móu',
23 | '区' => ' ōu',
24 | '宿' => ' sù',
25 | '俞' => ' yú',
26 | '余' => ' yú',
27 | '齐' => ' qí',
28 | '许' => ' xǔ',
29 | '信' => ' xìn',
30 | '无' => ' wú',
31 | '浣' => ' wǎn',
32 | '艾' => ' ài',
33 | '浅' => ' qiǎn',
34 | '烟' => ' yān',
35 | '蓝' => ' lán',
36 | '於' => ' yú',
37 | '寻' => ' xún',
38 | '殳' => ' shū',
39 | '思' => ' sī',
40 | '鸟' => ' niǎo',
41 | '卜' => ' bǔ',
42 | '单' => ' shàn',
43 | '南' => ' nán',
44 | '柏' => ' bǎi',
45 | '朴' => ' piáo',
46 | '繁' => ' pó',
47 | '曾' => ' zēng',
48 | '瞿' => ' qú',
49 | '缪' => ' miào',
50 | '石' => ' shí',
51 | '冯' => ' féng',
52 | '覃' => ' qín',
53 | '幺' => ' yāo',
54 | '种' => ' chóng',
55 | '折' => ' shè',
56 | '燕' => ' yān',
57 | '纪' => ' jǐ',
58 | '过' => ' guō',
59 | '华' => ' huà',
60 | '冼' => ' xiǎn',
61 | '秘' => ' bì',
62 | '重' => ' chóng',
63 | '解' => ' xiè',
64 | '那' => ' nā',
65 | '和' => ' hé',
66 | '贾' => ' jiǎ',
67 | '塔' => ' tǎ',
68 | '盛' => ' shèng',
69 | '查' => ' zhā',
70 | '盖' => ' gě',
71 | '居' => ' jū',
72 | '哈' => ' hǎ',
73 | '的' => ' dē',
74 | '薄' => ' bó',
75 | '佴' => ' nài',
76 | '六' => ' lù',
77 | '都' => ' dū',
78 | '翟' => ' zhái',
79 | '扎' => ' zā',
80 | '藏' => ' zàng',
81 | '粘' => ' niàn',
82 | '难' => ' nàn',
83 | '若' => ' ruò',
84 | '貟' => ' yùn',
85 | '贠' => ' yùn',
86 | );
--------------------------------------------------------------------------------
/vendor/overtrue/pinyin/src/DictLoaderInterface.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * This source file is subject to the MIT license that is bundled
9 | * with this source code in the file LICENSE.
10 | */
11 |
12 | namespace Overtrue\Pinyin;
13 |
14 | use Closure;
15 |
16 | /**
17 | * Dict loader interface.
18 | */
19 | interface DictLoaderInterface
20 | {
21 | /**
22 | * Load dict.
23 | *
24 | *
25 | * [
26 | * '响应时间' => "[\t]xiǎng[\t]yìng[\t]shí[\t]jiān",
27 | * '长篇连载' => '[\t]cháng[\t]piān[\t]lián[\t]zǎi',
28 | * //...
29 | * ]
30 | *
31 | *
32 | * @param Closure $callback
33 | */
34 | public function map(Closure $callback);
35 |
36 | /**
37 | * Load surname dict.
38 | *
39 | * @param Closure $callback
40 | */
41 | public function mapSurname(Closure $callback);
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/overtrue/pinyin/src/FileDictLoader.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * This source file is subject to the MIT license that is bundled
9 | * with this source code in the file LICENSE.
10 | */
11 |
12 | namespace Overtrue\Pinyin;
13 |
14 | use Closure;
15 |
16 | class FileDictLoader implements DictLoaderInterface
17 | {
18 | /**
19 | * Words segment name.
20 | *
21 | * @var string
22 | */
23 | protected $segmentName = 'words_%s';
24 |
25 | /**
26 | * Dict path.
27 | *
28 | * @var string
29 | */
30 | protected $path;
31 |
32 | /**
33 | * Constructor.
34 | *
35 | * @param string $path
36 | */
37 | public function __construct($path)
38 | {
39 | $this->path = $path;
40 | }
41 |
42 | /**
43 | * Load dict.
44 | *
45 | * @param Closure $callback
46 | */
47 | public function map(Closure $callback)
48 | {
49 | for ($i = 0; $i < 100; ++$i) {
50 | $segment = $this->path . '/' . sprintf($this->segmentName, $i);
51 |
52 | if (file_exists($segment)) {
53 | $dictionary = (array) include $segment;
54 | $callback($dictionary);
55 | }
56 | }
57 | }
58 |
59 | /**
60 | * Load surname dict.
61 | *
62 | * @param Closure $callback
63 | */
64 | public function mapSurname(Closure $callback)
65 | {
66 | $surnames = $this->path . '/surnames';
67 |
68 | if (file_exists($surnames)) {
69 | $dictionary = (array) include $surnames;
70 | $callback($dictionary);
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/vendor/overtrue/pinyin/src/const.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * This source file is subject to the MIT license that is bundled
9 | * with this source code in the file LICENSE.
10 | */
11 |
12 | define('PINYIN_DEFAULT', 4096);
13 | define('PINYIN_TONE', 2);
14 | define('PINYIN_NO_TONE', 4);
15 | define('PINYIN_ASCII_TONE', 8);
16 | define('PINYIN_NAME', 16);
17 | define('PINYIN_KEEP_NUMBER', 32);
18 | define('PINYIN_KEEP_ENGLISH', 64);
19 | define('PINYIN_UMLAUT_V', 128);
20 | define('PINYIN_KEEP_PUNCTUATION', 256);
21 |
--------------------------------------------------------------------------------
/vendor/psr/http-client/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to this project will be documented in this file, in reverse chronological order by release.
4 |
5 | ## 1.0.3
6 |
7 | Add `source` link in composer.json. No code changes.
8 |
9 | ## 1.0.2
10 |
11 | Allow PSR-7 (psr/http-message) 2.0. No code changes.
12 |
13 | ## 1.0.1
14 |
15 | Allow installation with PHP 8. No code changes.
16 |
17 | ## 1.0.0
18 |
19 | First stable release. No changes since 0.3.0.
20 |
21 | ## 0.3.0
22 |
23 | Added Interface suffix on exceptions
24 |
25 | ## 0.2.0
26 |
27 | All exceptions are in `Psr\Http\Client` namespace
28 |
29 | ## 0.1.0
30 |
31 | First release
32 |
--------------------------------------------------------------------------------
/vendor/psr/http-client/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2017 PHP Framework Interoperability Group
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/psr/http-client/README.md:
--------------------------------------------------------------------------------
1 | HTTP Client
2 | ===========
3 |
4 | This repository holds all the common code related to [PSR-18 (HTTP Client)][psr-url].
5 |
6 | Note that this is not a HTTP Client implementation of its own. It is merely abstractions that describe the components of a HTTP Client.
7 |
8 | The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist.
9 |
10 | [psr-url]: https://www.php-fig.org/psr/psr-18
11 | [package-url]: https://packagist.org/packages/psr/http-client
12 | [implementation-url]: https://packagist.org/providers/psr/http-client-implementation
13 |
--------------------------------------------------------------------------------
/vendor/psr/http-client/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "psr/http-client",
3 | "description": "Common interface for HTTP clients",
4 | "keywords": ["psr", "psr-18", "http", "http-client"],
5 | "homepage": "https://github.com/php-fig/http-client",
6 | "license": "MIT",
7 | "authors": [
8 | {
9 | "name": "PHP-FIG",
10 | "homepage": "https://www.php-fig.org/"
11 | }
12 | ],
13 | "support": {
14 | "source": "https://github.com/php-fig/http-client"
15 | },
16 | "require": {
17 | "php": "^7.0 || ^8.0",
18 | "psr/http-message": "^1.0 || ^2.0"
19 | },
20 | "autoload": {
21 | "psr-4": {
22 | "Psr\\Http\\Client\\": "src/"
23 | }
24 | },
25 | "extra": {
26 | "branch-alias": {
27 | "dev-master": "1.0.x-dev"
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/psr/http-client/src/ClientExceptionInterface.php:
--------------------------------------------------------------------------------
1 | =7.0.0",
23 | "psr/http-message": "^1.0 || ^2.0"
24 | },
25 | "autoload": {
26 | "psr-4": {
27 | "Psr\\Http\\Message\\": "src/"
28 | }
29 | },
30 | "extra": {
31 | "branch-alias": {
32 | "dev-master": "1.0.x-dev"
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/psr/http-factory/src/RequestFactoryInterface.php:
--------------------------------------------------------------------------------
1 | = 5.3.
5 |
6 | [](https://travis-ci.org/ralouphie/getallheaders)
7 | [](https://coveralls.io/r/ralouphie/getallheaders?branch=master)
8 | [](https://packagist.org/packages/ralouphie/getallheaders)
9 | [](https://packagist.org/packages/ralouphie/getallheaders)
10 | [](https://packagist.org/packages/ralouphie/getallheaders)
11 |
12 |
13 | This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php).
14 |
15 | ## Install
16 |
17 | For PHP version **`>= 5.6`**:
18 |
19 | ```
20 | composer require ralouphie/getallheaders
21 | ```
22 |
23 | For PHP version **`< 5.6`**:
24 |
25 | ```
26 | composer require ralouphie/getallheaders "^2"
27 | ```
28 |
--------------------------------------------------------------------------------
/vendor/ralouphie/getallheaders/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ralouphie/getallheaders",
3 | "description": "A polyfill for getallheaders.",
4 | "license": "MIT",
5 | "authors": [
6 | {
7 | "name": "Ralph Khattar",
8 | "email": "ralph.khattar@gmail.com"
9 | }
10 | ],
11 | "require": {
12 | "php": ">=5.6"
13 | },
14 | "require-dev": {
15 | "phpunit/phpunit": "^5 || ^6.5",
16 | "php-coveralls/php-coveralls": "^2.1"
17 | },
18 | "autoload": {
19 | "files": ["src/getallheaders.php"]
20 | },
21 | "autoload-dev": {
22 | "psr-4": {
23 | "getallheaders\\Tests\\": "tests/"
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/ralouphie/getallheaders/src/getallheaders.php:
--------------------------------------------------------------------------------
1 | 'Content-Type',
16 | 'CONTENT_LENGTH' => 'Content-Length',
17 | 'CONTENT_MD5' => 'Content-Md5',
18 | );
19 |
20 | foreach ($_SERVER as $key => $value) {
21 | if (substr($key, 0, 5) === 'HTTP_') {
22 | $key = substr($key, 5);
23 | if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {
24 | $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));
25 | $headers[$key] = $value;
26 | }
27 | } elseif (isset($copy_server[$key])) {
28 | $headers[$copy_server[$key]] = $value;
29 | }
30 | }
31 |
32 | if (!isset($headers['Authorization'])) {
33 | if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
34 | $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
35 | } elseif (isset($_SERVER['PHP_AUTH_USER'])) {
36 | $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';
37 | $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);
38 | } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {
39 | $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];
40 | }
41 | }
42 |
43 | return $headers;
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/symfony/deprecation-contracts/.gitignore:
--------------------------------------------------------------------------------
1 | vendor/
2 | composer.lock
3 | phpunit.xml
4 |
--------------------------------------------------------------------------------
/vendor/symfony/deprecation-contracts/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | CHANGELOG
2 | =========
3 |
4 | The changelog is maintained for all Symfony contracts at the following URL:
5 | https://github.com/symfony/contracts/blob/main/CHANGELOG.md
6 |
--------------------------------------------------------------------------------
/vendor/symfony/deprecation-contracts/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2020-2022 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/symfony/deprecation-contracts/README.md:
--------------------------------------------------------------------------------
1 | Symfony Deprecation Contracts
2 | =============================
3 |
4 | A generic function and convention to trigger deprecation notices.
5 |
6 | This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices.
7 |
8 | By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component,
9 | the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments.
10 |
11 | The function requires at least 3 arguments:
12 | - the name of the Composer package that is triggering the deprecation
13 | - the version of the package that introduced the deprecation
14 | - the message of the deprecation
15 | - more arguments can be provided: they will be inserted in the message using `printf()` formatting
16 |
17 | Example:
18 | ```php
19 | trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin');
20 | ```
21 |
22 | This will generate the following message:
23 | `Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.`
24 |
25 | While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty
26 | `function trigger_deprecation() {}` in your application.
27 |
--------------------------------------------------------------------------------
/vendor/symfony/deprecation-contracts/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/deprecation-contracts",
3 | "type": "library",
4 | "description": "A generic function and convention to trigger deprecation notices",
5 | "homepage": "https://symfony.com",
6 | "license": "MIT",
7 | "authors": [
8 | {
9 | "name": "Nicolas Grekas",
10 | "email": "p@tchwork.com"
11 | },
12 | {
13 | "name": "Symfony Community",
14 | "homepage": "https://symfony.com/contributors"
15 | }
16 | ],
17 | "require": {
18 | "php": ">=8.0.2"
19 | },
20 | "autoload": {
21 | "files": [
22 | "function.php"
23 | ]
24 | },
25 | "minimum-stability": "dev",
26 | "extra": {
27 | "branch-alias": {
28 | "dev-main": "3.0-dev"
29 | },
30 | "thanks": {
31 | "name": "symfony/contracts",
32 | "url": "https://github.com/symfony/contracts"
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/symfony/deprecation-contracts/function.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | if (!function_exists('trigger_deprecation')) {
13 | /**
14 | * Triggers a silenced deprecation notice.
15 | *
16 | * @param string $package The name of the Composer package that is triggering the deprecation
17 | * @param string $version The version of the package that introduced the deprecation
18 | * @param string $message The message of the deprecation
19 | * @param mixed ...$args Values to insert in the message using printf() formatting
20 | *
21 | * @author Nicolas Grekas
22 | */
23 | function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void
24 | {
25 | @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------