diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2020-12-27 20:48:18 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2020-12-27 20:48:18 +0000 |
| commit | 708e66987f7d6eed5675fea31f4074192e368cac (patch) | |
| tree | ca0b7bee3559b669774d0a62bf4b17bab3869be0 /vendor/league | |
| parent | befb078ac49853bab3cf5a7e795637fe7911cedb (diff) | |
| download | webtrees-708e66987f7d6eed5675fea31f4074192e368cac.tar.gz webtrees-708e66987f7d6eed5675fea31f4074192e368cac.tar.bz2 webtrees-708e66987f7d6eed5675fea31f4074192e368cac.zip | |
Remove old dependency - league/glide
Diffstat (limited to 'vendor/league')
128 files changed, 0 insertions, 9988 deletions
diff --git a/vendor/league/glide/.gitattributes b/vendor/league/glide/.gitattributes deleted file mode 100644 index 2125666142..0000000000 --- a/vendor/league/glide/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text=auto
\ No newline at end of file diff --git a/vendor/league/glide/.gitignore b/vendor/league/glide/.gitignore deleted file mode 100644 index 470f4ec5f7..0000000000 --- a/vendor/league/glide/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -build -vendor -docs/_site
\ No newline at end of file diff --git a/vendor/league/glide/.scrutinizer.yml b/vendor/league/glide/.scrutinizer.yml deleted file mode 100644 index 88057b5cde..0000000000 --- a/vendor/league/glide/.scrutinizer.yml +++ /dev/null @@ -1,35 +0,0 @@ -filter: - paths: [src/*] - excluded_paths: [tests/*] -checks: - php: - code_rating: true - remove_extra_empty_lines: true - remove_php_closing_tag: true - remove_trailing_whitespace: true - fix_use_statements: - remove_unused: true - preserve_multiple: false - preserve_blanklines: true - order_alphabetically: true - fix_php_opening_tag: true - fix_linefeed: true - fix_line_ending: true - fix_identation_4spaces: true - fix_doc_comments: true -tools: - external_code_coverage: - timeout: 600 - runs: 3 - php_code_coverage: false - php_code_sniffer: - config: - standard: PSR2 - filter: - paths: ['src'] - php_loc: - enabled: true - excluded_dirs: [vendor, test] - php_cpd: - enabled: true - excluded_dirs: [vendor, test]
\ No newline at end of file diff --git a/vendor/league/glide/.travis.yml b/vendor/league/glide/.travis.yml deleted file mode 100644 index 696cc1038c..0000000000 --- a/vendor/league/glide/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: php - -sudo: false - -env: - - COMPOSER_OPTS="" - - COMPOSER_OPTS="--prefer-lowest" - -php: - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - -cache: - directories: - - $HOME/.composer/cache - -before_install: - - travis_retry composer self-update - -install: - - travis_retry composer update --no-interaction --prefer-source - -script: - - phpunit --coverage-text --coverage-clover=coverage.clover - -after_script: - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover coverage.clover diff --git a/vendor/league/glide/CHANGELOG.md b/vendor/league/glide/CHANGELOG.md deleted file mode 100644 index 9309bfc980..0000000000 --- a/vendor/league/glide/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -# Changelog - -All notable changes to Glide can be found on [GitHub](https://github.com/thephpleague/glide/releases). diff --git a/vendor/league/glide/CONTRIBUTING.md b/vendor/league/glide/CONTRIBUTING.md deleted file mode 100644 index 2a09effe66..0000000000 --- a/vendor/league/glide/CONTRIBUTING.md +++ /dev/null @@ -1,23 +0,0 @@ -# Contributing - -Contributions are **welcome** and will be fully **credited**. - -We accept contributions via Pull Requests on [Github](https://github.com/thephpleague/glide). - -## Pull Requests - -- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer). -- **Add tests!** - Your patch won't be accepted if it doesn't have tests. -- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. -- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. -- **Create feature branches** - Don't ask us to pull from your master branch. -- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. -- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting. - -## Running Tests - -``` bash -$ phpunit -``` - -**Happy coding**!
\ No newline at end of file diff --git a/vendor/league/glide/LICENSE b/vendor/league/glide/LICENSE deleted file mode 100644 index ccd616f9bf..0000000000 --- a/vendor/league/glide/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jonathan Reinink <jonathan@reinink.ca> - -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.
\ No newline at end of file diff --git a/vendor/league/glide/README.md b/vendor/league/glide/README.md deleted file mode 100644 index 2c37116828..0000000000 --- a/vendor/league/glide/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# Glide - -[](https://twitter.com/reinink) -[](https://github.com/thephpleague/glide) -[](https://github.com/thephpleague/glide/releases) -[](https://github.com/thephpleague/glide/blob/master/LICENSE) -[](https://travis-ci.org/thephpleague/glide) -[](http://hhvm.h4cc.de/package/league/glide) -[](https://scrutinizer-ci.com/g/thephpleague/glide/code-structure) -[](https://scrutinizer-ci.com/g/thephpleague/glide) -[](https://packagist.org/packages/league/glide) - -Glide is a wonderfully easy on-demand image manipulation library written in PHP. Its straightforward API is exposed via HTTP, similar to cloud image processing services like [Imgix](http://www.imgix.com/) and [Cloudinary](http://cloudinary.com/). Glide leverages powerful libraries like [Intervention Image](http://image.intervention.io/) (for image handling and manipulation) and [Flysystem](http://flysystem.thephpleague.com/) (for file system abstraction). - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=1000) -> © Photo Joel Reynolds - -## Highlights - -- Adjust, resize and add effects to images using a simple HTTP based API. -- Manipulated images are automatically cached and served with far-future expires headers. -- Create your own image processing server or integrate Glide directly into your app. -- Supports both the [GD](http://php.net/manual/en/book.image.php) library and the [Imagick](http://php.net/manual/en/book.imagick.php) PHP extension. -- Supports many response methods, including PSR-7, HttpFoundation and more. -- Ability to secure image URLs using HTTP signatures. -- Works with many different file systems, thanks to the [Flysystem](http://flysystem.thephpleague.com/) library. -- Powered by the battle tested [Intervention Image](http://image.intervention.io/) image handling and manipulation library. -- Framework-agnostic, will work with any project. -- Composer ready and PSR-2 compliant. - -## Documentation - -Full documentation can be found at [glide.thephpleague.com](http://glide.thephpleague.com). - -## Installation - -Glide is available via Composer: - -```bash -$ composer require league/glide -``` - -## Testing - -Glide has a [PHPUnit](https://phpunit.de/) test suite. To run the tests, run the following command from the project folder: - -```bash -$ phpunit -``` -## Contributing - -Contributions are welcome and will be fully credited. Please see [CONTRIBUTING](https://github.com/thephpleague/glide/blob/master/CONTRIBUTING.md) for details. - -## Security - -If you discover any security related issues, please email jonathan@reinink.ca instead of using the issue tracker. - -## Credits - -- [Jonathan Reinink](https://github.com/reinink) -- [All Contributors](https://github.com/thephpleague/glide/contributors) - -## License - -The MIT License (MIT). Please see [LICENSE](https://github.com/thephpleague/glide/blob/master/LICENSE) for more information. diff --git a/vendor/league/glide/composer.json b/vendor/league/glide/composer.json deleted file mode 100644 index 623c28da0c..0000000000 --- a/vendor/league/glide/composer.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "league/glide", - "description": "Wonderfully easy on-demand image manipulation library with an HTTP based API.", - "keywords": [ - "league", - "image", - "processing", - "manipulation", - "editing", - "gd", - "imagemagick", - "imagick" - ], - "homepage": "http://glide.thephpleague.com", - "license": "MIT", - "authors" : [ - { - "name": "Jonathan Reinink", - "email": "jonathan@reinink.ca", - "homepage": "http://reinink.ca" - } - ], - "require": { - "intervention/image": "^2.4", - "league/flysystem": "^1.0", - "php": "^5.5 | ^7.0", - "psr/http-message": "^1.0" - }, - "require-dev": { - "mockery/mockery": "~0.9", - "phpunit/php-token-stream": "^1.4", - "phpunit/phpunit": "~4.4" - }, - "autoload": { - "psr-4": { - "League\\Glide\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - } -} diff --git a/vendor/league/glide/composer.lock b/vendor/league/glide/composer.lock deleted file mode 100644 index 30f6fb522d..0000000000 --- a/vendor/league/glide/composer.lock +++ /dev/null @@ -1,1626 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "2f78ba825509d18be91a4472854b71f7", - "packages": [ - { - "name": "guzzlehttp/psr7", - "version": "1.5.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "9f83dded91781a01c63574e387eaa769be769115" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", - "reference": "9f83dded91781a01c63574e387eaa769be769115", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2018-12-04T20:46:45+00:00" - }, - { - "name": "intervention/image", - "version": "2.4.2", - "source": { - "type": "git", - "url": "https://github.com/Intervention/image.git", - "reference": "e82d274f786e3d4b866a59b173f42e716f0783eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Intervention/image/zipball/e82d274f786e3d4b866a59b173f42e716f0783eb", - "reference": "e82d274f786e3d4b866a59b173f42e716f0783eb", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "guzzlehttp/psr7": "~1.1", - "php": ">=5.4.0" - }, - "require-dev": { - "mockery/mockery": "~0.9.2", - "phpunit/phpunit": "^4.8 || ^5.7" - }, - "suggest": { - "ext-gd": "to use GD library based image processing.", - "ext-imagick": "to use Imagick based image processing.", - "intervention/imagecache": "Caching extension for the Intervention Image library" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - }, - "laravel": { - "providers": [ - "Intervention\\Image\\ImageServiceProvider" - ], - "aliases": { - "Image": "Intervention\\Image\\Facades\\Image" - } - } - }, - "autoload": { - "psr-4": { - "Intervention\\Image\\": "src/Intervention/Image" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Oliver Vogel", - "email": "oliver@olivervogel.com", - "homepage": "http://olivervogel.com/" - } - ], - "description": "Image handling and manipulation library with support for Laravel integration", - "homepage": "http://image.intervention.io/", - "keywords": [ - "gd", - "image", - "imagick", - "laravel", - "thumbnail", - "watermark" - ], - "time": "2018-05-29T14:19:03+00:00" - }, - { - "name": "league/flysystem", - "version": "1.0.49", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "a63cc83d8a931b271be45148fa39ba7156782ffd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a63cc83d8a931b271be45148fa39ba7156782ffd", - "reference": "a63cc83d8a931b271be45148fa39ba7156782ffd", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "php": ">=5.5.9" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" - }, - "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" - }, - "suggest": { - "ext-fileinfo": "Required for MimeType", - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Flysystem\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Filesystem abstraction: Many filesystems, one API.", - "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", - "copy.com", - "dropbox", - "file systems", - "files", - "filesystem", - "filesystems", - "ftp", - "rackspace", - "remote", - "s3", - "sftp", - "storage" - ], - "time": "2018-11-23T23:41:29+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "ralouphie/getallheaders", - "version": "2.0.5", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", - "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "require-dev": { - "phpunit/phpunit": "~3.7.0", - "satooshi/php-coveralls": ">=1.0" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "time": "2016-02-11T07:05:27+00:00" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2017-07-22T11:58:36+00:00" - }, - { - "name": "hamcrest/hamcrest-php", - "version": "v1.2.2", - "source": { - "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "1.3.3", - "satooshi/php-coveralls": "dev-master" - }, - "type": "library", - "autoload": { - "classmap": [ - "hamcrest" - ], - "files": [ - "hamcrest/Hamcrest.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" - ], - "time": "2015-05-11T14:41:42+00:00" - }, - { - "name": "mockery/mockery", - "version": "0.9.10", - "source": { - "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "4876fc0c7d9e5da49712554a35c94d84ed1e9ee5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/4876fc0c7d9e5da49712554a35c94d84ed1e9ee5", - "reference": "4876fc0c7d9e5da49712554a35c94d84ed1e9ee5", - "shasum": "" - }, - "require": { - "hamcrest/hamcrest-php": "~1.1", - "lib-pcre": ">=7.0", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.9.x-dev" - } - }, - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/padraic/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "time": "2018-11-13T20:50:16+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2017-09-11T18:02:19+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2017-07-14T14:27:02+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.8.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", - "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2018-08-05T17:53:17+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-10-06T15:47:00+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2017-11-27T13:52:08+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2017-02-26T11:10:40+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.12", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2017-12-04T08:55:13+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "4.8.36", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.8.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2017-06-21T08:07:12+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-10-02T06:51:40+00:00" - }, - { - "name": "sebastian/comparator", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2017-01-29T09:50:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "1.4.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2017-05-22T07:24:03+00:00" - }, - { - "name": "sebastian/environment", - "version": "1.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2016-08-18T05:49:44+00:00" - }, - { - "name": "sebastian/exporter", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2016-06-17T09:04:28+00:00" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2015-10-12T03:26:01+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03T07:41:43+00:00" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21T13:59:46+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.10.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - }, - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "time": "2018-08-06T14:22:27+00:00" - }, - { - "name": "symfony/yaml", - "version": "v3.4.20", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "291e13d808bec481eab83f301f7bff3e699ef603" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/291e13d808bec481eab83f301f7bff3e699ef603", - "reference": "291e13d808bec481eab83f301f7bff3e699ef603", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/console": "<3.4" - }, - "require-dev": { - "symfony/console": "~3.4|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2018-11-11T19:48:54+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2018-01-29T19:49:41+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^5.4 | ^7.0" - }, - "platform-dev": [] -} diff --git a/vendor/league/glide/docs/0.3/_data/project.yml b/vendor/league/glide/docs/0.3/_data/project.yml deleted file mode 100644 index 6bd70253af..0000000000 --- a/vendor/league/glide/docs/0.3/_data/project.yml +++ /dev/null @@ -1 +0,0 @@ -title: TEST
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/api/adjustments.md b/vendor/league/glide/docs/0.3/api/adjustments.md deleted file mode 100644 index a4cdf13937..0000000000 --- a/vendor/league/glide/docs/0.3/api/adjustments.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -layout: default -title: Adjustments ---- - -# Adjustments - -## Brightness `bri` - -Adjusts the image brightness. Use values between `-100` and `+100`, where `0` represents no change. - -~~~ html -<img src="kayaks.jpg?w=500&bri=-25"> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=500&bri=-25) - -## Contrast `con` - -Adjusts the image contrast. Use values between `-100` and `+100`, where `0` represents no change. - -~~~ html -<img src="kayaks.jpg?w=500&con=25"> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=500&con=25) - -## Gamma `gam` - -Adjusts the image gamma. Use values between `0.1` and `9.99`. - -~~~ html -<img src="kayaks.jpg?w=500&gam=1.5"> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=500&gam=1.5) - -## Sharpen `sharp` - -Sharpen the image. Use values between `0` and `100`. - -~~~ html -<img src="kayaks.jpg?w=500&sharp=15"> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=500&sharp=15)
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/api/effects.md b/vendor/league/glide/docs/0.3/api/effects.md deleted file mode 100644 index 415ce5fc3f..0000000000 --- a/vendor/league/glide/docs/0.3/api/effects.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: default -title: Effects ---- - -# Effects - -## Blur `blur` - -Adds a blur effect to the image. Use values between `0` and `100`. - -~~~ html -<img src="kayaks.jpg?w=500&blur=5> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=500&blur=5) - -<p class="message-notice">Performance intensive on larger amounts of blur with GD driver. Use with care.</p> - -## Pixelate `pixel` - -Applies a pixelation effect to the image. Use values between `0` and `1000`. - -~~~ html -<img src="kayaks.jpg?w=500&pixel=5> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=500&pixel=5) - -## Filter `filt` - -Applies a filter effect to the image. Accepts `greyscale` or `sepia`. - -~~~ html -<img src="kayaks.jpg?w=500&filt=sepia> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=500&filt=sepia)
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/api/output.md b/vendor/league/glide/docs/0.3/api/output.md deleted file mode 100644 index 4bd2dff59d..0000000000 --- a/vendor/league/glide/docs/0.3/api/output.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -layout: default -title: Output ---- - -# Output - -## Quality `q` - -Defines the quality of the image. Use values between `0` and `100`. Defaults to `90`. Only relevant if the format is set to `jpg`. - -~~~ html -<img src="kayaks.jpg?w=500&q=25> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=500&q=25) - - -## Format `fm` - -Encodes the image to a specific format. Accepts `jpg`, `png` or `gif`. Defaults to `jpg`. - -~~~ html -<img src="kayaks.jpg?w=500&fm=gif> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=500&fm=gif)
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/api/size.md b/vendor/league/glide/docs/0.3/api/size.md deleted file mode 100644 index b4fd1f3751..0000000000 --- a/vendor/league/glide/docs/0.3/api/size.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -layout: default -title: Size ---- - -# Size - -## Width `w` - -Sets the width of the image, in pixels. - -~~~ html -<img src="kayaks.jpg?w=500"> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=500) - -## Height `h` - -Sets the height of the image, in pixels. - -~~~ html -<img src="kayaks.jpg?h=333"> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?h=333) - -## Fit `fit` - -Sets how the image is fitted to its target dimensions. - -### Accepts: - -- `contain`: Default. Resizes the image to fit within the width and height boundaries without cropping, distorting or altering the aspect ratio. -- `max`: Resizes the image to fit within the width and height boundaries without cropping, distorting or altering the aspect ratio, and will also not increase the size of the image if it is smaller than the output size. -- `stretch`: Stretches the image to fit the constraining dimensions exactly. The resulting image will fill the dimensions, and will not maintain the aspect ratio of the input image. -- `crop`: Resizes the image to fill the width and height boundaries and crops any excess image data. The resulting image will match the width and height constraints without distorting the image. See the `crop` parameter for controlling how the image is cropped. - -~~~ html -<img src="kayaks.jpg?w=300&h=300&fit=crop"> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=300&h=300&fit=crop) - -## Crop Mode `crop` - -Sets where the image is cropped when the `fit` parameter is set to `crop`. Accepts `top-left`, `top`, `top-right`, `left`, `center`, `right`, `bottom-left`, `bottom` or `bottom-right`. Default is `center`. - -~~~ html -<img src="kayaks.jpg?w=300&h=300&fit=crop&crop=left"> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=300&h=300&fit=crop&crop=left) - -## Rectangle `rect` - -Crops the image to specific dimensions prior to any other resize operations. Required format: `width,height,x,y`. - -~~~ html -<img src="kayaks.jpg?rect=100,100,915,155"> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?rect=100,100,915,155) - - -## Orientation `or` - -Rotates the image. Accepts `auto`, `0`, `90`, `180` or `270`. Default is `auto`. The `auto` option uses Exif data to automatically orient images correctly. - -~~~ html -<img src="kayaks.jpg?h=500&or=90"> -~~~ - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?h=500&or=90)
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/changelog.md b/vendor/league/glide/docs/0.3/changelog.md deleted file mode 100644 index 52adaac902..0000000000 --- a/vendor/league/glide/docs/0.3/changelog.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: default -title: Changelog ---- - -# Changelog - -All notable changes to Glide will be documented in this file. - -{% for release in site.github.releases %} -## [{{ release.name }}]({{ release.html_url }}) - {{ release.published_at | date: "%Y-%m-%d" }} -{{ release.body | markdownify }} -{% endfor %}
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/config/base-url.md b/vendor/league/glide/docs/0.3/config/base-url.md deleted file mode 100644 index a99b131f98..0000000000 --- a/vendor/league/glide/docs/0.3/config/base-url.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -layout: default -title: Base URL ---- - -# Base URL - -It's common to route all images under the path `/img/`. However, since Glide maps image request paths directly to the image source paths, you would have to have an `/img/` folder in your source location as well. For example: - -~~~ js -'http://example.com/img/kayaks.jpg' => '/path/to/source/img/kayaks.jpg' -'http://example.com/img/users/jonathan.jpg' => '/path/to/source/img/users/jonathan.jpg' -~~~ - -Since this isn't ideal, Glide allows you to define a `base_url` which is omitted from the source path. - -## Set the base URL - -~~~ php -<?php - -// Set using factory -$server = League\Glide\ServerFactory::create([ - 'base_url' => '/img/', -]); - -// Set using setter method -$server->setBaseUrl('/img/'); -~~~ - -With the base URL configured, the new image source paths will no longer include `/img/`. - -~~~ js -'http://example.com/img/kayaks.jpg' => '/path/to/source/kayaks.jpg' -'http://example.com/img/users/jonathan.jpg' => '/path/to/source/users/jonathan.jpg' -~~~
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/config/basic-usage.md b/vendor/league/glide/docs/0.3/config/basic-usage.md deleted file mode 100644 index 1392fd2b47..0000000000 --- a/vendor/league/glide/docs/0.3/config/basic-usage.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: default -title: Basic usage ---- - -# Basic usage - -Once your [Glide server](/config/the-server/) is configured, there are a number of methods available to interact with it. For basic setups you'll likely only need the `outputImage()` method. However, if you plan to use Glide with a queuing server or in other more complex configurations, these methods will be useful. - -## Available methods - -~~~ php -<?php - -$server->getSourcePath(); // Get the source path -$server->getCachePath(); // Get the cache path -$server->sourceFileExists(); // Check if a source file exists -$server->cacheFileExists(); // Check if a cache file exists -$server->outputImage(); // Generate and output manipulated image -$server->getImageResponse(); // Generate and return response object of manipulated image -$server->makeImage(); // Generate manipulated image -~~~ - -## Accepted method parameters - -All of the above methods will accept an instance of the `Symfony\Component\HttpFoundation\Request` class. However, sometimes it's desirable to manually pass the image path and manipulation parameters. Glide makes this easy by also allowing you to pass a `$path` and `$params` combination to the above methods. Consider the following example: - -~~~ php -<?php - -Route::get('img/users/{id}/small', function($id) use ($server) { - $server->outputImage( - '/users/' . $id . '.jpg', - [ - 'w' => 300, - 'h' => 400, - 'fit' => 'crop', - ] - ); -}); -~~~
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/config/image-driver.md b/vendor/league/glide/docs/0.3/config/image-driver.md deleted file mode 100644 index f2f40e25c4..0000000000 --- a/vendor/league/glide/docs/0.3/config/image-driver.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -layout: default -title: Image driver ---- - -# Image driver - -By default Glide uses the [GD](http://php.net/manual/en/book.image.php) library. However you can also use Glide with [ImageMagick](http://www.imagemagick.org/) if the [Imagick](http://php.net/manual/en/book.imagick.php) PHP extension is installed. - -~~~ php -<?php - -$server = League\Glide\ServerFactory::create([ - 'driver' => 'imagick', -]); -~~~
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/config/max-image-size.md b/vendor/league/glide/docs/0.3/config/max-image-size.md deleted file mode 100644 index b00a896da3..0000000000 --- a/vendor/league/glide/docs/0.3/config/max-image-size.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -layout: default -title: Max image size ---- - -# Max image size - -In addition to [securing images](/config/secure-images/) with a signing key, you can also limit how large images can be generated. The following setting will set the maximum allowed total image size, in pixels. - -~~~ php -<?php - -$server = League\Glide\ServerFactory::create([ - 'max_image_size' => 2000*2000, -]); -~~~ - -Notice that Glide doesn't actually restrict the width or height, but rather the total image size. In the above example it would be `4000000px`. This accomplishes the exact same thing, while offering more flexibility with your image sizes.
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/config/secure-images.md b/vendor/league/glide/docs/0.3/config/secure-images.md deleted file mode 100644 index e195ee011e..0000000000 --- a/vendor/league/glide/docs/0.3/config/secure-images.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -layout: default -title: Secure images ---- - -# Secure images - -Add additional security to your Glide image server with HTTP signatures. By signing each request with a private key, no alterations can be made to the URL parameters. - -<p class="message-notice">It is highly recommended that you use secure URLs in production environments.</p> - -## Configuration - -Start by configuring the Glide server to validate each request before you ouput the image. In the event that the validation fails, Glide will throw an `SignatureException` exception. - -~~~ php -<?php - -use League\Glide\Http\SignatureFactory; -use League\Glide\Http\SignatureException; -use Symfony\Component\HttpFoundation\Request; - -// Create request object -$request = Request::createFromGlobals(); - -// Validate HTTP signature -try { - SignatureFactory::create('your-sign-key')->validateRequest($request); -} catch (SignatureException $e) { - // Handle error -} -~~~ - -## Generating secure URLs - -Next, generate a signature for each image request you make. Glide comes with a URL builder to make this process easy. Be sure to use the same signing key you configured earlier. - -~~~ php -<?php - -use League\Glide\Http\UrlBuilderFactory; - -// Create an instance of the URL builder -$urlBuilder = UrlBuilderFactory::create('http://example.com', 'your-sign-key'); - -// Generate a URL -$url = $urlBuilder->getUrl('cat.jpg', ['w' => 500]); - -// Use the URL in your app -echo '<img src="'.$url.'">'; - -// Prints out -<img src="http://example.com/img/cat.jpg?w=500&token=af3dc18fc6bfb2afb521e587c348b904"> -~~~
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/config/source-and-cache.md b/vendor/league/glide/docs/0.3/config/source-and-cache.md deleted file mode 100644 index 92c84ff8d6..0000000000 --- a/vendor/league/glide/docs/0.3/config/source-and-cache.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -layout: default -title: Source & cache ---- - -# Source & cache - -Glide makes it possible to access images stored in a variety of file systems. It does this using the [Flysystem](http://flysystem.thephpleague.com/) file system abstraction library. For example, you may choose to store your source images on [Amazon S3](http://aws.amazon.com/s3/), but keep your rendered images (the cache) on the local disk. - -## Setup using Flysystem - -To set your source and cache locations, simply pass an instance of `League\Flysystem\Filesystem` for each. See the Flysystem [website](http://flysystem.thephpleague.com/) for a complete list of available adapters. - -~~~ php -<?php - -use League\Flysystem\Adapter\Local; -use League\Flysystem\Filesystem; -use League\Glide\ServerFactory; - -// Setup Glide server -$server = ServerFactory::create([ - 'source' => new Filesystem(new Local('path/to/source/folder')), - 'cache' => new Filesystem(new Local('path/to/cache/folder')), -]); -~~~ - -## Setup using local disk - -Alternatively, if you are only using the local disk, you can simply provide the paths as a string. - -~~~ php -<?php - -$server = League\Glide\ServerFactory::create([ - 'source' => 'path/to/source/folder', - 'cache' => 'path/to/cache/folder', -]); -~~~ - -## Set default path prefix - -While it's normally possible to set the full source and cache path using Flysystem, there are situations where it may be desirable to set a default path prefix. For example, when only one instance of the `Filesystem` is available. - -~~~ php -<?php - -// Set using factory -$server = League\Glide\ServerFactory::create([ - 'source' => $filesystem, - 'cache' => $filesystem, - 'source_path_prefix' => 'source', - 'cache_path_prefix' => 'cache', -]); - -// Set using setter methods -$server->setSourcePathPrefix('source'); -$server->setCachePathPrefix('cache'); -~~~
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/config/the-server.md b/vendor/league/glide/docs/0.3/config/the-server.md deleted file mode 100644 index aebd934e1c..0000000000 --- a/vendor/league/glide/docs/0.3/config/the-server.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -layout: default -title: The server ---- - -# The server - -All the Glide configuration is managed through a central object called the `Server`. This includes the image [source location](/config/source-and-cache/) (where the original images are saved), the image [cache location](/config/source-and-cache/) (where the manipulated images are saved), the image manipulation API as well as any configuration options. - -## Setup with factory - -The easiest way to configure the `Server` is using the supplied factory. - -~~~ php -<?php - -$server = League\Glide\ServerFactory::create([ - 'source' => 'path/to/source/folder', - 'cache' => 'path/to/cache/folder', -]); -~~~ - -## Setup manually - -You can also choose to instantiate the `Server` object manually. This allows finer control over what dependencies are being used. For example, if you wanted to add additional functionality to the API, you could load custom manipulators in addition to those provided with Glide. - -~~~ php -<?php - -// Set image source -$source = new League\Flysystem\Filesystem( - new League\Flysystem\Adapter\Local('path/to/source/folder') -); - -// Set image cache -$cache = new League\Flysystem\Filesystem( - new League\Flysystem\Adapter\Local('path/to/cache/folder') -); - -// Set image manager -$imageManager = new Intervention\Image\ImageManager([ - 'driver' => 'imagick', -]); - -// Set manipulators -$manipulators = [ - new League\Glide\Api\Manipulator\Orientation(), - new League\Glide\Api\Manipulator\Rectangle(), - new League\Glide\Api\Manipulator\Size(2000*2000), - new League\Glide\Api\Manipulator\Brightness(), - new League\Glide\Api\Manipulator\Contrast(), - new League\Glide\Api\Manipulator\Gamma(), - new League\Glide\Api\Manipulator\Sharpen(), - new League\Glide\Api\Manipulator\Filter(), - new League\Glide\Api\Manipulator\Blur(), - new League\Glide\Api\Manipulator\Pixelate(), - new League\Glide\Api\Manipulator\Output(), -]; - -// Set API -$api = new League\Glide\Api\Api($imageManager, $manipulators); - -// Setup Glide server -$server = new League\Glide\Server($source, $cache, $api); -~~~
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/index.md b/vendor/league/glide/docs/0.3/index.md deleted file mode 100644 index 9826c58b91..0000000000 --- a/vendor/league/glide/docs/0.3/index.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: default -title: Introduction ---- - -# Introduction - -[](https://twitter.com/reinink) -[](https://github.com/thephpleague/glide) -[](https://github.com/thephpleague/glide/releases) -[](https://github.com/thephpleague/glide/blob/master/LICENSE)<br> -[](https://travis-ci.org/thephpleague/glide) -[](http://hhvm.h4cc.de/package/league/glide) -[](https://scrutinizer-ci.com/g/thephpleague/glide/code-structure) -[](https://scrutinizer-ci.com/g/thephpleague/glide) -[](https://packagist.org/packages/league/glide) - -<p class="message-notice">Version 0.3 is no longer actively maintained. Consider using version <a href="/">1.0</a> instead.</p> - -Glide is a wonderfully easy on-demand image manipulation library written in PHP. It's straightforward API is exposed via HTTP, similar to cloud image processing services like [Imgix](http://www.imgix.com/) and [Cloudinary](http://cloudinary.com/). Glide leverages powerful libraries like [Intervention Image](http://image.intervention.io/) (for image handling and manipulation) and [Flysystem](http://flysystem.thephpleague.com/) (for file system abstraction). - -[](https://glide.herokuapp.com/0.3/kayaks.jpg?w=1000&gam=.9&sharp=8) - -<p class="photo_credit">© Photo <a href="http://www.joelreynolds.ca/">Joel Reynolds</a></p> - -## Highlights - -- Adjust, resize and add effects to images using a simple HTTP based API -- Manipulated images are automatically cached and served with far-future expires headers -- Create your own image processing server or integrate Glide directly into your app. -- Supports both the [GD](http://php.net/manual/en/book.image.php) library and the [Imagick](http://php.net/manual/en/book.imagick.php) PHP extension -- Ability to secure image URLs using HTTP signatures -- Works with many different file systems, thanks to the [Flysystem](http://flysystem.thephpleague.com/) library -- Powered by the battle tested [Intervention Image](http://image.intervention.io/) image handling and manipulation library -- Framework-agnostic, will work with any project -- Composer ready and PSR-2 compliant - -## Questions? - -Glide was created by [Jonathan Reinink](https://twitter.com/reinink). Submit issues to [Github](https://github.com/thephpleague/glide/issues).
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/installation.md b/vendor/league/glide/docs/0.3/installation.md deleted file mode 100644 index 56e4a8657d..0000000000 --- a/vendor/league/glide/docs/0.3/installation.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -layout: default -title: Installation ---- - -# Installation - -## Using Composer - -Glide is available on [Packagist](https://packagist.org/packages/league/glide) and can be installed using [Composer](https://getcomposer.org/). This can be done by running the following command: - -~~~ bash -composer require league/glide -~~~ - -Be sure to also include the Composer autoload file in your project: - -~~~ php -<?php - -require 'vendor/autoload.php'; -~~~ - -## Downloading .zip file - -This project is also available for download as a `.zip` file on GitHub. Visit the [releases page](https://github.com/thephpleague/glide/releases), select the version you want, and click the "Source code (zip)" download button.
\ No newline at end of file diff --git a/vendor/league/glide/docs/0.3/simple-example.md b/vendor/league/glide/docs/0.3/simple-example.md deleted file mode 100644 index 6f25927c48..0000000000 --- a/vendor/league/glide/docs/0.3/simple-example.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -layout: default -title: Simple example ---- - -# Simple example - -Let's say you're creating a user profile page that displays a user's name and their profile photo. The user has already uploaded an image, but it hasn't been resized yet, all you have is the original file saved somewhere. The following example illustrates how easy Glide makes cropping and resizing the profile image, without having to do any image processing ahead of time. - -## In your templates - -In your templates simply define how the image will be manipulated. Following Glide's HTTP based API, set the image manipulations in the profile image's `src` attribute. - -<div class="filename">profile.php</div> -~~~ php -<h1><?=$user->name?></h1> - -<!-- display profile image cropped to 300x400 --> -<img src="/img/users/<?=$user->id?>.jpg?w=300&h=400&fit=crop"> -~~~ - -## In your routes - -Next, within your routes, setup a Glide server. Configure where the source images can be found as well as where the manipulated images should be saved (the cache). Finally pass the server the request. It will handle all the image manipulations and will output the image. - -<div class="filename">routes.php</div> -~~~ php -<?php - -// Setup Glide server -$server = League\Glide\ServerFactory::create([ - 'source' => 'path/to/source/folder', - 'cache' => 'path/to/cache/folder', -]); - -// You could manually output the image, just -// pass a path as well as the manipulation options -$server->outputImage('users/1.jpg', ['w' => 300, 'h' => 400]); - -// Or better yet, output the image based on the current URL -$server->outputImage($path, $_GET); - -// Or if your using an HttpFoundation compatible framework, -// simply pass an instance of the Request object -$server->outputImage($request); -~~~ - diff --git a/vendor/league/glide/docs/1.0/api/adjustments.md b/vendor/league/glide/docs/1.0/api/adjustments.md deleted file mode 100644 index d23b895389..0000000000 --- a/vendor/league/glide/docs/1.0/api/adjustments.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -layout: default -title: Adjustments ---- - -# Adjustments - -## Brightness `bri` - -Adjusts the image brightness. Use values between `-100` and `+100`, where `0` represents no change. - -~~~ html -<img src="kayaks.jpg?w=500&bri=-25"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&bri=-25) - -## Contrast `con` - -Adjusts the image contrast. Use values between `-100` and `+100`, where `0` represents no change. - -~~~ html -<img src="kayaks.jpg?w=500&con=25"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&con=25) - -## Gamma `gam` - -Adjusts the image gamma. Use values between `0.1` and `9.99`. - -~~~ html -<img src="kayaks.jpg?w=500&gam=1.5"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&gam=1.5) - -## Sharpen `sharp` - -Sharpen the image. Use values between `0` and `100`. - -~~~ html -<img src="kayaks.jpg?w=500&sharp=15"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&sharp=15)
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/api/background.md b/vendor/league/glide/docs/1.0/api/background.md deleted file mode 100644 index 970b299e56..0000000000 --- a/vendor/league/glide/docs/1.0/api/background.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -layout: default -title: Background ---- - -# Background - -## Background `bg` - -Sets the background color of the image. See [colors](api/colors/) for more information on the available color formats. - -~~~ html -<img src="logo.png?w=400&bg=black"> -~~~ - -[](https://glide.herokuapp.com/1.0/logo.png?w=500&bg=black)
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/api/border.md b/vendor/league/glide/docs/1.0/api/border.md deleted file mode 100644 index 79b3a6d93d..0000000000 --- a/vendor/league/glide/docs/1.0/api/border.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: default -title: Border ---- - -# Border - -## Border `border` - -Add a border to the image. Required format: `width,color,method`. - -~~~ html -<img src="kayaks.jpg?w=500&border=10,5000,overlay"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&border=10,5000,overlay) - -### Width - -Sets the border width in pixels, or using [relative dimensions](api/relative-dimensions/). - -### Color - -Sets the border color. See [colors](api/colors/) for more information on the available color formats. - -### Method - -Sets how the border will be displayed. Available options: - -- `overlay`: Place border on top of image (default). -- `shrink`: Shrink image within border (canvas does not change). -- `expand`: Expands canvas to accommodate border. - -~~~ html -<img src="kayaks.jpg?w=500&border=10,FFCC33,expand"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&border=10,FFCC33,expand)
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/api/colors.md b/vendor/league/glide/docs/1.0/api/colors.md deleted file mode 100644 index 3d0b9b37c1..0000000000 --- a/vendor/league/glide/docs/1.0/api/colors.md +++ /dev/null @@ -1,159 +0,0 @@ ---- -layout: default -title: Colors ---- - -# Colors - -Glide supports a variety of color formats. In addition to the 140 color names supported by all modern browsers (listed below), Glide accepts hexadecimal RGB and RBG alpha formats. - -## Hexadecimal - -- 3 digit RGB: `CCC` -- 4 digit ARGB (alpha): `5CCC` -- 6 digit RGB: `CCCCCC` -- 8 digit ARGB (alpha): `55CCCCCC` - -## Color names - -- aliceblue -- antiquewhite -- aqua -- aquamarine -- azure -- beige -- bisque -- black -- blanchedalmond -- blue -- blueviolet -- brown -- burlywood -- cadetblue -- chartreuse -- chocolate -- coral -- cornflowerblue -- cornsilk -- crimson -- cyan -- darkblue -- darkcyan -- darkgoldenrod -- darkgray -- darkgreen -- darkkhaki -- darkmagenta -- darkolivegreen -- darkorange -- darkorchid -- darkred -- darksalmon -- darkseagreen -- darkslateblue -- darkslategray -- darkturquoise -- darkviolet -- deeppink -- deepskyblue -- dimgray -- dodgerblue -- firebrick -- floralwhite -- forestgreen -- fuchsia -- gainsboro -- ghostwhite -- gold -- goldenrod -- gray -- green -- greenyellow -- honeydew -- hotpink -- indianred -- indigo -- ivory -- khaki -- lavender -- lavenderblush -- lawngreen -- lemonchiffon -- lightblue -- lightcoral -- lightcyan -- lightgoldenrodyellow -- lightgray -- lightgreen -- lightpink -- lightsalmon -- lightseagreen -- lightskyblue -- lightslategray -- lightsteelblue -- lightyellow -- lime -- limegreen -- linen -- magenta -- maroon -- mediumaquamarine -- mediumblue -- mediumorchid -- mediumpurple -- mediumseagreen -- mediumslateblue -- mediumspringgreen -- mediumturquoise -- mediumvioletred -- midnightblue -- mintcream -- mistyrose -- moccasin -- navajowhite -- navy -- oldlace -- olive -- olivedrab -- orange -- orangered -- orchid -- palegoldenrod -- palegreen -- paleturquoise -- palevioletred -- papayawhip -- peachpuff -- peru -- pink -- plum -- powderblue -- purple -- rebeccapurple -- red -- rosybrown -- royalblue -- saddlebrown -- salmon -- sandybrown -- seagreen -- seashell -- sienna -- silver -- skyblue -- slateblue -- slategray -- snow -- springgreen -- steelblue -- tan -- teal -- thistle -- tomato -- turquoise -- violet -- wheat -- white -- whitesmoke -- yellow -- yellowgreen
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/api/crop.md b/vendor/league/glide/docs/1.0/api/crop.md deleted file mode 100644 index 46abc1f796..0000000000 --- a/vendor/league/glide/docs/1.0/api/crop.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -layout: default -title: Crop ---- - -# Crop - -## Fit `fit=crop` - -Resizes the image to fill the width and height boundaries and crops any excess image data. The resulting image will match the width and height constraints without distorting the image. - -~~~ html -<img src="kayaks.jpg?w=300&h=300&fit=crop"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=300&h=300&fit=crop) - -### Crop Position - -You can also set where the image is cropped by adding a crop position. Accepts `crop-top-left`, `crop-top`, `crop-top-right`, `crop-left`, `crop-center`, `crop-right`, `crop-bottom-left`, `crop-bottom` or `crop-bottom-right`. Default is `crop-center`, and is the same as `crop`. - -~~~ html -<img src="kayaks.jpg?w=300&h=300&fit=crop-left"> -~~~ - -### Crop Focal Point - -In addition to the crop position, you can be more specific about the exact crop position using a focal point. This is defined using two offset percentages: `crop-x%-y%`. - -~~~ html -<img src="kayaks.jpg?w=300&h=300&fit=crop-25-75"> -~~~ - -You may also choose to zoom into your focal point by providing a third value: a float between 1 and 100. Each full step is the equivalent of a 100% zoom. (eg. `x%-y%-2` is the equivalent of viewing the image at 200%). The suggested range is 1-10. - -~~~ html -<img src="kayaks.jpg?w=300&h=300&fit=crop-25-75-2"> -~~~ - -## Crop `crop` - -Crops the image to specific dimensions prior to any other resize operations. Required format: `width,height,x,y`. - -~~~ html -<img src="kayaks.jpg?crop=100,100,915,155"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?crop=100,100,915,155)
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/api/effects.md b/vendor/league/glide/docs/1.0/api/effects.md deleted file mode 100644 index 956322836b..0000000000 --- a/vendor/league/glide/docs/1.0/api/effects.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: default -title: Effects ---- - -# Effects - -## Blur `blur` - -Adds a blur effect to the image. Use values between `0` and `100`. - -~~~ html -<img src="kayaks.jpg?w=500&blur=5> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&blur=5) - -<p class="message-notice">Performance intensive on larger amounts of blur with GD driver. Use with care.</p> - -## Pixelate `pixel` - -Applies a pixelation effect to the image. Use values between `0` and `1000`. - -~~~ html -<img src="kayaks.jpg?w=500&pixel=5> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&pixel=5) - -## Filter `filt` - -Applies a filter effect to the image. Accepts `greyscale` or `sepia`. - -~~~ html -<img src="kayaks.jpg?w=500&filt=sepia> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&filt=sepia)
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/api/encode.md b/vendor/league/glide/docs/1.0/api/encode.md deleted file mode 100644 index c8d5addfc6..0000000000 --- a/vendor/league/glide/docs/1.0/api/encode.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -layout: default -title: Encode ---- - -# Encode - -## Quality `q` - -Defines the quality of the image. Use values between `0` and `100`. Defaults to `90`. Only relevant if the format is set to `jpg`. - -~~~ html -<img src="kayaks.jpg?w=500&q=25"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&q=25) - - -## Format `fm` - -Encodes the image to a specific format. Accepts `jpg`, `pjpg` (progressive jpeg), `png`, `gif` or `webp`. Defaults to `jpg`. - -~~~ html -<img src="kayaks.jpg?w=500&fm=gif"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&fm=gif) diff --git a/vendor/league/glide/docs/1.0/api/flip.md b/vendor/league/glide/docs/1.0/api/flip.md deleted file mode 100644 index 2924bd7a16..0000000000 --- a/vendor/league/glide/docs/1.0/api/flip.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -layout: default -title: Flip ---- - -# Flip - -## Flip `flip` - -Flips the image. Accepts `v`, `h` and `both`. - -~~~ html -<img src="kayaks.jpg?h=500&flip=v"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?h=500&flip=v) diff --git a/vendor/league/glide/docs/1.0/api/orientation.md b/vendor/league/glide/docs/1.0/api/orientation.md deleted file mode 100644 index 63ffef42db..0000000000 --- a/vendor/league/glide/docs/1.0/api/orientation.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -layout: default -title: Orientation ---- - -# Orientation - -## Orientation `or` - -Rotates the image. Accepts `auto`, `0`, `90`, `180` or `270`. Default is `auto`. The `auto` option uses Exif data to automatically orient images correctly. - -~~~ html -<img src="kayaks.jpg?h=500&or=90"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?h=500&or=90)
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/api/pixel-density.md b/vendor/league/glide/docs/1.0/api/pixel-density.md deleted file mode 100644 index 5f24d77487..0000000000 --- a/vendor/league/glide/docs/1.0/api/pixel-density.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -layout: default -title: Pixel Density ---- - -# Pixel Density - -## Device pixel ratio `dpr` - -The device pixel ratio is used to easily convert between CSS pixels and device pixels. This makes it possible to display images at the correct pixel density on a variety of devices such as Apple devices with Retina Displays and Android devices. You must specify either a width, a height, or both for this parameter to work. The default is 1. The maximum value that can be set for dpr is 8. - -~~~ html -<img src="kayaks.jpg?w=250&dpr=2"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=250&dpr=2)
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/api/quick-reference.md b/vendor/league/glide/docs/1.0/api/quick-reference.md deleted file mode 100644 index 50e2f8b171..0000000000 --- a/vendor/league/glide/docs/1.0/api/quick-reference.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -layout: default -title: Quick reference ---- - -# Quick reference - -Name | Function | Description | -------- | ---------------- | ----------- | ---- -Orientation | `or` | Rotates the image. | [info](api/orientation/#orientation-or) -Flip | `flip` | Flip the image. | [info](api/flip/#flip-flip) -Crop | `crop` | Crops the image to specific dimensions. | [info](api/crop/#crop-crop) -Width | `w` | Sets the width of the image, in pixels. | [info](api/size/#width-w) -Height | `h` | Sets the height of the image, in pixels. | [info](api/size//#height-h) -Fit | `fit` | Sets how the image is fitted to its target dimensions. | [info](api/size//#fit-fit) -Device pixel ratio | `dpr` | Multiples the overall image size. | [info](api/pixel-density/#device-pixel-ratio-dpr) -Brightness | `bri` | Adjusts the image brightness. | [info](api/adjustments/#brightness-bri) -Contrast | `con` | Adjusts the image contrast. | [info](api/adjustments/#contrast-con) -Gamma | `gam` | Adjusts the image gamma. | [info](api/adjustments/#gamma-gam) -Sharpen | `sharp` | Sharpen the image. | [info](api/adjustments/#sharpen-sharp) -Blur | `blur` | Adds a blur effect to the image. | [info](api/effects/#blur-blur) -Pixelate | `pixel` | Applies a pixelation effect to the image. | [info](api/effects/#pixelate-pixel) -Filter | `filt` | Applies a filter effect to the image. | [info](api/effects/#filter-filt) -Watermark Path | `mark` | Adds a watermark to the image. | [info](api/watermarks/#path-mark) -Watermark Width | `markw` | Sets the width of the watermark. | [info](api/watermarks/#width-markw) -Watermark Height | `markh` | Sets the height of the watermark. | [info](api/watermarks/#height-markh) -Watermark X-offset | `markx` | Sets the watermark distance from left/right edges. | [info](api/watermarks/#x-offset-markx) -Watermark Y-offset | `marky` | Sets the watermark distance from top/bottom edges. | [info](api/watermarks/#y-offset-marky) -Watermark Padding | `markpad` | Sets the watermark distance from the edges. | [info](api/watermarks/#padding-markpad) -Watermark Position | `markpos` | Sets where the watermark is positioned. | [info](api/watermarks/#position-markpos) -Watermark Alpha | `markalpha` | Sets the watermark opacity. | [info](api/watermarks/#alpha-markalpha) -Background | `bg` | Sets the background color of the image. | [info](api/background/#background-bg) -Border | `border` | Add a border to the image. | [info](api/border/#border-border) -Quality | `q` | Defines the quality of the image. | [info](api/encode/#quality-q) -Format | `fm` | Encodes the image to a specific format. | [info](api/encode/#format-fm) diff --git a/vendor/league/glide/docs/1.0/api/relative-dimensions.md b/vendor/league/glide/docs/1.0/api/relative-dimensions.md deleted file mode 100644 index 80182b02af..0000000000 --- a/vendor/league/glide/docs/1.0/api/relative-dimensions.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -layout: default -title: Relative dimensions ---- - -# Relative dimensions - -Relative dimensions allow you to specify a width or height value as a percentage of the main image. This is helpful for features like watermarks and borders. - -To use a relative dimension, simply provide a percentage as a number (between `0` and `100`), followed by a `w` (width) or `h` (height). For example, `5w` represents 5% of the width of the main image. - -~~~ html -<img src="kayaks.jpg?mark=logo.png&markw=5w"> -~~~
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/api/size.md b/vendor/league/glide/docs/1.0/api/size.md deleted file mode 100644 index 84e51bcb4a..0000000000 --- a/vendor/league/glide/docs/1.0/api/size.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -layout: default -title: Size ---- - -# Size - -## Width `w` - -Sets the width of the image, in pixels. - -~~~ html -<img src="kayaks.jpg?w=500"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500) - -## Height `h` - -Sets the height of the image, in pixels. - -~~~ html -<img src="kayaks.jpg?h=333"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?h=333) - -## Fit `fit` - -Sets how the image is fitted to its target dimensions. - -### Accepts: - -- `contain`: Default. Resizes the image to fit within the width and height boundaries without cropping, distorting or altering the aspect ratio. -- `max`: Resizes the image to fit within the width and height boundaries without cropping, distorting or altering the aspect ratio, and will also not increase the size of the image if it is smaller than the output size. -- `fill`: Resizes the image to fit within the width and height boundaries without cropping or distorting the image, and the remaining space is filled with the background color. The resulting image will match the constraining dimensions. -- `stretch`: Stretches the image to fit the constraining dimensions exactly. The resulting image will fill the dimensions, and will not maintain the aspect ratio of the input image. -- `crop`: Resizes the image to fill the width and height boundaries and crops any excess image data. The resulting image will match the width and height constraints without distorting the image. See the [crop](api/crop/) page for more information. - -~~~ html -<img src="kayaks.jpg?w=300&h=300&fit=stretch"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=300&h=300&fit=stretch)
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/api/watermarks.md b/vendor/league/glide/docs/1.0/api/watermarks.md deleted file mode 100644 index edb0e726dd..0000000000 --- a/vendor/league/glide/docs/1.0/api/watermarks.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -layout: default -title: Watermarks ---- - -# Watermarks - -## Path `mark` - -Adds a watermark to the image. Must be a path to an image in the watermarks file system, as configured in your server. - -~~~ html -<img src="kayaks.jpg?mark=logo.png"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&mark=billabong.png&markw=30w&markpad=3w&markpos=top-right) - -### Configuring the watermarks file system - -Configuring the watermarks file system is exactly the same as configuring the `source` and `cache` file systems. See the [source & cache](config/source-and-cache/) for more information about setting up file systems. - -~~~ php -<?php - -$server = ServerFactory::create([ - 'watermarks' => new Filesystem(new Local('path/to/watermarks/folder')), - 'watermarks_path_prefix' => 'images/watermarks', // optional -]); -~~~ - -## Width `markw` - -Sets the width of the watermark in pixels, or using [relative dimensions](api/relative-dimensions/). - -~~~ html -<img src="kayaks.jpg?mark=logo.png&markw=200"> -~~~ - -## Height `markh` - -Sets the height of the watermark in pixels, or using [relative dimensions](api/relative-dimensions/). - -~~~ html -<img src="kayaks.jpg?mark=logo.png&markh=200"> -~~~ - -## Fit `markfit` - -Sets how the watermark is fitted to its target dimensions. - -### Accepts: - -- `contain`: Default. Resizes the image to fit within the width and height boundaries without cropping, distorting or altering the aspect ratio. -- `max`: Resizes the image to fit within the width and height boundaries without cropping, distorting or altering the aspect ratio, and will also not increase the size of the image if it is smaller than the output size. -- `fill`: Resizes the image to fit within the width and height boundaries without cropping or distorting the image, and the remaining space is filled with the background color. The resulting image will match the constraining dimensions. -- `stretch`: Stretches the image to fit the constraining dimensions exactly. The resulting image will fill the dimensions, and will not maintain the aspect ratio of the input image. -- `crop`: Resizes the image to fill the width and height boundaries and crops any excess image data. The resulting image will match the width and height constraints without distorting the image. See the [crop](api/crop/) page for more information. - -~~~ html -<img src="kayaks.jpg?mark=logo.png&markw=200&markh=200&markfit=crop"> -~~~ - -## X-offset `markx` - -Sets how far the watermark is away from the left and right edges of the image. Set in pixels, or using [relative dimensions](api/relative-dimensions/). Ignored if `markpos` is set to `center`. - -~~~ html -<img src="kayaks.jpg?mark=logo.png&markw=200&markx=20"> -~~~ - -## Y-offset `marky` - -Sets how far the watermark is away from the top and bottom edges of the image. Set in pixels, or using [relative dimensions](api/relative-dimensions/). Ignored if `markpos` is set to `center`. - -~~~ html -<img src="kayaks.jpg?mark=logo.png&markw=200&marky=20"> -~~~ - -## Padding `markpad` - -Sets how far the watermark is away from edges of the image. Basically a shortcut for using both `markx` and `marky`. Set in pixels, or using [relative dimensions](api/relative-dimensions/). Ignored if `markpos` is set to `center`. - -~~~ html -<img src="kayaks.jpg?mark=logo.png&markw=200&markpad=20"> -~~~ - -## Position `markpos` - -Sets where the watermark is positioned. Accepts `top-left`, `top`, `top-right`, `left`, `center`, `right`, `bottom-left`, `bottom`, `bottom-right`. Default is `center`. - -~~~ html -<img src="kayaks.jpg?mark=logo.png&markpos=top-left"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&mark=billabong.png&markw=30w&markpad=3w&markpos=top-left) - -## Alpha `markalpha` - -Sets the opacity of the watermark. Use values between `0` and `100`, where `100` is fully opaque, and `0` is fully transparent. The default value is `100`. - -~~~ html -<img src="kayaks.jpg?mark=logo.png&markalpha=50"> -~~~ - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=500&mark=billabong.png&markw=94w&markpad=3w&markpos=top-right&markalpha=50)
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/changelog.md b/vendor/league/glide/docs/1.0/changelog.md deleted file mode 100644 index 68aab49c47..0000000000 --- a/vendor/league/glide/docs/1.0/changelog.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: default -title: Changelog ---- - -# Changelog - -All notable changes to Glide will be documented in this file. - -{% for release in site.github.releases %} -## [{{ release.name }}]({{ release.html_url }}) - {{ release.published_at | date: "%Y-%m-%d" }} -{{ release.body | markdownify }} -{% endfor %} diff --git a/vendor/league/glide/docs/1.0/config/advanced-usage.md b/vendor/league/glide/docs/1.0/config/advanced-usage.md deleted file mode 100644 index 961f8a51d3..0000000000 --- a/vendor/league/glide/docs/1.0/config/advanced-usage.md +++ /dev/null @@ -1,131 +0,0 @@ ---- -layout: default -title: Advanced usage ---- - -# Advanced usage - -Once your Glide [server](/1.0/config/setup/) is configured, there are a number of methods available to interact with it. For basic setups you'll likely only need the `outputImage()` method. However, if you plan to use Glide with a queuing server or in other more complex configurations, these methods can be useful. - -## Source - -~~~ php -<?php - -// Set the source file system -public function setSource(FilesystemInterface $source) - -// Get the source file system -public function getSource() - -// Set the source path prefix -public function setSourcePathPrefix($sourcePathPrefix) - -// Get the source path prefix -public function getSourcePathPrefix() - -// Get the source path for an image -public function getSourcePath($path) - -// Check if a source file exists -public function sourceFileExists($path) -~~~ - -## Cache - -~~~ php -<?php - -// Set the cache file system -public function setCache(FilesystemInterface $cache) - -// Get the cache file system -public function getCache() - -// Set the cache path prefix -public function setCachePathPrefix($cachePathPrefix) - -// Get the cache path prefix -public function getCachePathPrefix() - -// Set the group cache in folders setting -public function setGroupCacheInFolders(true|false) - -// Get the group cache in folders setting -public function getGroupCacheInFolders() - -// Delete an image from the cache -public function deleteCache($path) - -// Get the cache path for an image -public function getCachePath($path, array $params) - -// Check if a cache file exists -public function cacheFileExists($path, array $params) -~~~ - -## Api - -~~~ php -<?php - -// Set the image manipulation Api -public function setApi(ApiInterface $api) - -// Get the image manipulation Api -public function getApi() -~~~ - -## Responses - -~~~ php -<?php - -// Set the response factory -public function setResponseFactory(ResponseFactoryInterface $responseFactory) - -// Get the response factory -public function getResponseFactory() -~~~ - -## Default manipulations - -~~~ php -<?php - -// Set the default manipulators -public function setManipulators(array $manipulators) - -// Get the default manipulators -public function getManipulators() -~~~ - -## Base URL - -~~~ php -<?php - -// Set the base url -public function setBaseUrl($baseUrl) - -// Get the base url -public function getBaseUrl() -~~~ - -## Image generation - -~~~ php -<?php - -// Generates and outputs the image -$server->outputImage($path, array $params); - -// Generates and returns the image reponse -$server->getImageResponse($path, array $params); - -// Generates and returns the image Base64 encoded -$server->getImageAsBase64($path, array $params); - -// Generates the image -$server->makeImage($path, array $params); -~~~ diff --git a/vendor/league/glide/docs/1.0/config/defaults-and-presets.md b/vendor/league/glide/docs/1.0/config/defaults-and-presets.md deleted file mode 100644 index 0826017dff..0000000000 --- a/vendor/league/glide/docs/1.0/config/defaults-and-presets.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -layout: default -title: Defaults & presets ---- - -# Defaults & presets - -In certain situations you may want to define default image manipulations. For example, maybe you want to specify that all images are outputted as JPEGs (`fm=jpg`). Or maybe you have a watermark that you want added to all images. Glide makes this possible using default manipulations. - -~~~ php -<?php - -// Set using factory -$server = League\Glide\ServerFactory::create([ - 'defaults' => [ - 'mark' => 'logo.png', - 'markw' => '30w', - 'markpad' => '5w', - ] -]); - -// Set using setter method -$server->setDefaults([ - 'mark' => 'logo.png', - 'markw' => '30w', - 'markpad' => '5w', -]); -~~~ - -## Presets - -Glide also makes it possible to define groups of defaults, known as presets. This is helpful if you have standard image manipulations that you use throughout your app. - -### Configuring presets - -~~~ php -<?php - -// Set using factory -$server = League\Glide\ServerFactory::create([ - 'presets' => [ - 'small' => [ - 'w' => 200, - 'h' => 200, - 'fit' => 'crop', - ], - 'medium' => [ - 'w' => 600, - 'h' => 400, - 'fit' => 'crop', - ] - ] -]); - -// Set using setter method -$server->setPresets([ - 'small' => [ - 'w' => 200, - 'h' => 200, - 'fit' => 'crop', - ], - 'medium' => [ - 'w' => 600, - 'h' => 400, - 'fit' => 'crop', - ] -]); -~~~ - -### Using presets - -To use a presets, set it using the `p` parameter: - -~~~ html -<img src="kayaks.jpg?p=small"> -~~~ - -It's also possible to use multiple presets together: - -~~~ html -<img src="kayaks.jpg?p=small,watermarked"> -~~~ - -It's even possible to use presets with additional parameters: - -~~~ html -<img src="kayaks.jpg?p=small,watermarked&filt=sepia"> -~~~ - -## Overriding defaults and presets - -You can override the default and preset manipulations for a specific request by passing a new parameter (e.x. `mark=different.png`), or even disable it entirely by setting it to blank (e.x. `mark=`).
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/config/image-driver.md b/vendor/league/glide/docs/1.0/config/image-driver.md deleted file mode 100644 index c054f86ff6..0000000000 --- a/vendor/league/glide/docs/1.0/config/image-driver.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -layout: default -title: Image driver ---- - -# Image driver - -By default Glide uses the [GD](http://php.net/manual/en/book.image.php) library. However you can also use Glide with [ImageMagick](http://www.imagemagick.org/) if the [Imagick](http://php.net/manual/en/book.imagick.php) PHP extension is installed. - -~~~ php -<?php - -$server = League\Glide\ServerFactory::create([ - - // Use GD (default) - 'driver' => 'gd', - - // Use ImageMagick - 'driver' => 'imagick', -]); -~~~
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/config/integrations/cakephp.md b/vendor/league/glide/docs/1.0/config/integrations/cakephp.md deleted file mode 100644 index a9e0d1b971..0000000000 --- a/vendor/league/glide/docs/1.0/config/integrations/cakephp.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -layout: default -title: CakePHP integration ---- - -# CakePHP integration - -If your application uses the [CakePHP](http://cakephp.org/) framework, you can use the `CakeResponseFactory`. - -<p class="message-notice">This adapter requires CakePHP 3 or newer.</p> - -## Installation - -~~~ bash -composer require league/glide-cake -~~~ - -## Configuration - -~~~ php -<?php - -use League\Glide\ServerFactory; -use League\Glide\Responses\CakeResponseFactory; - -$server = ServerFactory::create([ - 'response' => new CakeResponseFactory() -]); -~~~
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/config/integrations/laravel.md b/vendor/league/glide/docs/1.0/config/integrations/laravel.md deleted file mode 100644 index 462530ebf2..0000000000 --- a/vendor/league/glide/docs/1.0/config/integrations/laravel.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -layout: default -title: Laravel integration ---- - -# Laravel integration - -If your application uses the [Laravel](https://laravel.com/) framework, you can use the `LaravelResponseFactory`. Since Laravel uses `HttpFoundation` under the hood, this adapter actually extends the [Symfony adapter](/1.0/config/integrations/symfony/). - -<p class="message-notice">This adapter requires Laravel 4 or newer.</p> - -## Installation - -~~~ bash -composer require league/glide-laravel -~~~ - -## Configuration - -~~~ php -<?php - -use League\Glide\ServerFactory; -use League\Glide\Responses\LaravelResponseFactory; - -$server = ServerFactory::create([ - 'response' => new LaravelResponseFactory(app('request')) -]); -~~~ - -## Working example - -Here is a fully functioning example of how to get Glide up and running with Laravel really quick. First, create a new entry in your routes file: - -~~~ php -<?php - -Route::get('/img/{path}', 'ImageController@show')->where('path', '.*'); -~~~ - -Next, create a controller that will serve all your Glide images. This will use the default Laravel storage path (`/storage/app`) for the source images. - -~~~ php -<?php - -namespace App\Http\Controllers; - -use Illuminate\Contracts\Filesystem\Filesystem; -use League\Glide\Responses\LaravelResponseFactory; -use League\Glide\ServerFactory; - -class ImageController extends Controller -{ - public function show(Filesystem $filesystem, $path) - { - $server = ServerFactory::create([ - 'response' => new LaravelResponseFactory(app('request')), - 'source' => $filesystem->getDriver(), - 'cache' => $filesystem->getDriver(), - 'cache_path_prefix' => '.cache', - 'base_url' => 'img', - ]); - - return $server->getImageResponse($path, request()->all()); - } -} -~~~ diff --git a/vendor/league/glide/docs/1.0/config/integrations/psr-7.md b/vendor/league/glide/docs/1.0/config/integrations/psr-7.md deleted file mode 100644 index 2a0b0eb34e..0000000000 --- a/vendor/league/glide/docs/1.0/config/integrations/psr-7.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -layout: default -title: PSR-7 integration ---- - -# PSR-7 integration - -Glide ships with the `PsrResponseFactory` class, allowing you to use any [PSR-7](http://www.php-fig.org/psr/psr-7/) compliant library. However, since Glide only depends on the PSR-7 interfaces, it cannot actually create the `Response` or `Stream` objects. Instead, you must provide them. - -## Configuration - -The following example uses the [Zend Diactoros](https://github.com/zendframework/zend-diactoros) library, but any PSR-7 compatible package will work. - -~~~ php -<?php - -use League\Glide\ServerFactory; -use League\Glide\Responses\PsrResponseFactory; -use Zend\Diactoros\Response; -use Zend\Diactoros\Stream; - -$server = ServerFactory::create([ - 'response' => new PsrResponseFactory(new Response(), function ($stream) { - return new Stream($stream); - }), -]); -~~~ - -## Vendor specific adapters - -However, for simplicity, Glide provides a vendor specific PSR-7 adapters to make this easier: - -- [Slim](/1.0/config/integrations/slim/) -- [Zend](/1.0/config/integrations/zend/)
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/config/integrations/slim.md b/vendor/league/glide/docs/1.0/config/integrations/slim.md deleted file mode 100644 index cf6b7f089b..0000000000 --- a/vendor/league/glide/docs/1.0/config/integrations/slim.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -layout: default -title: Slim integration ---- - -# Slim integration - -If your application uses [Slim](http://www.slimframework.com/) framework, you can use the `SlimResponseFactory`. - -<p class="message-notice">This adapter requires Slim 3 or newer, which is based on PSR-7.</p> - -## Installation - -~~~ bash -composer require league/glide-slim -~~~ - -## Configuration - -~~~ php -<?php - -use League\Glide\ServerFactory; -use League\Glide\Responses\SlimResponseFactory; - -$server = ServerFactory::create([ - 'response' => new SlimResponseFactory(), -]); -~~~ diff --git a/vendor/league/glide/docs/1.0/config/integrations/symfony.md b/vendor/league/glide/docs/1.0/config/integrations/symfony.md deleted file mode 100644 index 01d5cfa153..0000000000 --- a/vendor/league/glide/docs/1.0/config/integrations/symfony.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -layout: default -title: Symfony (HttpFoundation) integration ---- - -# Symfony integration - -If your application uses the [Symfony](https://symfony.com/) framework or anything that uses the `HttpFoundation` library, you can use the `SymfonyResponseFactory`. - -## Installation - -~~~ bash -composer require league/glide-symfony -~~~ - -## Configuration - -~~~ php -<?php - -use League\Glide\ServerFactory; -use League\Glide\Responses\SymfonyResponseFactory; - -$server = ServerFactory::create([ - 'response' => new SymfonyResponseFactory() -]); -~~~
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/config/integrations/zend.md b/vendor/league/glide/docs/1.0/config/integrations/zend.md deleted file mode 100644 index db7e443337..0000000000 --- a/vendor/league/glide/docs/1.0/config/integrations/zend.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -layout: default -title: Zend integration ---- - -# Zend integration - -If your application uses the [Zend Diactoros](https://github.com/zendframework/zend-diactoros) package, for example within the [Zend Expressive](http://framework.zend.com/expressive), you can use the `ZendResponseFactory`. - -## Installation - -~~~ bash -composer require league/glide-zend -~~~ - -## Configuration - -~~~ php -<?php - -use League\Glide\ServerFactory; -use League\Glide\Responses\ZendResponseFactory; - -$server = ServerFactory::create([ - 'response' => new ZendResponseFactory(), -]); -~~~ diff --git a/vendor/league/glide/docs/1.0/config/responses.md b/vendor/league/glide/docs/1.0/config/responses.md deleted file mode 100644 index d41a3fdd85..0000000000 --- a/vendor/league/glide/docs/1.0/config/responses.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -layout: default -title: Responses ---- - -# Responses - -In addition to generating manipulated images, Glide also helps with creating HTTP responses using the `getImageResponse()` method. This is recommended over the `outputImage()` method, since it allows your application to handle the actual output of the image. - -However, the type of response object needed depends on your application or framework. For example, you may want a [PSR-7](http://www.php-fig.org/psr/psr-7/) response object if your using the Slim framework. Or, if you're using Laravel or Symfony, you may want to use an [HttpFoundation](http://symfony.com/doc/current/components/http_foundation/introduction.html) object. To use the `getImageResponse()` method you must configure Glide to return the response you want. - -## Response integrations - -| Vendor | Message interface | Adapter package | -|----------------------------------------------|---------------------|----------------------------| -| [PSR-7](/1.0/config/integrations/psr-7/) | PSR-7 | *Included in base package* | -| [CakePHP](/1.0/config/integrations/cakephp/) | *Vendor specific* | league/glide-cake | -| [Laravel](/1.0/config/integrations/laravel/) | HttpFoundation | league/glide-laravel | -| [Slim](/1.0/config/integrations/slim/) | PSR-7 | league/glide-slim | -| [Symfony](/1.0/config/integrations/symfony/) | HttpFoundation | league/glide-symfony | -| [Zend](/1.0/config/integrations/zend/) | PSR-7 | league/glide-zend | - -## Custom responses - -If your particular project doesn't use PSR-7 or HttpFoundation, or if you'd like finer control over how your response objects are created, you can use your own response factories. Glide provides the `ResponseFactoryInterface` interface for this. - -~~~ php -<?php - -namespace League\Glide\Responses; - -use League\Flysystem\FilesystemInterface; - -interface ResponseFactoryInterface -{ - /** - * Create the response. - * @param FilesystemInterface $cache The cache file system. - * @param string $path The cached file path. - * @return mixed The response object. - */ - public function create(FilesystemInterface $cache, $path); -} -~~~
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/config/security.md b/vendor/league/glide/docs/1.0/config/security.md deleted file mode 100644 index 6c4c47f405..0000000000 --- a/vendor/league/glide/docs/1.0/config/security.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -layout: default -title: Security ---- - -# Security - -Secure your Glide image server with HTTP signatures. By signing each request with a private key, no alterations can be made to the URL parameters. - -<p class="message-notice">It is highly recommended that you use signed URLs in production environments, otherwise your application will be open to mass image-resize attacks.</p> - -## Configuration - -Start by configuring the Glide server to validate each request before you ouput the image. In the event that the validation fails, Glide will throw an `SignatureException` exception. - -~~~ php -<?php - -use League\Glide\Signatures\SignatureFactory; -use League\Glide\Signatures\SignatureException; - -try { - // Set complicated sign key - $signkey = 'v-LK4WCdhcfcc%jt*VC2cj%nVpu+xQKvLUA%H86kRVk_4bgG8&CWM#k*b_7MUJpmTc=4GFmKFp7=K%67je-skxC5vz+r#xT?62tT?Aw%FtQ4Y3gvnwHTwqhxUh89wCa_'; - - // Validate HTTP signature - SignatureFactory::create($signkey)->validateRequest($path, $_GET); - -} catch (SignatureException $e) { - // Handle error -} -~~~ - -<p class="message-notice">We recommend using a 128 character (or larger) signing key to prevent trivial key attacks. Consider using a package like <a href="https://github.com/AndrewCarterUK/CryptoKey">CryptoKey</a> to generate a secure key.</p> - -## Generating secure URLs - -Next, generate a signature for each image request you make. Glide comes with a URL builder to make this process easy. Be sure to use the same signing key you configured earlier. - -~~~ php -<?php - -use League\Glide\Urls\UrlBuilderFactory; - -// Set complicated sign key -$signkey = 'v-LK4WCdhcfcc%jt*VC2cj%nVpu+xQKvLUA%H86kRVk_4bgG8&CWM#k*b_7MUJpmTc=4GFmKFp7=K%67je-skxC5vz+r#xT?62tT?Aw%FtQ4Y3gvnwHTwqhxUh89wCa_'; - -// Create an instance of the URL builder -$urlBuilder = UrlBuilderFactory::create('/img/', $signkey); - -// Generate a URL -$url = $urlBuilder->getUrl('cat.jpg', ['w' => 500]); - -// Use the URL in your app -echo '<img src="'.$url.'">'; - -// Prints out -<img src="/img/cat.jpg?w=500&s=af3dc18fc6bfb2afb521e587c348b904"> -~~~ - -## Max image size - -In addition signing URLs, you can also limit how large images can be generated. The following setting will set the maximum allowed total image size, in pixels. - -~~~ php -<?php - -$server = League\Glide\ServerFactory::create([ - 'max_image_size' => 2000*2000, -]); -~~~ - -Notice that Glide doesn't actually restrict the width or height, but rather the total image size. In the above example it would be `4000000px`. This accomplishes the same thing, while offering more flexibility with your image sizes.
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/config/setup.md b/vendor/league/glide/docs/1.0/config/setup.md deleted file mode 100644 index 1f666453f1..0000000000 --- a/vendor/league/glide/docs/1.0/config/setup.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -layout: default -title: Setup ---- - -# Setup - -All the Glide configuration is managed through a central object called the `Server`. This includes the image [source location](config/source-and-cache/) (where the original images are saved), the image [cache location](config/source-and-cache/) (where the manipulated images are saved), as well as all other configuration options. - -## Setup with factory - -The easiest way to configure the `Server` is using the supplied factory. - -~~~ php -<?php - -$server = League\Glide\ServerFactory::create([ - 'source' => // Source filesystem - 'source_path_prefix' => // Source filesystem path prefix - 'cache' => // Cache filesystem - 'cache_path_prefix' => // Cache filesystem path prefix - 'group_cache_in_folders' => // Whether to group cached images in folders - 'watermarks' => // Watermarks filesystem - 'watermarks_path_prefix' => // Watermarks filesystem path prefix - 'driver' => // Image driver (gd or imagick) - 'max_image_size' => // Image size limit - 'defaults' => // Default image manipulations - 'presets' => // Preset image manipulations - 'base_url' => // Base URL of the images - 'response' => // Response factory -]); -~~~ - -## Setup manually - -You can also choose to instantiate the `Server` object manually. This allows finer control over what dependencies are being used. For example, if you wanted to add additional functionality to the API, you could load custom manipulators in addition to those provided with Glide. - -~~~ php -<?php - -// Set source filesystem -$source = new League\Flysystem\Filesystem( - new League\Flysystem\Adapter\Local('path/to/source/folder') -); - -// Set cache filesystem -$cache = new League\Flysystem\Filesystem( - new League\Flysystem\Adapter\Local('path/to/cache/folder') -); - -// Set watermarks filesystem -$watermarks = new League\Flysystem\Filesystem( - new League\Flysystem\Adapter\Local('path/to/watermarks/folder') -); - -// Set image manager -$imageManager = new Intervention\Image\ImageManager([ - 'driver' => 'gd', -]); - -// Set manipulators -$manipulators = [ - new League\Glide\Manipulators\Orientation(), - new League\Glide\Manipulators\Crop(), - new League\Glide\Manipulators\Size(2000*2000), - new League\Glide\Manipulators\Brightness(), - new League\Glide\Manipulators\Contrast(), - new League\Glide\Manipulators\Gamma(), - new League\Glide\Manipulators\Sharpen(), - new League\Glide\Manipulators\Filter(), - new League\Glide\Manipulators\Blur(), - new League\Glide\Manipulators\Pixelate(), - new League\Glide\Manipulators\Watermark($watermarks), - new League\Glide\Manipulators\Background(), - new League\Glide\Manipulators\Border(), - new League\Glide\Manipulators\Encode(), -]; - -// Set API -$api = new League\Glide\Api\Api($imageManager, $manipulators); - -// Setup Glide server -$server = new League\Glide\Server( - $source, - $cache, - $api, -); - -// Set response factory -$server->setResponseFactory(new SymfonyResponseFactory()); -~~~ - -<p class="message-notice">Be sure to always include the <code>League\Glide\Manipulators\Encode()</code> manipulator as the last item in your list of manipulators. This manipulator is required, and Glide will break without it.</p> - -<p class="message-notice">To use the <code>SymfonyResponseFactory</code> class, you must also include the <code>symfony/http-foundation</code> package with your project. For more information, see <a href="config/responses/">responses</a>.</p> diff --git a/vendor/league/glide/docs/1.0/config/source-and-cache.md b/vendor/league/glide/docs/1.0/config/source-and-cache.md deleted file mode 100644 index ca25fdd359..0000000000 --- a/vendor/league/glide/docs/1.0/config/source-and-cache.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -layout: default -title: Source & cache ---- - -# Source & cache - -Glide makes it possible to access images stored in a variety of file systems. It does this using the [Flysystem](http://flysystem.thephpleague.com/) file system abstraction library. For example, you may choose to store your source images on [Amazon S3](http://aws.amazon.com/s3/), but keep your rendered images (the cache) on the local disk. - -## Setup using Flysystem - -To set your source and cache locations, simply pass an instance of `League\Flysystem\Filesystem` for each. See the Flysystem [website](http://flysystem.thephpleague.com/) for a complete list of available adapters. - -~~~ php -<?php - -use League\Flysystem\Adapter\Local; -use League\Flysystem\Filesystem; -use League\Glide\ServerFactory; - -// Setup Glide server -$server = ServerFactory::create([ - 'source' => new Filesystem(new Local('path/to/source/folder')), - 'cache' => new Filesystem(new Local('path/to/cache/folder')), -]); -~~~ - -## Setup using local disk - -Alternatively, if you are only using the local disk, you can simply provide the paths as a string. - -~~~ php -<?php - -$server = League\Glide\ServerFactory::create([ - 'source' => 'path/to/source/folder', - 'cache' => 'path/to/cache/folder', -]); -~~~ - -## Set default path prefix - -While it's normally possible to set the full source and cache path using Flysystem, there are situations where it may be desirable to set a default path prefix. For example, when only one instance of the `Filesystem` is available. - -~~~ php -<?php - -// Set using factory -$server = League\Glide\ServerFactory::create([ - 'source' => $filesystem, - 'cache' => $filesystem, - 'source_path_prefix' => 'source', - 'cache_path_prefix' => 'cache', -]); - -// Set using setter methods -$server->setSourcePathPrefix('source'); -$server->setCachePathPrefix('cache'); -~~~ - -## Set a base URL - -It's common to route all images under the path `/img/`. However, since Glide maps the image request path directly to the image source path, you would need to have an `/img/` folder in your source location as well. For example: - -~~~ js -'http://example.com/img/kayaks.jpg' => '/path/to/source/img/kayaks.jpg' -~~~ - -The `base_url` allows you to define which part of the URL should be omitted from the source path. - -~~~ php -<?php - -// Set using factory -$server = League\Glide\ServerFactory::create([ - 'base_url' => '/img/', -]); - -// Set using setter method -$server->setBaseUrl('/img/'); -~~~ - -With the base URL configured, the new image source paths will no longer include `/img/`. - -~~~ js -'http://example.com/img/kayaks.jpg' => '/path/to/source/kayaks.jpg' -~~~ - -## Disabling the cache - -In some situations it may be desirable to disable the cache. For example, you may choose to use a tool like Varnish for caching instead. The best way to do this with Glide is to use an [in-memory adapter](http://flysystem.thephpleague.com/adapter/memory/) for Flysystem. This will prevent any cached images from being saved to your local disk. - -## Grouping cache in folders - -By default Glide groups cached images into folders. For example, all variations of `kayaks.jpg` will be found in a `/path/to/cache/folder/kayaks.jpg` folder. If you'd prefer to have all cached images in the same folder, this can be done in two ways: - -~~~ php -<?php - -// Set using factory -$server = League\Glide\ServerFactory::create([ - 'group_cache_in_folders' => false -]); - -// Set using setter method -$server->setGroupCacheInFolders(false); -~~~ - -## Deleting cached images - -Glide does not automatically purge cached images. However, this can be done by your application using the `deleteCache()` method. Note, grouping cache in folders MUST be enabled in order to delete cached images, which is the default setting. - -~~~ php -<?php - -$server->deleteCache('kayaks.jpg'); -~~~
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/index.md b/vendor/league/glide/docs/1.0/index.md deleted file mode 100644 index ce59272712..0000000000 --- a/vendor/league/glide/docs/1.0/index.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: default -permalink: / -title: Introduction ---- - -# Introduction - -[](https://twitter.com/reinink) -[](https://github.com/thephpleague/glide) -[](https://github.com/thephpleague/glide/releases) -[](https://github.com/thephpleague/glide/blob/master/LICENSE)<br> -[](https://travis-ci.org/thephpleague/glide) -[](http://hhvm.h4cc.de/package/league/glide) -[](https://scrutinizer-ci.com/g/thephpleague/glide/code-structure) -[](https://scrutinizer-ci.com/g/thephpleague/glide) -[](https://packagist.org/packages/league/glide) - -Glide is a wonderfully easy on-demand image manipulation library written in PHP. Its straightforward API is exposed via HTTP, similar to cloud image processing services like [Imgix](http://www.imgix.com/) and [Cloudinary](http://cloudinary.com/). Glide leverages powerful libraries like [Intervention Image](http://image.intervention.io/) (for image handling and manipulation) and [Flysystem](http://flysystem.thephpleague.com/) (for file system abstraction). - -[](https://glide.herokuapp.com/1.0/kayaks.jpg?w=1000&gam=.9&sharp=8) - -<p class="photo_credit">© Photo <a href="http://www.joelreynolds.ca/">Joel Reynolds</a></p> - -## Highlights - -- Adjust, resize and add effects to images using a simple HTTP based API. -- Manipulated images are automatically cached and served with far-future expires headers. -- Create your own image processing server or integrate Glide directly into your app. -- Supports both the [GD](http://php.net/manual/en/book.image.php) library and the [Imagick](http://php.net/manual/en/book.imagick.php) PHP extension. -- Supports many response methods, including [PSR-7](http://www.php-fig.org/psr/psr-7/), [HttpFoundation](http://symfony.com/doc/current/components/http_foundation/introduction.html) and more. -- Ability to secure image URLs using HTTP signatures. -- Works with many different file systems, thanks to the [Flysystem](http://flysystem.thephpleague.com/) library. -- Powered by the battle tested [Intervention Image](http://image.intervention.io/) image handling and manipulation library. -- Framework-agnostic, will work with any project. -- Composer ready and PSR-2 compliant. - -## Questions? - -Glide was created by [Jonathan Reinink](https://twitter.com/reinink). Submit issues to [Github](https://github.com/thephpleague/glide/issues).
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/installation.md b/vendor/league/glide/docs/1.0/installation.md deleted file mode 100644 index b372d45d0a..0000000000 --- a/vendor/league/glide/docs/1.0/installation.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: default -title: Installation ---- - -# Installation - -## Using Composer - -Glide is available on [Packagist](https://packagist.org/packages/league/glide) and can be installed using [Composer](https://getcomposer.org/). This can be done by running the following command: - -~~~ bash -composer require league/glide -~~~ - -Be sure to also include the Composer autoload file in your project: - -~~~ php -<?php - -require 'vendor/autoload.php'; -~~~ - -## Framework integration - -If you want a Framework specific version, the following adapters are available. Note, these adapters automatically include the base library (`league/glide`), so you don't need to require both. - -~~~ bash -composer require league/glide-cake -composer require league/glide-laravel -composer require league/glide-slim -composer require league/glide-symfony -composer require league/glide-zend -~~~ - -<p class="message-notice">See <a href="/1.0/config/responses/">responses</a> for more information about integrating with a specific framework.</p> - -## Downloading .zip file - -This project is also available for download as a `.zip` file on GitHub. Visit the [releases page](https://github.com/thephpleague/glide/releases), select the version you want, and click the "Source code (zip)" download button.
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/screencasts.md b/vendor/league/glide/docs/1.0/screencasts.md deleted file mode 100644 index d68df879b9..0000000000 --- a/vendor/league/glide/docs/1.0/screencasts.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: default -title: Screencasts ---- - -# Screencasts - -- Using queues to eager generate images -- Installing Glide on Laravel 5.1 -- Installing Glide on Slim 3.0 -- Setting up Glide on standalone Heroku server
\ No newline at end of file diff --git a/vendor/league/glide/docs/1.0/simple-example.md b/vendor/league/glide/docs/1.0/simple-example.md deleted file mode 100644 index 82d4873383..0000000000 --- a/vendor/league/glide/docs/1.0/simple-example.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -layout: default -title: Simple example ---- - -# Simple example - -Say you're creating a user profile page that displays a user's name and profile photo. The user has already uploaded an image, but it hasn't been resized. All you have is the original file saved somewhere. The following example illustrates how easy Glide makes cropping and resizing the profile image without having to do any image processing ahead of time. - -## In your templates - -In your templates simply define how the image will be manipulated. Using Glide's HTTP based API, set the image manipulations in the profile image's `src` attribute. - -<div class="filename">profile.php</div> -~~~ php -<h1><?=$user->name?></h1> - -<!-- display profile image cropped to 300x400 --> -<img src="/img/users/<?=$user->id?>.jpg?w=300&h=400&fit=crop"> -~~~ - -<p class="message-notice">For simplicity this example has omitted HTTP signatures, however in a production environment it's very important to <a href="/1.0/config/security/">secure your images</a>.</p> - -## In your routes - -Next, within your routes, setup your Glide server. Configure where the source images can be found, as well as where the manipulated images should be saved (the cache). Finally pass the server the request. It will handle all the image manipulations and will output the image. - -<div class="filename">routes.php</div> -~~~ php -<?php - -// Setup Glide server -$server = League\Glide\ServerFactory::create([ - 'source' => 'path/to/source/folder', - 'cache' => 'path/to/cache/folder', -]); - -// You could manually pass in the image path and manipulations options -$server->outputImage('users/1.jpg', ['w' => 300, 'h' => 400]); - -// But, a better approach is to use information from the request -$server->outputImage($path, $_GET); -~~~ - -<p class="message-notice">While the <code>outputImage()</code> method works okay, the <code>getImageResponse()</code> method is recommended. This allows your application to handle the outputting of the manipulated images. This approach does require a little more configuration. See <a href="config/responses/">responses</a> for more info.</p> diff --git a/vendor/league/glide/docs/CNAME b/vendor/league/glide/docs/CNAME deleted file mode 100644 index b86a6d2d19..0000000000 --- a/vendor/league/glide/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -glide.thephpleague.com
\ No newline at end of file diff --git a/vendor/league/glide/docs/_config.yml b/vendor/league/glide/docs/_config.yml deleted file mode 100644 index 83650a348a..0000000000 --- a/vendor/league/glide/docs/_config.yml +++ /dev/null @@ -1 +0,0 @@ -permalink: pretty
\ No newline at end of file diff --git a/vendor/league/glide/docs/_data/images.yml b/vendor/league/glide/docs/_data/images.yml deleted file mode 100644 index 56d1183918..0000000000 --- a/vendor/league/glide/docs/_data/images.yml +++ /dev/null @@ -1,8 +0,0 @@ -# Path to project specific favicon.ico, leave blank to use default -favicon: /favicon.ico - -# Path to project specific apple-touch-icon-precomposed.png, leave blank to use default -apple_touch: /apple-touch-icon-precomposed.png - -# Path to project logo -logo: /logo.png
\ No newline at end of file diff --git a/vendor/league/glide/docs/_data/menu.yml b/vendor/league/glide/docs/_data/menu.yml deleted file mode 100644 index 590bc1856a..0000000000 --- a/vendor/league/glide/docs/_data/menu.yml +++ /dev/null @@ -1,46 +0,0 @@ -'0.3': - Getting Started: - Introduction: '/0.3/' - Changelog: '/0.3/changelog/' - Installation: '/0.3/installation/' - Simple example: '/0.3/simple-example/' - Configuration: - The server: '/0.3/config/the-server/' - Basic usage: '/0.3/config/basic-usage/' - Source & cache: '/0.3/config/source-and-cache/' - Base URL: '/0.3/config/base-url/' - Image driver: '/0.3/config/image-driver/' - Secure images: '/0.3/config/secure-images/' - Max image size: '/0.3/config/max-image-size/' - Image API: - Size: '/0.3/api/size/' - Adjustments: '/0.3/api/adjustments/' - Effects: '/0.3/api/effects/' - Output: '/0.3/api/output/' -'1.0': - Getting Started: - Introduction: '/' - Changelog: '/1.0/changelog/' - Installation: '/1.0/installation/' - Simple example: '/1.0/simple-example/' - Configuration: - Setup: '/1.0/config/setup/' - Source & cache: '/1.0/config/source-and-cache/' - Security: '/1.0/config/security/' - Responses: '/1.0/config/responses/' - Image driver: '/1.0/config/image-driver/' - Defaults & presets: '/1.0/config/defaults-and-presets/' - Advanced usage: '/1.0/config/advanced-usage/' - Image API: - Quick reference: '/1.0/api/quick-reference/' - Orientation: '/1.0/api/orientation/' - Flip: '/1.0/api/flip/' - Crop: '/1.0/api/crop/' - Size: '/1.0/api/size/' - Pixel density: '/1.0/api/pixel-density/' - Adjustments: '/1.0/api/adjustments/' - Effects: '/1.0/api/effects/' - Watermarks: '/1.0/api/watermarks/' - Background: '/1.0/api/background/' - Border: '/1.0/api/border/' - Encode: '/1.0/api/encode/' diff --git a/vendor/league/glide/docs/_data/project.yml b/vendor/league/glide/docs/_data/project.yml deleted file mode 100644 index 683ce234be..0000000000 --- a/vendor/league/glide/docs/_data/project.yml +++ /dev/null @@ -1,5 +0,0 @@ -title: Glide -tagline: HTTP based image manipulations -description: Wonderfully easy on-demand image manipulation library with an HTTP based API. -google_analytics_tracking_id: UA-46050814-13 -default_version: "1.0"
\ No newline at end of file diff --git a/vendor/league/glide/docs/_layouts/default.html b/vendor/league/glide/docs/_layouts/default.html deleted file mode 100644 index 23d3124615..0000000000 --- a/vendor/league/glide/docs/_layouts/default.html +++ /dev/null @@ -1,146 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - - {% assign version = page.url | remove_first: "/" | split: "/"" | first %} - {% if version == nil %} - {% assign version = site.data.project.default_version %} - {% endif %} - - {% capture version_home %}/{{ version }}/{% endcapture %} - {% if page.url == '/' or page.url == version_home %} - <title>{{ site.data.project.title }} - {{ site.data.project.tagline }}</title> - {% else %} - <title>{{ page.title }} - {{ site.data.project.title }}</title> - {% endif %} - - {% if site.data.project.description %} - <meta name="description" content="{{ site.data.project.description }}"> - {% endif %} - - {% if site.github.url %} - <base href="{{ site.github.url }}/{{ version }}/"> - {% else %} - <base href="/{{ version }}/"> - {% endif %} - - {% if site.data.images.favicon %} - <link rel="icon" type="image/x-icon" href="{{ site.data.images.favicon }}" /> - {% else %} - <link rel="icon" type="image/x-icon" href="https://theme.thephpleague.com/img/favicon.ico" /> - {% endif %} - - {% if site.data.images.apple_touch %} - <link rel="apple-touch-icon-precomposed" href="{{ site.data.images.apple_touch }}"> - {% else %} - <link rel="apple-touch-icon-precomposed" href="https://theme.thephpleague.com/img/apple-touch-icon-precomposed.png"> - {% endif %} - - <link rel="stylesheet" href="https://theme.thephpleague.com/css/all.css?2"> - <link rel="stylesheet" href="/custom.css?1"> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css" /> -</head> -<body> - -<a href="https://github.com/thephpleague/glide" class="github"> - <img src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"> -</a> - -<section class="all_packages"> - <a href="http://thephpleague.com/"> - <img src="https://theme.thephpleague.com/img/loep_logo.png" width="195" height="200" alt="The League of Extraordinary Packages"> - </a> - <h2>Our Packages:</h2> - <ul> - <!-- Loaded via JavaScript --> - </ul> -</section> - -<header> - <a class="logo" href="{% if version == site.data.project.default_version %}/{% else %}/{{ version }}/{% endif %}"> - {% if site.data.images.logo %} - <span class="icon"> - <img src="{{ site.data.images.logo }}" alt="{{ site.data.project.title }} - {{ site.data.project.tagline }}"> - </span> - {% endif %} - <span class="name">{{ site.data.project.title }}</span> - <span class="tagline">{{ site.data.project.tagline }}</span> - </a> - <a href="http://thephpleague.com/" class="league"> - Presented by The League of Extraordinary Packages - </a> -</header> - -<input type="checkbox" id="menu"> -<label for="menu" onclick> - <div class="closed">☰ Menu</div> - <div class="open">☰ Hide Menu</div> -</label> - -<main> - <menu> - - <div class="tool"> - <select class="versions"> - {% for v in site.data.menu %} - <option data-url="{% if v[0] == site.data.project.default_version %}/{% else %}/{{ v[0] }}/{% endif %}" {% if version == v[0] %}selected="selected"{% endif %}> - Version: {{ v[0] }} - </option> - {% endfor %} - </select> - </div> - - <div class="tool"> - <input id="search" class="search" placeholder="Search…"> - </div> - - {% for section in site.data.menu[version] %} - <h2>{{ section[0] }}</h2> - <ul> - {% for link in section[1] %} - <li {% if page.url == link[1] %}class="selected"{% endif %}> - <a href="{{ link[1] }}">{{ link[0] }}</a> - </li> - {% endfor %} - </ul> - {% endfor %} - </menu> - <article> - {{ content }} - </article> -</main> - -<footer> - <span>© Copyright <a href="http://thephpleague.com">The League of Extraordinary Packages</a>.</span> - <span>Site design by <a href="http://reinink.ca">Jonathan Reinink</a>.</span> -</footer> - -<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> -<script src="//theme.thephpleague.com/js/scripts.js"></script> -<script src="/custom.js"></script> - -{% if site.data.project.google_analytics_tracking_id %} - <script> - (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= - function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; - e=o.createElement(i);r=o.getElementsByTagName(i)[0]; - e.src='//www.google-analytics.com/analytics.js'; - r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); - ga('create','{{ site.data.project.google_analytics_tracking_id }}');ga('send','pageview'); - </script> -{% endif %} - -<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script> -<script type="text/javascript"> - docsearch({ - apiKey: 'f80ad04b27fad1483c381090747a8be7', - indexName: 'glide', - inputSelector: '#search' - }); -</script> - -</body> -</html> diff --git a/vendor/league/glide/docs/apple-touch-icon-precomposed.png b/vendor/league/glide/docs/apple-touch-icon-precomposed.png Binary files differdeleted file mode 100644 index c3db477a08..0000000000 --- a/vendor/league/glide/docs/apple-touch-icon-precomposed.png +++ /dev/null diff --git a/vendor/league/glide/docs/custom.css b/vendor/league/glide/docs/custom.css deleted file mode 100644 index 31ee1830a1..0000000000 --- a/vendor/league/glide/docs/custom.css +++ /dev/null @@ -1,105 +0,0 @@ -header .logo .icon { - position: relative; - top: 0; -} - -menu .tool { - margin: 15px 0 0 0; - padding: 0 45px; -} - -menu .versions { - display: inline-block; - width: 100%; -} - -menu .search { - display: inline-block; - width: 100%; - padding: 7px 10px; - - color: #6abcdd; - font-size: 14px; - font-family: "Museo Sans 300"; - - border: 0; - outline: 0; - background: #22303f; - border-radius: 3px; -} - -@media screen and (max-width: 549px) { - menu { - text-align: center; - } - menu .tool { - margin: 15px 0 0 0; - } -} - -@media screen and (min-width: 550px) and (max-width: 849px) { - menu .tool { - margin: 15px 0 0 0; - padding: 0 30px; - } -} - -img[src*="herokuapp"] { - display: block; - max-width: 100%; - height: auto; -} - -h2 code { - position: relative; - top: -4px; - display: inline-block; - padding: 4px 10px 2px 10px; - font-family: Consolas,Monaco,'Andale Mono',monospace; - font-size: 22px; - line-height: 100%; - border-radius: 2px; - background: #f5f6f7; - border: solid #dcdddd 1px; - font-weight: normal; -} - -table code { - display: inline-block; - padding: 3px 5px; - font-family: Consolas, Monaco, 'Andale Mono', monospace; - font-size: 17px; - line-height: 100%; - border-radius: 2px; - background: #f5f6f7; - border: solid #dcdddd 1px; -} - -.photo_credit { - margin: -5px 0 0 0; - font-size: 14px; - color: #8e8e8e; -} - -.photo_credit a { - color: #8e8e8e; - text-decoration: none; -} - -.photo_credit a:hover { - text-decoration: underline; -} - -.github { - position: absolute; - top: 0; - right: 0; - border: 0; - z-index: 1000; -} - -@media screen and (max-width: 1065px) { - .github { - display: none; - } -}
\ No newline at end of file diff --git a/vendor/league/glide/docs/custom.js b/vendor/league/glide/docs/custom.js deleted file mode 100644 index c1b5ea1e1e..0000000000 --- a/vendor/league/glide/docs/custom.js +++ /dev/null @@ -1,5 +0,0 @@ -$(function() { - $('.versions').change(function (e) { - location.href = $(this).find('option:selected').data('url'); - }); -});
\ No newline at end of file diff --git a/vendor/league/glide/docs/favicon.ico b/vendor/league/glide/docs/favicon.ico Binary files differdeleted file mode 100644 index 85397aa080..0000000000 --- a/vendor/league/glide/docs/favicon.ico +++ /dev/null diff --git a/vendor/league/glide/docs/logo.png b/vendor/league/glide/docs/logo.png Binary files differdeleted file mode 100644 index 6e380072bc..0000000000 --- a/vendor/league/glide/docs/logo.png +++ /dev/null diff --git a/vendor/league/glide/phpunit.xml.dist b/vendor/league/glide/phpunit.xml.dist deleted file mode 100644 index 2c7e08774c..0000000000 --- a/vendor/league/glide/phpunit.xml.dist +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<phpunit colors="true" bootstrap="vendor/autoload.php"> - <testsuites> - <testsuite name="all"> - <directory suffix="Test.php">tests/</directory> - </testsuite> - </testsuites> - <filter> - <whitelist> - <directory suffix=".php">src/</directory> - </whitelist> - </filter> - <logging> - <log type="tap" target="build/report.tap"/> - <log type="junit" target="build/report.junit.xml"/> - <log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/> - <log type="coverage-text" target="build/coverage.txt"/> - <log type="coverage-clover" target="build/logs/clover.xml"/> - </logging> -</phpunit>
\ No newline at end of file diff --git a/vendor/league/glide/src/Api/Api.php b/vendor/league/glide/src/Api/Api.php deleted file mode 100644 index aee4f5fce8..0000000000 --- a/vendor/league/glide/src/Api/Api.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -namespace League\Glide\Api; - -use Intervention\Image\ImageManager; -use InvalidArgumentException; -use League\Glide\Manipulators\ManipulatorInterface; - -class Api implements ApiInterface -{ - /** - * Intervention image manager. - * @var ImageManager - */ - protected $imageManager; - - /** - * Collection of manipulators. - * @var array - */ - protected $manipulators; - - /** - * Create API instance. - * @param ImageManager $imageManager Intervention image manager. - * @param array $manipulators Collection of manipulators. - */ - public function __construct(ImageManager $imageManager, array $manipulators) - { - $this->setImageManager($imageManager); - $this->setManipulators($manipulators); - } - - /** - * Set the image manager. - * @param ImageManager $imageManager Intervention image manager. - */ - public function setImageManager(ImageManager $imageManager) - { - $this->imageManager = $imageManager; - } - - /** - * Get the image manager. - * @return ImageManager Intervention image manager. - */ - public function getImageManager() - { - return $this->imageManager; - } - - /** - * Set the manipulators. - * @param array $manipulators Collection of manipulators. - */ - public function setManipulators(array $manipulators) - { - foreach ($manipulators as $manipulator) { - if (!($manipulator instanceof ManipulatorInterface)) { - throw new InvalidArgumentException('Not a valid manipulator.'); - } - } - - $this->manipulators = $manipulators; - } - - /** - * Get the manipulators. - * @return array Collection of manipulators. - */ - public function getManipulators() - { - return $this->manipulators; - } - - /** - * Perform image manipulations. - * @param string $source Source image binary data. - * @param array $params The manipulation params. - * @return string Manipulated image binary data. - */ - public function run($source, array $params) - { - $image = $this->imageManager->make($source); - - foreach ($this->manipulators as $manipulator) { - $manipulator->setParams($params); - - $image = $manipulator->run($image); - } - - return $image->getEncoded(); - } -} diff --git a/vendor/league/glide/src/Api/ApiInterface.php b/vendor/league/glide/src/Api/ApiInterface.php deleted file mode 100644 index bcebe962a5..0000000000 --- a/vendor/league/glide/src/Api/ApiInterface.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -namespace League\Glide\Api; - -interface ApiInterface -{ - /** - * Perform image manipulations. - * @param string $source Source image binary data. - * @param array $params The manipulation params. - * @return string Manipulated image binary data. - */ - public function run($source, array $params); -} diff --git a/vendor/league/glide/src/Filesystem/FileNotFoundException.php b/vendor/league/glide/src/Filesystem/FileNotFoundException.php deleted file mode 100644 index acd25c0522..0000000000 --- a/vendor/league/glide/src/Filesystem/FileNotFoundException.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace League\Glide\Filesystem; - -use Exception; - -class FileNotFoundException extends Exception -{ -} diff --git a/vendor/league/glide/src/Filesystem/FilesystemException.php b/vendor/league/glide/src/Filesystem/FilesystemException.php deleted file mode 100644 index df6cbd6ccc..0000000000 --- a/vendor/league/glide/src/Filesystem/FilesystemException.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace League\Glide\Filesystem; - -use Exception; - -class FilesystemException extends Exception -{ -} diff --git a/vendor/league/glide/src/Manipulators/Background.php b/vendor/league/glide/src/Manipulators/Background.php deleted file mode 100644 index 80c4818909..0000000000 --- a/vendor/league/glide/src/Manipulators/Background.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; -use League\Glide\Manipulators\Helpers\Color; - -/** - * @property string $bg - */ -class Background extends BaseManipulator -{ - /** - * Perform background image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - if (is_null($this->bg)) { - return $image; - } - - $color = (new Color($this->bg))->formatted(); - - if ($color) { - $new = $image->getDriver()->newImage($image->width(), $image->height(), $color); - $new->mime = $image->mime; - $image = $new->insert($image, 'top-left', 0, 0); - } - - return $image; - } -} diff --git a/vendor/league/glide/src/Manipulators/BaseManipulator.php b/vendor/league/glide/src/Manipulators/BaseManipulator.php deleted file mode 100644 index 6395991e83..0000000000 --- a/vendor/league/glide/src/Manipulators/BaseManipulator.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -abstract class BaseManipulator implements ManipulatorInterface -{ - /** - * The manipulation params. - * @var array - */ - public $params = []; - - /** - * Set the manipulation params. - * @param array $params The manipulation params. - */ - public function setParams(array $params) - { - $this->params = $params; - - return $this; - } - - /** - * Get a specific manipulation param. - * @param string $name The manipulation name. - * @return string The manipulation value. - */ - public function __get($name) - { - if (array_key_exists($name, $this->params)) { - return $this->params[$name]; - } - } - - /** - * Perform the image manipulation. - * @return Image The manipulated image. - */ - abstract public function run(Image $image); -} diff --git a/vendor/league/glide/src/Manipulators/Blur.php b/vendor/league/glide/src/Manipulators/Blur.php deleted file mode 100644 index 3d7357eb80..0000000000 --- a/vendor/league/glide/src/Manipulators/Blur.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -/** - * @property string $blur - */ -class Blur extends BaseManipulator -{ - /** - * Perform blur image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - $blur = $this->getBlur(); - - if ($blur !== null) { - $image->blur($blur); - } - - return $image; - } - - /** - * Resolve blur amount. - * @return string The resolved blur amount. - */ - public function getBlur() - { - if (!is_numeric($this->blur)) { - return; - } - - if ($this->blur < 0 or $this->blur > 100) { - return; - } - - return (int) $this->blur; - } -} diff --git a/vendor/league/glide/src/Manipulators/Border.php b/vendor/league/glide/src/Manipulators/Border.php deleted file mode 100644 index 0fe5ef8bd6..0000000000 --- a/vendor/league/glide/src/Manipulators/Border.php +++ /dev/null @@ -1,176 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; -use League\Glide\Manipulators\Helpers\Color; -use League\Glide\Manipulators\Helpers\Dimension; - -/** - * @property string $border - * @property string $dpr - */ -class Border extends BaseManipulator -{ - /** - * Perform border image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - if ($border = $this->getBorder($image)) { - list($width, $color, $method) = $border; - - if ($method === 'overlay') { - return $this->runOverlay($image, $width, $color); - } - - if ($method === 'shrink') { - return $this->runShrink($image, $width, $color); - } - - if ($method === 'expand') { - return $this->runExpand($image, $width, $color); - } - } - - return $image; - } - - /** - * Resolve border amount. - * @param Image $image The source image. - * @return string The resolved border amount. - */ - public function getBorder(Image $image) - { - if (!$this->border) { - return; - } - - $values = explode(',', $this->border); - - $width = $this->getWidth($image, $this->getDpr(), isset($values[0]) ? $values[0] : null); - $color = $this->getColor(isset($values[1]) ? $values[1] : null); - $method = $this->getMethod(isset($values[2]) ? $values[2] : null); - - if ($width) { - return [$width, $color, $method]; - } - } - - /** - * Get border width. - * @param Image $image The source image. - * @param double $dpr The device pixel ratio. - * @param string $width The border width. - * @return double The resolved border width. - */ - public function getWidth(Image $image, $dpr, $width) - { - return (new Dimension($image, $dpr))->get($width); - } - - /** - * Get formatted color. - * @param string $color The color. - * @return string The formatted color. - */ - public function getColor($color) - { - return (new Color($color))->formatted(); - } - - /** - * Resolve the border method. - * @param string $method The raw border method. - * @return string The resolved border method. - */ - public function getMethod($method) - { - if (!in_array($method, ['expand', 'shrink', 'overlay'], true)) { - return 'overlay'; - } - - return $method; - } - - /** - * Resolve the device pixel ratio. - * @return double The device pixel ratio. - */ - public function getDpr() - { - if (!is_numeric($this->dpr)) { - return 1.0; - } - - if ($this->dpr < 0 or $this->dpr > 8) { - return 1.0; - } - - return (double) $this->dpr; - } - - /** - * Run the overlay border method. - * @param Image $image The source image. - * @param double $width The border width. - * @param string $color The border color. - * @return Image The manipulated image. - */ - public function runOverlay(Image $image, $width, $color) - { - return $image->rectangle( - $width / 2, - $width / 2, - $image->width() - ($width / 2), - $image->height() - ($width / 2), - function ($draw) use ($width, $color) { - $draw->border($width, $color); - } - ); - } - - /** - * Run the shrink border method. - * @param Image $image The source image. - * @param double $width The border width. - * @param string $color The border color. - * @return Image The manipulated image. - */ - public function runShrink(Image $image, $width, $color) - { - return $image - ->resize( - $image->width() - ($width * 2), - $image->height() - ($width * 2) - ) - ->resizeCanvas( - $width * 2, - $width * 2, - 'center', - true, - $color - ); - } - - /** - * Run the expand border method. - * @param Image $image The source image. - * @param double $width The border width. - * @param string $color The border color. - * @return Image The manipulated image. - */ - public function runExpand(Image $image, $width, $color) - { - return $image->resizeCanvas( - $width * 2, - $width * 2, - 'center', - true, - $color - ); - } -} diff --git a/vendor/league/glide/src/Manipulators/Brightness.php b/vendor/league/glide/src/Manipulators/Brightness.php deleted file mode 100644 index bfb3b55540..0000000000 --- a/vendor/league/glide/src/Manipulators/Brightness.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -/** - * @property string $bri - */ -class Brightness extends BaseManipulator -{ - /** - * Perform brightness image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - $brightness = $this->getBrightness(); - - if ($brightness !== null) { - $image->brightness($brightness); - } - - return $image; - } - - /** - * Resolve brightness amount. - * @return string The resolved brightness amount. - */ - public function getBrightness() - { - if (!preg_match('/^-*[0-9]+$/', $this->bri)) { - return; - } - - if ($this->bri < -100 or $this->bri > 100) { - return; - } - - return (int) $this->bri; - } -} diff --git a/vendor/league/glide/src/Manipulators/Contrast.php b/vendor/league/glide/src/Manipulators/Contrast.php deleted file mode 100644 index d123dac20e..0000000000 --- a/vendor/league/glide/src/Manipulators/Contrast.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -/** - * @property string $con - */ -class Contrast extends BaseManipulator -{ - /** - * Perform contrast image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - $contrast = $this->getContrast(); - - if ($contrast !== null) { - $image->contrast($contrast); - } - - return $image; - } - - /** - * Resolve contrast amount. - * @return string The resolved contrast amount. - */ - public function getContrast() - { - if (!preg_match('/^-*[0-9]+$/', $this->con)) { - return; - } - - if ($this->con < -100 or $this->con > 100) { - return; - } - - return (int) $this->con; - } -} diff --git a/vendor/league/glide/src/Manipulators/Crop.php b/vendor/league/glide/src/Manipulators/Crop.php deleted file mode 100644 index 3d1453cc0b..0000000000 --- a/vendor/league/glide/src/Manipulators/Crop.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -/** - * @property string $crop - */ -class Crop extends BaseManipulator -{ - /** - * Perform crop image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - $coordinates = $this->getCoordinates($image); - - if ($coordinates) { - $coordinates = $this->limitToImageBoundaries($image, $coordinates); - - $image->crop( - $coordinates[0], - $coordinates[1], - $coordinates[2], - $coordinates[3] - ); - } - - return $image; - } - - /** - * Resolve coordinates. - * @param Image $image The source image. - * @return int[] The resolved coordinates. - */ - public function getCoordinates(Image $image) - { - $coordinates = explode(',', $this->crop); - - if (count($coordinates) !== 4 or - (!is_numeric($coordinates[0])) or - (!is_numeric($coordinates[1])) or - (!is_numeric($coordinates[2])) or - (!is_numeric($coordinates[3])) or - ($coordinates[0] <= 0) or - ($coordinates[1] <= 0) or - ($coordinates[2] < 0) or - ($coordinates[3] < 0) or - ($coordinates[2] >= $image->width()) or - ($coordinates[3] >= $image->height())) { - return; - } - - return [ - (int) $coordinates[0], - (int) $coordinates[1], - (int) $coordinates[2], - (int) $coordinates[3], - ]; - } - - /** - * Limit coordinates to image boundaries. - * @param Image $image The source image. - * @param int[] $coordinates The coordinates. - * @return int[] The limited coordinates. - */ - public function limitToImageBoundaries(Image $image, array $coordinates) - { - if ($coordinates[0] > ($image->width() - $coordinates[2])) { - $coordinates[0] = $image->width() - $coordinates[2]; - } - - if ($coordinates[1] > ($image->height() - $coordinates[3])) { - $coordinates[1] = $image->height() - $coordinates[3]; - } - - return $coordinates; - } -} diff --git a/vendor/league/glide/src/Manipulators/Encode.php b/vendor/league/glide/src/Manipulators/Encode.php deleted file mode 100644 index 68787b92d8..0000000000 --- a/vendor/league/glide/src/Manipulators/Encode.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -/** - * @property string $fm - * @property string $q - */ -class Encode extends BaseManipulator -{ - /** - * Perform output image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - $format = $this->getFormat($image); - $quality = $this->getQuality(); - - if (in_array($format, ['jpg', 'pjpg'], true)) { - $image = $image->getDriver() - ->newImage($image->width(), $image->height(), '#fff') - ->insert($image, 'top-left', 0, 0); - } - - if ($format === 'pjpg') { - $image->interlace(); - $format = 'jpg'; - } - - return $image->encode($format, $quality); - } - - /** - * Resolve format. - * @param Image $image The source image. - * @return string The resolved format. - */ - public function getFormat(Image $image) - { - $allowed = [ - 'gif' => 'image/gif', - 'jpg' => 'image/jpeg', - 'pjpg' => 'image/jpeg', - 'png' => 'image/png', - 'webp' => 'image/webp', - ]; - - if (array_key_exists($this->fm, $allowed)) { - return $this->fm; - } - - if ($format = array_search($image->mime(), $allowed, true)) { - return $format; - } - - return 'jpg'; - } - - /** - * Resolve quality. - * @return string The resolved quality. - */ - public function getQuality() - { - $default = 90; - - if (!is_numeric($this->q)) { - return $default; - } - - if ($this->q < 0 or $this->q > 100) { - return $default; - } - - return (int) $this->q; - } -} diff --git a/vendor/league/glide/src/Manipulators/Filter.php b/vendor/league/glide/src/Manipulators/Filter.php deleted file mode 100644 index 9c3d53808d..0000000000 --- a/vendor/league/glide/src/Manipulators/Filter.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -/** - * @property string $filt - */ -class Filter extends BaseManipulator -{ - /** - * Perform filter image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - if ($this->filt === 'greyscale') { - return $this->runGreyscaleFilter($image); - } - - if ($this->filt === 'sepia') { - return $this->runSepiaFilter($image); - } - - return $image; - } - - /** - * Perform greyscale manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function runGreyscaleFilter(Image $image) - { - return $image->greyscale(); - } - - /** - * Perform sepia manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function runSepiaFilter(Image $image) - { - $image->greyscale(); - $image->brightness(-10); - $image->contrast(10); - $image->colorize(38, 27, 12); - $image->brightness(-10); - $image->contrast(10); - - return $image; - } -} diff --git a/vendor/league/glide/src/Manipulators/Flip.php b/vendor/league/glide/src/Manipulators/Flip.php deleted file mode 100644 index fc0c2f2d58..0000000000 --- a/vendor/league/glide/src/Manipulators/Flip.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -/** - * @property string $flip - */ -class Flip extends BaseManipulator -{ - /** - * Perform flip image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - if ($flip = $this->getFlip()) { - if ($flip === 'both') { - return $image->flip('h')->flip('v'); - } - - return $image->flip($flip); - } - - return $image; - } - - /** - * Resolve flip. - * @return string The resolved flip. - */ - public function getFlip() - { - if (in_array($this->flip, ['h', 'v', 'both'], true)) { - return $this->flip; - } - } -} diff --git a/vendor/league/glide/src/Manipulators/Gamma.php b/vendor/league/glide/src/Manipulators/Gamma.php deleted file mode 100644 index 9ae1942089..0000000000 --- a/vendor/league/glide/src/Manipulators/Gamma.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -/** - * @property string $gam - */ -class Gamma extends BaseManipulator -{ - /** - * Perform gamma image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - $gamma = $this->getGamma(); - - if ($gamma) { - $image->gamma($gamma); - } - - return $image; - } - - /** - * Resolve gamma amount. - * @return string The resolved gamma amount. - */ - public function getGamma() - { - if (!preg_match('/^[0-9]\.*[0-9]*$/', $this->gam)) { - return; - } - - if ($this->gam < 0.1 or $this->gam > 9.99) { - return; - } - - return (double) $this->gam; - } -} diff --git a/vendor/league/glide/src/Manipulators/Helpers/Color.php b/vendor/league/glide/src/Manipulators/Helpers/Color.php deleted file mode 100644 index 92cdda0ccd..0000000000 --- a/vendor/league/glide/src/Manipulators/Helpers/Color.php +++ /dev/null @@ -1,274 +0,0 @@ -<?php - -namespace League\Glide\Manipulators\Helpers; - -class Color -{ - /** - * 3 digit color code expression. - */ - const SHORT_RGB = '/^[0-9a-f]{3}$/i'; - - /** - * 4 digit color code expression. - */ - const SHORT_ARGB = '/^[0-9]{1}[0-9a-f]{3}$/i'; - - /** - * 6 digit color code expression. - */ - const LONG_RGB = '/^[0-9a-f]{6}$/i'; - - /** - * 8 digit color code expression. - */ - const LONG_ARGB = '/^[0-9]{2}[0-9a-f]{6}$/i'; - - /** - * The red value. - * @var int - */ - protected $red; - - /** - * The green value. - * @var int - */ - protected $green; - - /** - * The blue value. - * @var int - */ - protected $blue; - - /** - * The alpha value. - * @var int|double - */ - protected $alpha; - - /** - * Create color helper instance. - * @param string $value The color value. - */ - public function __construct($value) - { - do { - if ($hex = $this->getHexFromColorName($value)) { - $rgba = $this->parseHex($hex); - $alpha = 1; - break; - } - - if (preg_match(self::SHORT_RGB, $value)) { - $rgba = $this->parseHex($value.$value); - $alpha = 1; - break; - } - - if (preg_match(self::SHORT_ARGB, $value)) { - $rgba = $this->parseHex(substr($value, 1).substr($value, 1)); - $alpha = substr($value, 0, 1) / 10; - break; - } - - if (preg_match(self::LONG_RGB, $value)) { - $rgba = $this->parseHex($value); - $alpha = 1; - break; - } - - if (preg_match(self::LONG_ARGB, $value)) { - $rgba = $this->parseHex(substr($value, 2)); - $alpha = substr($value, 0, 2) / 100; - break; - } - - $rgba = [255, 255, 255]; - $alpha = 0; - } while (false); - - $this->red = $rgba[0]; - $this->green = $rgba[1]; - $this->blue = $rgba[2]; - $this->alpha = $alpha; - } - - /** - * Parse hex color to RGB values. - * @param string $hex The hex value. - * @return array The RGB values. - */ - public function parseHex($hex) - { - return array_map('hexdec', str_split($hex, 2)); - } - - /** - * Format color for consumption. - * @return string The formatted color. - */ - public function formatted() - { - return 'rgba('.$this->red.', '.$this->green.', '.$this->blue.', '.$this->alpha.')'; - } - - /** - * Get hex code by color name. - * @param string $name The color name. - * @return string The hex code. - */ - public function getHexFromColorName($name) - { - $colors = [ - 'aliceblue' => 'F0F8FF', - 'antiquewhite' => 'FAEBD7', - 'aqua' => '00FFFF', - 'aquamarine' => '7FFFD4', - 'azure' => 'F0FFFF', - 'beige' => 'F5F5DC', - 'bisque' => 'FFE4C4', - 'black' => '000000', - 'blanchedalmond' => 'FFEBCD', - 'blue' => '0000FF', - 'blueviolet' => '8A2BE2', - 'brown' => 'A52A2A', - 'burlywood' => 'DEB887', - 'cadetblue' => '5F9EA0', - 'chartreuse' => '7FFF00', - 'chocolate' => 'D2691E', - 'coral' => 'FF7F50', - 'cornflowerblue' => '6495ED', - 'cornsilk' => 'FFF8DC', - 'crimson' => 'DC143C', - 'cyan' => '00FFFF', - 'darkblue' => '00008B', - 'darkcyan' => '008B8B', - 'darkgoldenrod' => 'B8860B', - 'darkgray' => 'A9A9A9', - 'darkgreen' => '006400', - 'darkkhaki' => 'BDB76B', - 'darkmagenta' => '8B008B', - 'darkolivegreen' => '556B2F', - 'darkorange' => 'FF8C00', - 'darkorchid' => '9932CC', - 'darkred' => '8B0000', - 'darksalmon' => 'E9967A', - 'darkseagreen' => '8FBC8F', - 'darkslateblue' => '483D8B', - 'darkslategray' => '2F4F4F', - 'darkturquoise' => '00CED1', - 'darkviolet' => '9400D3', - 'deeppink' => 'FF1493', - 'deepskyblue' => '00BFFF', - 'dimgray' => '696969', - 'dodgerblue' => '1E90FF', - 'firebrick' => 'B22222', - 'floralwhite' => 'FFFAF0', - 'forestgreen' => '228B22', - 'fuchsia' => 'FF00FF', - 'gainsboro' => 'DCDCDC', - 'ghostwhite' => 'F8F8FF', - 'gold' => 'FFD700', - 'goldenrod' => 'DAA520', - 'gray' => '808080', - 'green' => '008000', - 'greenyellow' => 'ADFF2F', - 'honeydew' => 'F0FFF0', - 'hotpink' => 'FF69B4', - 'indianred' => 'CD5C5C', - 'indigo' => '4B0082', - 'ivory' => 'FFFFF0', - 'khaki' => 'F0E68C', - 'lavender' => 'E6E6FA', - 'lavenderblush' => 'FFF0F5', - 'lawngreen' => '7CFC00', - 'lemonchiffon' => 'FFFACD', - 'lightblue' => 'ADD8E6', - 'lightcoral' => 'F08080', - 'lightcyan' => 'E0FFFF', - 'lightgoldenrodyellow' => 'FAFAD2', - 'lightgray' => 'D3D3D3', - 'lightgreen' => '90EE90', - 'lightpink' => 'FFB6C1', - 'lightsalmon' => 'FFA07A', - 'lightseagreen' => '20B2AA', - 'lightskyblue' => '87CEFA', - 'lightslategray' => '778899', - 'lightsteelblue' => 'B0C4DE', - 'lightyellow' => 'FFFFE0', - 'lime' => '00FF00', - 'limegreen' => '32CD32', - 'linen' => 'FAF0E6', - 'magenta' => 'FF00FF', - 'maroon' => '800000', - 'mediumaquamarine' => '66CDAA', - 'mediumblue' => '0000CD', - 'mediumorchid' => 'BA55D3', - 'mediumpurple' => '9370DB', - 'mediumseagreen' => '3CB371', - 'mediumslateblue' => '7B68EE', - 'mediumspringgreen' => '00FA9A', - 'mediumturquoise' => '48D1CC', - 'mediumvioletred' => 'C71585', - 'midnightblue' => '191970', - 'mintcream' => 'F5FFFA', - 'mistyrose' => 'FFE4E1', - 'moccasin' => 'FFE4B5', - 'navajowhite' => 'FFDEAD', - 'navy' => '000080', - 'oldlace' => 'FDF5E6', - 'olive' => '808000', - 'olivedrab' => '6B8E23', - 'orange' => 'FFA500', - 'orangered' => 'FF4500', - 'orchid' => 'DA70D6', - 'palegoldenrod' => 'EEE8AA', - 'palegreen' => '98FB98', - 'paleturquoise' => 'AFEEEE', - 'palevioletred' => 'DB7093', - 'papayawhip' => 'FFEFD5', - 'peachpuff' => 'FFDAB9', - 'peru' => 'CD853F', - 'pink' => 'FFC0CB', - 'plum' => 'DDA0DD', - 'powderblue' => 'B0E0E6', - 'purple' => '800080', - 'rebeccapurple' => '663399', - 'red' => 'FF0000', - 'rosybrown' => 'BC8F8F', - 'royalblue' => '4169E1', - 'saddlebrown' => '8B4513', - 'salmon' => 'FA8072', - 'sandybrown' => 'F4A460', - 'seagreen' => '2E8B57', - 'seashell' => 'FFF5EE', - 'sienna' => 'A0522D', - 'silver' => 'C0C0C0', - 'skyblue' => '87CEEB', - 'slateblue' => '6A5ACD', - 'slategray' => '708090', - 'snow' => 'FFFAFA', - 'springgreen' => '00FF7F', - 'steelblue' => '4682B4', - 'tan' => 'D2B48C', - 'teal' => '008080', - 'thistle' => 'D8BFD8', - 'tomato' => 'FF6347', - 'turquoise' => '40E0D0', - 'violet' => 'EE82EE', - 'wheat' => 'F5DEB3', - 'white' => 'FFFFFF', - 'whitesmoke' => 'F5F5F5', - 'yellow' => 'FFFF00', - 'yellowgreen' => '9ACD32', - ]; - - $name = strtolower($name); - - if (array_key_exists($name, $colors)) { - return $colors[$name]; - } - } -} diff --git a/vendor/league/glide/src/Manipulators/Helpers/Dimension.php b/vendor/league/glide/src/Manipulators/Helpers/Dimension.php deleted file mode 100644 index ff7276f166..0000000000 --- a/vendor/league/glide/src/Manipulators/Helpers/Dimension.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -namespace League\Glide\Manipulators\Helpers; - -use Intervention\Image\Image; - -class Dimension -{ - /** - * The source image. - * @var Image - */ - protected $image; - - /** - * The device pixel ratio. - * @var integer - */ - protected $dpr; - - /** - * Create dimension helper instance. - * @param Image $image The source image. - * @param integer $dpr The device pixel ratio. - */ - public function __construct(Image $image, $dpr = 1) - { - $this->image = $image; - $this->dpr = $dpr; - } - - /** - * Resolve the dimension. - * @param string $value The dimension value. - * @return double The resolved dimension. - */ - public function get($value) - { - if (is_numeric($value) and $value > 0) { - return (double) $value * $this->dpr; - } - - if (preg_match('/^(\d{1,2}(?!\d)|100)(w|h)$/', $value, $matches)) { - if ($matches[2] === 'h') { - return (double) $this->image->height() * ($matches[1] / 100); - } - - return (double) $this->image->width() * ($matches[1] / 100); - } - } -} diff --git a/vendor/league/glide/src/Manipulators/ManipulatorInterface.php b/vendor/league/glide/src/Manipulators/ManipulatorInterface.php deleted file mode 100644 index 1d9befde55..0000000000 --- a/vendor/league/glide/src/Manipulators/ManipulatorInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -interface ManipulatorInterface -{ - /** - * Set the manipulation params. - * @param array $params The manipulation params. - */ - public function setParams(array $params); - - /** - * Perform the image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image); -} diff --git a/vendor/league/glide/src/Manipulators/Orientation.php b/vendor/league/glide/src/Manipulators/Orientation.php deleted file mode 100644 index 162607b40d..0000000000 --- a/vendor/league/glide/src/Manipulators/Orientation.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -/** - * @property string $or - */ -class Orientation extends BaseManipulator -{ - /** - * Perform orientation image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - $orientation = $this->getOrientation(); - - if ($orientation === 'auto') { - return $image->orientate(); - } - - return $image->rotate($orientation); - } - - /** - * Resolve orientation. - * @return string The resolved orientation. - */ - public function getOrientation() - { - if (in_array($this->or, ['auto', '0', '90', '180', '270'], true)) { - return $this->or; - } - - return 'auto'; - } -} diff --git a/vendor/league/glide/src/Manipulators/Pixelate.php b/vendor/league/glide/src/Manipulators/Pixelate.php deleted file mode 100644 index 40613caa03..0000000000 --- a/vendor/league/glide/src/Manipulators/Pixelate.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -/** - * @property string $pixel - */ -class Pixelate extends BaseManipulator -{ - /** - * Perform pixelate image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - $pixelate = $this->getPixelate(); - - if ($pixelate !== null) { - $image->pixelate($pixelate); - } - - return $image; - } - - /** - * Resolve pixelate amount. - * @return string The resolved pixelate amount. - */ - public function getPixelate() - { - if (!is_numeric($this->pixel)) { - return; - } - - if ($this->pixel < 0 or $this->pixel > 1000) { - return; - } - - return (int) $this->pixel; - } -} diff --git a/vendor/league/glide/src/Manipulators/Sharpen.php b/vendor/league/glide/src/Manipulators/Sharpen.php deleted file mode 100644 index 457dcaead1..0000000000 --- a/vendor/league/glide/src/Manipulators/Sharpen.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -/** - * @property string $sharp - */ -class Sharpen extends BaseManipulator -{ - /** - * Perform sharpen image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - $sharpen = $this->getSharpen(); - - if ($sharpen !== null) { - $image->sharpen($sharpen); - } - - return $image; - } - - /** - * Resolve sharpen amount. - * @return string The resolved sharpen amount. - */ - public function getSharpen() - { - if (!is_numeric($this->sharp)) { - return; - } - - if ($this->sharp < 0 or $this->sharp > 100) { - return; - } - - return (int) $this->sharp; - } -} diff --git a/vendor/league/glide/src/Manipulators/Size.php b/vendor/league/glide/src/Manipulators/Size.php deleted file mode 100644 index 0d661b5202..0000000000 --- a/vendor/league/glide/src/Manipulators/Size.php +++ /dev/null @@ -1,408 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; - -/** - * @property string $dpr - * @property string $fit - * @property string $h - * @property string $w - */ -class Size extends BaseManipulator -{ - /** - * Maximum image size in pixels. - * @var integer|null - */ - protected $maxImageSize; - - /** - * Create Size instance. - * @param integer|null $maxImageSize Maximum image size in pixels. - */ - public function __construct($maxImageSize = null) - { - $this->maxImageSize = $maxImageSize; - } - - /** - * Set the maximum image size. - * @param integer|null Maximum image size in pixels. - */ - public function setMaxImageSize($maxImageSize) - { - $this->maxImageSize = $maxImageSize; - } - - /** - * Get the maximum image size. - * @return integer|null Maximum image size in pixels. - */ - public function getMaxImageSize() - { - return $this->maxImageSize; - } - - /** - * Perform size image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - $width = $this->getWidth(); - $height = $this->getHeight(); - $fit = $this->getFit(); - $dpr = $this->getDpr(); - - list($width, $height) = $this->resolveMissingDimensions($image, $width, $height); - list($width, $height) = $this->applyDpr($width, $height, $dpr); - list($width, $height) = $this->limitImageSize($width, $height); - - if ((int) $width !== (int) $image->width() or (int) $height !== (int) $image->height()) { - $image = $this->runResize($image, $fit, (int) $width, (int) $height); - } - - return $image; - } - - /** - * Resolve width. - * @return integer|null The resolved width. - */ - public function getWidth() - { - if (!is_numeric($this->w)) { - return; - } - - if ($this->w <= 0) { - return; - } - - return (int) $this->w; - } - - /** - * Resolve height. - * @return integer|null The resolved height. - */ - public function getHeight() - { - if (!is_numeric($this->h)) { - return; - } - - if ($this->h <= 0) { - return; - } - - return (int) $this->h; - } - - /** - * Resolve fit. - * @return string The resolved fit. - */ - public function getFit() - { - if (in_array($this->fit, ['contain', 'fill', 'max', 'stretch'], true)) { - return $this->fit; - } - - if (preg_match('/^(crop)(-top-left|-top|-top-right|-left|-center|-right|-bottom-left|-bottom|-bottom-right|-[\d]{1,3}-[\d]{1,3}(?:-[\d]{1,3}(?:\.\d+)?)?)*$/', $this->fit)) { - return 'crop'; - } - - return 'contain'; - } - - /** - * Resolve the device pixel ratio. - * @return double The device pixel ratio. - */ - public function getDpr() - { - if (!is_numeric($this->dpr)) { - return 1.0; - } - - if ($this->dpr < 0 or $this->dpr > 8) { - return 1.0; - } - - return (double) $this->dpr; - } - - /** - * Resolve missing image dimensions. - * @param Image $image The source image. - * @param integer|null $width The image width. - * @param integer|null $height The image height. - * @return integer[] The resolved width and height. - */ - public function resolveMissingDimensions(Image $image, $width, $height) - { - if (is_null($width) and is_null($height)) { - $width = $image->width(); - $height = $image->height(); - } - - if (is_null($width)) { - $width = $height * ($image->width() / $image->height()); - } - - if (is_null($height)) { - $height = $width / ($image->width() / $image->height()); - } - - return [ - (int) $width, - (int) $height, - ]; - } - - /** - * Apply the device pixel ratio. - * @param integer $width The target image width. - * @param integer $height The target image height. - * @param integer $dpr The device pixel ratio. - * @return integer[] The modified width and height. - */ - public function applyDpr($width, $height, $dpr) - { - $width = $width * $dpr; - $height = $height * $dpr; - - return [ - (int) $width, - (int) $height, - ]; - } - - /** - * Limit image size to maximum allowed image size. - * @param integer $width The image width. - * @param integer $height The image height. - * @return integer[] The limited width and height. - */ - public function limitImageSize($width, $height) - { - if ($this->maxImageSize !== null) { - $imageSize = $width * $height; - - if ($imageSize > $this->maxImageSize) { - $width = $width / sqrt($imageSize / $this->maxImageSize); - $height = $height / sqrt($imageSize / $this->maxImageSize); - } - } - - return [ - (int) $width, - (int) $height, - ]; - } - - /** - * Perform resize image manipulation. - * @param Image $image The source image. - * @param string $fit The fit. - * @param integer $width The width. - * @param integer $height The height. - * @return Image The manipulated image. - */ - public function runResize(Image $image, $fit, $width, $height) - { - if ($fit === 'contain') { - return $this->runContainResize($image, $width, $height); - } - - if ($fit === 'fill') { - return $this->runFillResize($image, $width, $height); - } - - if ($fit === 'max') { - return $this->runMaxResize($image, $width, $height); - } - - if ($fit === 'stretch') { - return $this->runStretchResize($image, $width, $height); - } - - if ($fit === 'crop') { - return $this->runCropResize($image, $width, $height); - } - - return $image; - } - - /** - * Perform contain resize image manipulation. - * @param Image $image The source image. - * @param integer $width The width. - * @param integer $height The height. - * @return Image The manipulated image. - */ - public function runContainResize(Image $image, $width, $height) - { - return $image->resize($width, $height, function ($constraint) { - $constraint->aspectRatio(); - }); - } - - /** - * Perform max resize image manipulation. - * @param Image $image The source image. - * @param integer $width The width. - * @param integer $height The height. - * @return Image The manipulated image. - */ - public function runMaxResize(Image $image, $width, $height) - { - return $image->resize($width, $height, function ($constraint) { - $constraint->aspectRatio(); - $constraint->upsize(); - }); - } - - /** - * Perform fill resize image manipulation. - * @param Image $image The source image. - * @param integer $width The width. - * @param integer $height The height. - * @return Image The manipulated image. - */ - public function runFillResize($image, $width, $height) - { - $image = $this->runMaxResize($image, $width, $height); - - return $image->resizeCanvas($width, $height, 'center'); - } - - /** - * Perform stretch resize image manipulation. - * @param Image $image The source image. - * @param integer $width The width. - * @param integer $height The height. - * @return Image The manipulated image. - */ - public function runStretchResize(Image $image, $width, $height) - { - return $image->resize($width, $height); - } - - /** - * Perform crop resize image manipulation. - * @param Image $image The source image. - * @param integer $width The width. - * @param integer $height The height. - * @return Image The manipulated image. - */ - public function runCropResize(Image $image, $width, $height) - { - list($resize_width, $resize_height) = $this->resolveCropResizeDimensions($image, $width, $height); - - $zoom = $this->getCrop()[2]; - - $image->resize($resize_width * $zoom, $resize_height * $zoom, function ($constraint) { - $constraint->aspectRatio(); - }); - - list($offset_x, $offset_y) = $this->resolveCropOffset($image, $width, $height); - - return $image->crop($width, $height, $offset_x, $offset_y); - } - - /** - * Resolve the crop resize dimensions. - * @param Image $image The source image. - * @param integer $width The width. - * @param integer $height The height. - * @return array The resize dimensions. - */ - public function resolveCropResizeDimensions(Image $image, $width, $height) - { - if ($height > $width * ($image->height() / $image->width())) { - return [$height * ($image->width() / $image->height()), $height]; - } - - return [$width, $width * ($image->height() / $image->width())]; - } - - /** - * Resolve the crop offset. - * @param Image $image The source image. - * @param integer $width The width. - * @param integer $height The height. - * @return array The crop offset. - */ - public function resolveCropOffset(Image $image, $width, $height) - { - list($offset_percentage_x, $offset_percentage_y) = $this->getCrop(); - - $offset_x = (int) (($image->width() * $offset_percentage_x / 100) - ($width / 2)); - $offset_y = (int) (($image->height() * $offset_percentage_y / 100) - ($height / 2)); - - $max_offset_x = $image->width() - $width; - $max_offset_y = $image->height() - $height; - - if ($offset_x < 0) { - $offset_x = 0; - } - - if ($offset_y < 0) { - $offset_y = 0; - } - - if ($offset_x > $max_offset_x) { - $offset_x = $max_offset_x; - } - - if ($offset_y > $max_offset_y) { - $offset_y = $max_offset_y; - } - - return [$offset_x, $offset_y]; - } - - /** - * Resolve crop with zoom. - * @return integer[] The resolved crop. - */ - public function getCrop() - { - $cropMethods = [ - 'crop-top-left' => [0, 0, 1.0], - 'crop-top' => [50, 0, 1.0], - 'crop-top-right' => [100, 0, 1.0], - 'crop-left' => [0, 50, 1.0], - 'crop-center' => [50, 50, 1.0], - 'crop-right' => [100, 50, 1.0], - 'crop-bottom-left' => [0, 100, 1.0], - 'crop-bottom' => [50, 100, 1.0], - 'crop-bottom-right' => [100, 100, 1.0], - ]; - - if (array_key_exists($this->fit, $cropMethods)) { - return $cropMethods[$this->fit]; - } - - if (preg_match('/^crop-([\d]{1,3})-([\d]{1,3})(?:-([\d]{1,3}(?:\.\d+)?))*$/', $this->fit, $matches)) { - $matches[3] = isset($matches[3]) ? $matches[3] : 1; - - if ($matches[1] > 100 or $matches[2] > 100 or $matches[3] > 100) { - return [50, 50, 1.0]; - } - - return [ - (int) $matches[1], - (int) $matches[2], - (float) $matches[3], - ]; - } - - return [50, 50, 1.0]; - } -} diff --git a/vendor/league/glide/src/Manipulators/Watermark.php b/vendor/league/glide/src/Manipulators/Watermark.php deleted file mode 100644 index 376f05bdff..0000000000 --- a/vendor/league/glide/src/Manipulators/Watermark.php +++ /dev/null @@ -1,257 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\Image; -use League\Flysystem\FilesystemInterface; -use League\Glide\Filesystem\FilesystemException; -use League\Glide\Manipulators\Helpers\Dimension; - -/** - * @property string $dpr - * @property string $mark - * @property string $markfit - * @property string $markh - * @property string $markpad - * @property string $markpos - * @property string $markw - * @property string $markx - * @property string $marky - * @property string $markalpha - */ -class Watermark extends BaseManipulator -{ - /** - * The watermarks file system. - * @var FilesystemInterface|null - */ - protected $watermarks; - - /** - * The watermarks path prefix. - * @var string - */ - protected $watermarksPathPrefix; - - /** - * Create Watermark instance. - * @param FilesystemInterface $watermarks The watermarks file system. - */ - public function __construct(FilesystemInterface $watermarks = null, $watermarksPathPrefix = '') - { - $this->setWatermarks($watermarks); - $this->setWatermarksPathPrefix($watermarksPathPrefix); - } - - /** - * Set the watermarks file system. - * @param FilesystemInterface $watermarks The watermarks file system. - */ - public function setWatermarks(FilesystemInterface $watermarks = null) - { - $this->watermarks = $watermarks; - } - - /** - * Get the watermarks file system. - * @return FilesystemInterface The watermarks file system. - */ - public function getWatermarks() - { - return $this->watermarks; - } - - /** - * Set the watermarks path prefix. - * @param string $watermarksPathPrefix The watermarks path prefix. - */ - public function setWatermarksPathPrefix($watermarksPathPrefix = '') - { - $this->watermarksPathPrefix = trim($watermarksPathPrefix, '/'); - } - - /** - * Get the watermarks path prefix. - * @return string The watermarks path prefix. - */ - public function getWatermarksPathPrefix() - { - return $this->watermarksPathPrefix; - } - - /** - * Perform watermark image manipulation. - * @param Image $image The source image. - * @return Image The manipulated image. - */ - public function run(Image $image) - { - if ($watermark = $this->getImage($image)) { - $markw = $this->getDimension($image, 'markw'); - $markh = $this->getDimension($image, 'markh'); - $markx = $this->getDimension($image, 'markx'); - $marky = $this->getDimension($image, 'marky'); - $markpad = $this->getDimension($image, 'markpad'); - $markfit = $this->getFit(); - $markpos = $this->getPosition(); - $markalpha = $this->getAlpha(); - - if ($markpad) { - $markx = $marky = $markpad; - } - - $size = new Size(); - $size->setParams([ - 'w' => $markw, - 'h' => $markh, - 'fit' => $markfit, - ]); - $watermark = $size->run($watermark); - - if ($markalpha < 100) { - $watermark->opacity($markalpha); - } - - $image->insert($watermark, $markpos, intval($markx), intval($marky)); - } - - return $image; - } - - /** - * Get the watermark image. - * @param Image $image The source image. - * @return Image|null The watermark image. - */ - public function getImage(Image $image) - { - if (is_null($this->watermarks)) { - return; - } - - if (!is_string($this->mark)) { - return; - } - - if ($this->mark === '') { - return; - } - - $path = $this->mark; - - if ($this->watermarksPathPrefix) { - $path = $this->watermarksPathPrefix.'/'.$path; - } - - if ($this->watermarks->has($path)) { - $source = $this->watermarks->read($path); - - if ($source === false) { - throw new FilesystemException( - 'Could not read the image `'.$path.'`.' - ); - } - - return $image->getDriver()->init($source); - } - } - - /** - * Get a dimension. - * @param Image $image The source image. - * @param string $field The requested field. - * @return double|null The dimension. - */ - public function getDimension(Image $image, $field) - { - if ($this->{$field}) { - return (new Dimension($image, $this->getDpr()))->get($this->{$field}); - } - } - - /** - * Resolve the device pixel ratio. - * @return double The device pixel ratio. - */ - public function getDpr() - { - if (!is_numeric($this->dpr)) { - return 1.0; - } - - if ($this->dpr < 0 or $this->dpr > 8) { - return 1.0; - } - - return (double) $this->dpr; - } - - /** - * Get the fit. - * @return string The fit. - */ - public function getFit() - { - $fitMethods = [ - 'contain', - 'max', - 'stretch', - 'crop', - 'crop-top-left', - 'crop-top', - 'crop-top-right', - 'crop-left', - 'crop-center', - 'crop-right', - 'crop-bottom-left', - 'crop-bottom', - 'crop-bottom-right', - ]; - - if (in_array($this->markfit, $fitMethods, true)) { - return $this->markfit; - } - } - - /** - * Get the position. - * @return string The position. - */ - public function getPosition() - { - $positions = [ - 'top-left', - 'top', - 'top-right', - 'left', - 'center', - 'right', - 'bottom-left', - 'bottom', - 'bottom-right', - ]; - - if (in_array($this->markpos, $positions, true)) { - return $this->markpos; - } - - return 'bottom-right'; - } - - /** - * Get the alpha channel. - * @return int The alpha. - */ - public function getAlpha() - { - if (!is_numeric($this->markalpha)) { - return 100; - } - - if ($this->markalpha < 0 or $this->markalpha > 100) { - return 100; - } - - return (int) $this->markalpha; - } -} diff --git a/vendor/league/glide/src/Responses/PsrResponseFactory.php b/vendor/league/glide/src/Responses/PsrResponseFactory.php deleted file mode 100644 index 31c0a6670d..0000000000 --- a/vendor/league/glide/src/Responses/PsrResponseFactory.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php - -namespace League\Glide\Responses; - -use Closure; -use League\Flysystem\FilesystemInterface; -use League\Glide\Filesystem\FilesystemException; -use Psr\Http\Message\ResponseInterface; - -class PsrResponseFactory implements ResponseFactoryInterface -{ - /** - * Base response object. - * @var ResponseInterface - */ - protected $response; - - /** - * Callback to create stream. - * @var Closure - */ - protected $streamCallback; - - /** - * Create PsrResponseFactory instance. - * @param ResponseInterface $response Base response object. - * @param Closure $streamCallback Callback to create stream. - */ - public function __construct(ResponseInterface $response, Closure $streamCallback) - { - $this->response = $response; - $this->streamCallback = $streamCallback; - } - - /** - * Create response. - * @param FilesystemInterface $cache Cache file system. - * @param string $path Cached file path. - * @return ResponseInterface Response object. - */ - public function create(FilesystemInterface $cache, $path) - { - $stream = $this->streamCallback->__invoke( - $cache->readStream($path) - ); - - $contentType = $cache->getMimetype($path); - $contentLength = (string) $cache->getSize($path); - $cacheControl = 'max-age=31536000, public'; - $expires = date_create('+1 years')->format('D, d M Y H:i:s').' GMT'; - - if ($contentType === false) { - throw new FilesystemException('Unable to determine the image content type.'); - } - - if ($contentLength === false) { - throw new FilesystemException('Unable to determine the image content length.'); - } - - return $this->response->withBody($stream) - ->withHeader('Content-Type', $contentType) - ->withHeader('Content-Length', $contentLength) - ->withHeader('Cache-Control', $cacheControl) - ->withHeader('Expires', $expires); - } -} diff --git a/vendor/league/glide/src/Responses/ResponseFactoryInterface.php b/vendor/league/glide/src/Responses/ResponseFactoryInterface.php deleted file mode 100644 index b14e2aecd1..0000000000 --- a/vendor/league/glide/src/Responses/ResponseFactoryInterface.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -namespace League\Glide\Responses; - -use League\Flysystem\FilesystemInterface; - -interface ResponseFactoryInterface -{ - /** - * Create response. - * @param FilesystemInterface $cache Cache file system. - * @param string $path Cached file path. - * @return mixed The response object. - */ - public function create(FilesystemInterface $cache, $path); -} diff --git a/vendor/league/glide/src/Server.php b/vendor/league/glide/src/Server.php deleted file mode 100644 index b70847f4ff..0000000000 --- a/vendor/league/glide/src/Server.php +++ /dev/null @@ -1,546 +0,0 @@ -<?php - -namespace League\Glide; - -use InvalidArgumentException; -use League\Flysystem\FileExistsException; -use League\Flysystem\FilesystemInterface; -use League\Glide\Api\ApiInterface; -use League\Glide\Filesystem\FileNotFoundException; -use League\Glide\Filesystem\FilesystemException; -use League\Glide\Responses\ResponseFactoryInterface; - -class Server -{ - /** - * Source file system. - * @var FilesystemInterface - */ - protected $source; - - /** - * Source path prefix. - * @var string - */ - protected $sourcePathPrefix; - - /** - * Cache file system. - * @var FilesystemInterface - */ - protected $cache; - - /** - * Cache path prefix. - * @var string - */ - protected $cachePathPrefix; - - /** - * Whether to group cache in folders. - * @var bool - */ - protected $groupCacheInFolders = true; - - /** - * Whether to cache with file extensions. - * @var bool - */ - protected $cacheWithFileExtensions = false; - - /** - * Image manipulation API. - * @var ApiInterface - */ - protected $api; - - /** - * Response factory. - * @var ResponseFactoryInterface|null - */ - protected $responseFactory; - - /** - * Base URL. - * @var string - */ - protected $baseUrl; - - /** - * Default image manipulations. - * @var array - */ - protected $defaults = []; - - /** - * Preset image manipulations. - * @var array - */ - protected $presets = []; - - /** - * Create Server instance. - * @param FilesystemInterface $source Source file system. - * @param FilesystemInterface $cache Cache file system. - * @param ApiInterface $api Image manipulation API. - */ - public function __construct(FilesystemInterface $source, FilesystemInterface $cache, ApiInterface $api) - { - $this->setSource($source); - $this->setCache($cache); - $this->setApi($api); - } - - /** - * Set source file system. - * @param FilesystemInterface $source Source file system. - */ - public function setSource(FilesystemInterface $source) - { - $this->source = $source; - } - - /** - * Get source file system. - * @return FilesystemInterface Source file system. - */ - public function getSource() - { - return $this->source; - } - - /** - * Set source path prefix. - * @param string $sourcePathPrefix Source path prefix. - */ - public function setSourcePathPrefix($sourcePathPrefix) - { - $this->sourcePathPrefix = trim($sourcePathPrefix, '/'); - } - - /** - * Get source path prefix. - * @return string Source path prefix. - */ - public function getSourcePathPrefix() - { - return $this->sourcePathPrefix; - } - - /** - * Get source path. - * @param string $path Image path. - * @return string The source path. - * @throws FileNotFoundException - */ - public function getSourcePath($path) - { - $path = trim($path, '/'); - - $baseUrl = $this->baseUrl.'/'; - - if (substr($path, 0, strlen($baseUrl)) === $baseUrl) { - $path = trim(substr($path, strlen($baseUrl)), '/'); - } - - if ($path === '') { - throw new FileNotFoundException('Image path missing.'); - } - - if ($this->sourcePathPrefix) { - $path = $this->sourcePathPrefix.'/'.$path; - } - - return rawurldecode($path); - } - - /** - * Check if a source file exists. - * @param string $path Image path. - * @return bool Whether the source file exists. - */ - public function sourceFileExists($path) - { - return $this->source->has($this->getSourcePath($path)); - } - - /** - * Set base URL. - * @param string $baseUrl Base URL. - */ - public function setBaseUrl($baseUrl) - { - $this->baseUrl = trim($baseUrl, '/'); - } - - /** - * Get base URL. - * @return string Base URL. - */ - public function getBaseUrl() - { - return $this->baseUrl; - } - - /** - * Set cache file system. - * @param FilesystemInterface $cache Cache file system. - */ - public function setCache(FilesystemInterface $cache) - { - $this->cache = $cache; - } - - /** - * Get cache file system. - * @return FilesystemInterface Cache file system. - */ - public function getCache() - { - return $this->cache; - } - - /** - * Set cache path prefix. - * @param string $cachePathPrefix Cache path prefix. - */ - public function setCachePathPrefix($cachePathPrefix) - { - $this->cachePathPrefix = trim($cachePathPrefix, '/'); - } - - /** - * Get cache path prefix. - * @return string Cache path prefix. - */ - public function getCachePathPrefix() - { - return $this->cachePathPrefix; - } - - /** - * Set the group cache in folders setting. - * @param bool $groupCacheInFolders Whether to group cache in folders. - */ - public function setGroupCacheInFolders($groupCacheInFolders) - { - $this->groupCacheInFolders = $groupCacheInFolders; - } - - /** - * Get the group cache in folders setting. - * @return bool Whether to group cache in folders. - */ - public function getGroupCacheInFolders() - { - return $this->groupCacheInFolders; - } - - /** - * Set the cache with file extensions setting. - * @param bool $cacheWithFileExtensions Whether to cache with file extensions. - */ - public function setCacheWithFileExtensions($cacheWithFileExtensions) - { - $this->cacheWithFileExtensions = $cacheWithFileExtensions; - } - - /** - * Get the cache with file extensions setting. - * @return bool Whether to cache with file extensions. - */ - public function getCacheWithFileExtensions() - { - return $this->cacheWithFileExtensions; - } - - /** - * Get cache path. - * @param string $path Image path. - * @param array $params Image manipulation params. - * @return string Cache path. - */ - public function getCachePath($path, array $params = []) - { - $sourcePath = $this->getSourcePath($path); - - if ($this->sourcePathPrefix) { - $sourcePath = substr($sourcePath, strlen($this->sourcePathPrefix) + 1); - } - - $params = $this->getAllParams($params); - unset($params['s'], $params['p']); - ksort($params); - - $md5 = md5($sourcePath.'?'.http_build_query($params)); - - $cachedPath = $this->groupCacheInFolders ? $sourcePath.'/'.$md5 : $md5; - - if ($this->cachePathPrefix) { - $cachedPath = $this->cachePathPrefix.'/'.$cachedPath; - } - - if ($this->cacheWithFileExtensions) { - $ext = (isset($params['fm']) ? $params['fm'] : pathinfo($path)['extension']); - $ext = ($ext === 'pjpg') ? 'jpg' : $ext; - $cachedPath .= '.'.$ext; - } - - return $cachedPath; - } - - /** - * Check if a cache file exists. - * @param string $path Image path. - * @param array $params Image manipulation params. - * @return bool Whether the cache file exists. - */ - public function cacheFileExists($path, array $params) - { - return $this->cache->has( - $this->getCachePath($path, $params) - ); - } - - /** - * Delete cached manipulations for an image. - * @param string $path Image path. - * @return bool Whether the delete succeeded. - */ - public function deleteCache($path) - { - if (!$this->groupCacheInFolders) { - throw new InvalidArgumentException( - 'Deleting cached image manipulations is not possible when grouping cache into folders is disabled.' - ); - } - - return $this->cache->deleteDir( - dirname($this->getCachePath($path)) - ); - } - - /** - * Set image manipulation API. - * @param ApiInterface $api Image manipulation API. - */ - public function setApi(ApiInterface $api) - { - $this->api = $api; - } - - /** - * Get image manipulation API. - * @return ApiInterface Image manipulation API. - */ - public function getApi() - { - return $this->api; - } - - /** - * Set default image manipulations. - * @param array $defaults Default image manipulations. - */ - public function setDefaults(array $defaults) - { - $this->defaults = $defaults; - } - - /** - * Get default image manipulations. - * @return array Default image manipulations. - */ - public function getDefaults() - { - return $this->defaults; - } - - /** - * Set preset image manipulations. - * @param array $presets Preset image manipulations. - */ - public function setPresets(array $presets) - { - $this->presets = $presets; - } - - /** - * Get preset image manipulations. - * @return array Preset image manipulations. - */ - public function getPresets() - { - return $this->presets; - } - - /** - * Get all image manipulations params, including defaults and presets. - * @param array $params Image manipulation params. - * @return array All image manipulation params. - */ - public function getAllParams(array $params) - { - $all = $this->defaults; - - if (isset($params['p'])) { - foreach (explode(',', $params['p']) as $preset) { - if (isset($this->presets[$preset])) { - $all = array_merge($all, $this->presets[$preset]); - } - } - } - - return array_merge($all, $params); - } - - /** - * Set response factory. - * @param ResponseFactoryInterface|null $responseFactory Response factory. - */ - public function setResponseFactory(ResponseFactoryInterface $responseFactory = null) - { - $this->responseFactory = $responseFactory; - } - - /** - * Get response factory. - * @return ResponseFactoryInterface Response factory. - */ - public function getResponseFactory() - { - return $this->responseFactory; - } - - /** - * Generate and return image response. - * @param string $path Image path. - * @param array $params Image manipulation params. - * @return mixed Image response. - * @throws InvalidArgumentException - */ - public function getImageResponse($path, array $params) - { - if (is_null($this->responseFactory)) { - throw new InvalidArgumentException( - 'Unable to get image response, no response factory defined.' - ); - } - - $path = $this->makeImage($path, $params); - - return $this->responseFactory->create($this->cache, $path); - } - - /** - * Generate and return Base64 encoded image. - * @param string $path Image path. - * @param array $params Image manipulation params. - * @return string Base64 encoded image. - * @throws FilesystemException - */ - public function getImageAsBase64($path, array $params) - { - $path = $this->makeImage($path, $params); - - $source = $this->cache->read($path); - - if ($source === false) { - throw new FilesystemException( - 'Could not read the image `'.$path.'`.' - ); - } - - return 'data:'.$this->cache->getMimetype($path).';base64,'.base64_encode($source); - } - - /** - * Generate and output image. - * @param string $path Image path. - * @param array $params Image manipulation params. - * @throws InvalidArgumentException - */ - public function outputImage($path, array $params) - { - $path = $this->makeImage($path, $params); - - header('Content-Type:'.$this->cache->getMimetype($path)); - header('Content-Length:'.$this->cache->getSize($path)); - header('Cache-Control:'.'max-age=31536000, public'); - header('Expires:'.date_create('+1 years')->format('D, d M Y H:i:s').' GMT'); - - $stream = $this->cache->readStream($path); - - if (ftell($stream) !== 0) { - rewind($stream); - } - fpassthru($stream); - fclose($stream); - } - - /** - * Generate manipulated image. - * @param string $path Image path. - * @param array $params Image manipulation params. - * @return string Cache path. - * @throws FileNotFoundException - * @throws FilesystemException - */ - public function makeImage($path, array $params) - { - $sourcePath = $this->getSourcePath($path); - $cachedPath = $this->getCachePath($path, $params); - - if ($this->cacheFileExists($path, $params) === true) { - return $cachedPath; - } - - if ($this->sourceFileExists($path) === false) { - throw new FileNotFoundException( - 'Could not find the image `'.$sourcePath.'`.' - ); - } - - $source = $this->source->read( - $sourcePath - ); - - if ($source === false) { - throw new FilesystemException( - 'Could not read the image `'.$sourcePath.'`.' - ); - } - - // We need to write the image to the local disk before - // doing any manipulations. This is because EXIF data - // can only be read from an actual file. - $tmp = tempnam(sys_get_temp_dir(), 'Glide'); - - if (file_put_contents($tmp, $source) === false) { - throw new FilesystemException( - 'Unable to write temp file for `'.$sourcePath.'`.' - ); - } - - try { - $write = $this->cache->write( - $cachedPath, - $this->api->run($tmp, $this->getAllParams($params)) - ); - - if ($write === false) { - throw new FilesystemException( - 'Could not write the image `'.$cachedPath.'`.' - ); - } - } catch (FileExistsException $exception) { - // This edge case occurs when the target already exists - // because it's currently be written to disk in another - // request. It's best to just fail silently. - } finally { - unlink($tmp); - } - - return $cachedPath; - } -} diff --git a/vendor/league/glide/src/ServerFactory.php b/vendor/league/glide/src/ServerFactory.php deleted file mode 100644 index 0e6c16b480..0000000000 --- a/vendor/league/glide/src/ServerFactory.php +++ /dev/null @@ -1,307 +0,0 @@ -<?php - -namespace League\Glide; - -use Intervention\Image\ImageManager; -use InvalidArgumentException; -use League\Flysystem\Adapter\Local; -use League\Flysystem\Filesystem; -use League\Flysystem\FilesystemInterface; -use League\Glide\Api\Api; -use League\Glide\Manipulators\Background; -use League\Glide\Manipulators\Blur; -use League\Glide\Manipulators\Border; -use League\Glide\Manipulators\Brightness; -use League\Glide\Manipulators\Contrast; -use League\Glide\Manipulators\Crop; -use League\Glide\Manipulators\Encode; -use League\Glide\Manipulators\Filter; -use League\Glide\Manipulators\Flip; -use League\Glide\Manipulators\Gamma; -use League\Glide\Manipulators\Orientation; -use League\Glide\Manipulators\Pixelate; -use League\Glide\Manipulators\Sharpen; -use League\Glide\Manipulators\Size; -use League\Glide\Manipulators\Watermark; -use League\Glide\Responses\ResponseFactoryInterface; - -class ServerFactory -{ - /** - * Configuration parameters. - * @var array - */ - protected $config; - - /** - * Create ServerFactory instance. - * @param array $config Configuration parameters. - */ - public function __construct(array $config = []) - { - $this->config = $config; - } - - /** - * Get configured server. - * @return Server Configured Glide server. - */ - public function getServer() - { - $server = new Server( - $this->getSource(), - $this->getCache(), - $this->getApi() - ); - - $server->setSourcePathPrefix($this->getSourcePathPrefix()); - $server->setCachePathPrefix($this->getCachePathPrefix()); - $server->setGroupCacheInFolders($this->getGroupCacheInFolders()); - $server->setCacheWithFileExtensions($this->getCacheWithFileExtensions()); - $server->setDefaults($this->getDefaults()); - $server->setPresets($this->getPresets()); - $server->setBaseUrl($this->getBaseUrl()); - $server->setResponseFactory($this->getResponseFactory()); - - return $server; - } - - /** - * Get source file system. - * @return FilesystemInterface Source file system. - */ - public function getSource() - { - if (!isset($this->config['source'])) { - throw new InvalidArgumentException('A "source" file system must be set.'); - } - - if (is_string($this->config['source'])) { - return new Filesystem( - new Local($this->config['source']) - ); - } - - return $this->config['source']; - } - - /** - * Get source path prefix. - * @return string|null Source path prefix. - */ - public function getSourcePathPrefix() - { - if (isset($this->config['source_path_prefix'])) { - return $this->config['source_path_prefix']; - } - } - - /** - * Get cache file system. - * @return FilesystemInterface Cache file system. - */ - public function getCache() - { - if (!isset($this->config['cache'])) { - throw new InvalidArgumentException('A "cache" file system must be set.'); - } - - if (is_string($this->config['cache'])) { - return new Filesystem( - new Local($this->config['cache']) - ); - } - - return $this->config['cache']; - } - - /** - * Get cache path prefix. - * @return string|null Cache path prefix. - */ - public function getCachePathPrefix() - { - if (isset($this->config['cache_path_prefix'])) { - return $this->config['cache_path_prefix']; - } - } - - /** - * Get the group cache in folders setting. - * @return bool Whether to group cache in folders. - */ - public function getGroupCacheInFolders() - { - if (isset($this->config['group_cache_in_folders'])) { - return $this->config['group_cache_in_folders']; - } - - return true; - } - - /** - * Get the cache with file extensions setting. - * @return bool Whether to cache with file extensions. - */ - public function getCacheWithFileExtensions() - { - if (isset($this->config['cache_with_file_extensions'])) { - return $this->config['cache_with_file_extensions']; - } - - return false; - } - - /** - * Get watermarks file system. - * @return FilesystemInterface|null Watermarks file system. - */ - public function getWatermarks() - { - if (!isset($this->config['watermarks'])) { - return; - } - - if (is_string($this->config['watermarks'])) { - return new Filesystem( - new Local($this->config['watermarks']) - ); - } - - return $this->config['watermarks']; - } - - /** - * Get watermarks path prefix. - * @return string|null Watermarks path prefix. - */ - public function getWatermarksPathPrefix() - { - if (isset($this->config['watermarks_path_prefix'])) { - return $this->config['watermarks_path_prefix']; - } - } - - /** - * Get image manipulation API. - * @return Api Image manipulation API. - */ - public function getApi() - { - return new Api( - $this->getImageManager(), - $this->getManipulators() - ); - } - - /** - * Get Intervention image manager. - * @return ImageManager Intervention image manager. - */ - public function getImageManager() - { - $driver = 'gd'; - - if (isset($this->config['driver'])) { - $driver = $this->config['driver']; - } - - return new ImageManager([ - 'driver' => $driver, - ]); - } - - /** - * Get image manipulators. - * @return array Image manipulators. - */ - public function getManipulators() - { - return [ - new Orientation(), - new Crop(), - new Size($this->getMaxImageSize()), - new Brightness(), - new Contrast(), - new Gamma(), - new Sharpen(), - new Filter(), - new Flip(), - new Blur(), - new Pixelate(), - new Watermark($this->getWatermarks(), $this->getWatermarksPathPrefix()), - new Background(), - new Border(), - new Encode(), - ]; - } - - /** - * Get maximum image size. - * @return int|null Maximum image size. - */ - public function getMaxImageSize() - { - if (isset($this->config['max_image_size'])) { - return $this->config['max_image_size']; - } - } - - /** - * Get default image manipulations. - * @return array Default image manipulations. - */ - public function getDefaults() - { - if (isset($this->config['defaults'])) { - return $this->config['defaults']; - } - - return []; - } - - /** - * Get preset image manipulations. - * @return array Preset image manipulations. - */ - public function getPresets() - { - if (isset($this->config['presets'])) { - return $this->config['presets']; - } - - return []; - } - - /** - * Get base URL. - * @return string|null Base URL. - */ - public function getBaseUrl() - { - if (isset($this->config['base_url'])) { - return $this->config['base_url']; - } - } - - /** - * Get response factory. - * @return ResponseFactoryInterface|null Response factory. - */ - public function getResponseFactory() - { - if (isset($this->config['response'])) { - return $this->config['response']; - } - } - - /** - * Create configured server. - * @param array $config Configuration parameters. - * @return Server Configured server. - */ - public static function create(array $config = []) - { - return (new self($config))->getServer(); - } -} diff --git a/vendor/league/glide/src/Signatures/Signature.php b/vendor/league/glide/src/Signatures/Signature.php deleted file mode 100644 index fff9c85a5e..0000000000 --- a/vendor/league/glide/src/Signatures/Signature.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -namespace League\Glide\Signatures; - -class Signature implements SignatureInterface -{ - /** - * Secret key used to generate signature. - * @var string - */ - protected $signKey; - - /** - * Create Signature instance. - * @param string $signKey Secret key used to generate signature. - */ - public function __construct($signKey) - { - $this->signKey = $signKey; - } - - /** - * Add an HTTP signature to manipulation parameters. - * @param string $path The resource path. - * @param array $params The manipulation parameters. - * @return array The updated manipulation parameters. - */ - public function addSignature($path, array $params) - { - return array_merge($params, ['s' => $this->generateSignature($path, $params)]); - } - - /** - * Validate a request signature. - * @param string $path The resource path. - * @param array $params The manipulation params. - * @throws SignatureException - */ - public function validateRequest($path, array $params) - { - if (!isset($params['s'])) { - throw new SignatureException('Signature is missing.'); - } - - if ($params['s'] !== $this->generateSignature($path, $params)) { - throw new SignatureException('Signature is not valid.'); - } - } - - /** - * Generate an HTTP signature. - * @param string $path The resource path. - * @param array $params The manipulation parameters. - * @return string The generated HTTP signature. - */ - public function generateSignature($path, array $params) - { - unset($params['s']); - ksort($params); - - return md5($this->signKey.':'.ltrim($path, '/').'?'.http_build_query($params)); - } -} diff --git a/vendor/league/glide/src/Signatures/SignatureException.php b/vendor/league/glide/src/Signatures/SignatureException.php deleted file mode 100644 index ba2f4c2c3c..0000000000 --- a/vendor/league/glide/src/Signatures/SignatureException.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace League\Glide\Signatures; - -use Exception; - -class SignatureException extends Exception -{ -} diff --git a/vendor/league/glide/src/Signatures/SignatureFactory.php b/vendor/league/glide/src/Signatures/SignatureFactory.php deleted file mode 100644 index f7b60c153d..0000000000 --- a/vendor/league/glide/src/Signatures/SignatureFactory.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -namespace League\Glide\Signatures; - -class SignatureFactory -{ - /** - * Create HttpSignature instance. - * @param string $signKey Secret key used to generate signature. - * @return Signature The HttpSignature instance. - */ - public static function create($signKey) - { - return new Signature($signKey); - } -} diff --git a/vendor/league/glide/src/Signatures/SignatureInterface.php b/vendor/league/glide/src/Signatures/SignatureInterface.php deleted file mode 100644 index f3095f4fc9..0000000000 --- a/vendor/league/glide/src/Signatures/SignatureInterface.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -namespace League\Glide\Signatures; - -interface SignatureInterface -{ - /** - * Add an HTTP signature to manipulation params. - * @param string $path The resource path. - * @param array $params The manipulation params. - * @return array The updated manipulation params. - */ - public function addSignature($path, array $params); - - /** - * Validate a request signature. - * @param string $path The resource path. - * @param array $params The manipulation params. - * @throws SignatureException - */ - public function validateRequest($path, array $params); -} diff --git a/vendor/league/glide/src/Urls/UrlBuilder.php b/vendor/league/glide/src/Urls/UrlBuilder.php deleted file mode 100644 index 465c88a701..0000000000 --- a/vendor/league/glide/src/Urls/UrlBuilder.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php - -namespace League\Glide\Urls; - -use InvalidArgumentException; -use League\Glide\Signatures\SignatureInterface; - -class UrlBuilder -{ - /** - * The base URL. - * @var string - */ - protected $baseUrl; - - /** - * Whether the base URL is a relative domain. - * @var bool - */ - protected $isRelativeDomain = false; - - /** - * The HTTP signature used to sign URLs. - * @var SignatureInterface - */ - protected $signature; - - /** - * Create UrlBuilder instance. - * @param string $baseUrl The base URL. - * @param SignatureInterface|null $signature The HTTP signature used to sign URLs. - */ - public function __construct($baseUrl = '', SignatureInterface $signature = null) - { - $this->setBaseUrl($baseUrl); - $this->setSignature($signature); - } - - /** - * Set the base URL. - * @param string $baseUrl The base URL. - */ - public function setBaseUrl($baseUrl) - { - if (substr($baseUrl, 0, 2) === '//') { - $baseUrl = 'http:'.$baseUrl; - $this->isRelativeDomain = true; - } - - $this->baseUrl = rtrim($baseUrl, '/'); - } - - /** - * Set the HTTP signature. - * @param SignatureInterface|null $signature The HTTP signature used to sign URLs. - */ - public function setSignature(SignatureInterface $signature = null) - { - $this->signature = $signature; - } - - /** - * Get the URL. - * @param string $path The resource path. - * @param array $params The manipulation parameters. - * @return string The URL. - */ - public function getUrl($path, array $params = []) - { - $parts = parse_url($this->baseUrl.'/'.trim($path, '/')); - - if ($parts === false) { - throw new InvalidArgumentException('Not a valid path.'); - } - - $parts['path'] = '/'.trim($parts['path'], '/'); - - if ($this->signature) { - $params = $this->signature->addSignature($parts['path'], $params); - } - - return $this->buildUrl($parts, $params); - } - - /** - * Build the URL. - * @param array $parts The URL parts. - * @param array $params The manipulation parameters. - * @return string The built URL. - */ - protected function buildUrl($parts, $params) - { - $url = ''; - - if (isset($parts['host'])) { - if ($this->isRelativeDomain) { - $url .= '//'.$parts['host']; - } else { - $url .= $parts['scheme'].'://'.$parts['host']; - } - - if (isset($parts['port'])) { - $url .= ':'.$parts['port']; - } - } - - $url .= $parts['path']; - - if (count($params)) { - $url .= '?'.http_build_query($params); - } - - return $url; - } -} diff --git a/vendor/league/glide/src/Urls/UrlBuilderFactory.php b/vendor/league/glide/src/Urls/UrlBuilderFactory.php deleted file mode 100644 index 5cc97ca998..0000000000 --- a/vendor/league/glide/src/Urls/UrlBuilderFactory.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -namespace League\Glide\Urls; - -use League\Glide\Signatures\SignatureFactory; - -class UrlBuilderFactory -{ - /** - * Create UrlBuilder instance. - * @param string $baseUrl URL prefixed to generated URL. - * @param string|null $signKey Secret key used to secure URLs. - * @return UrlBuilder The UrlBuilder instance. - */ - public static function create($baseUrl, $signKey = null) - { - $httpSignature = null; - - if (!is_null($signKey)) { - $httpSignature = SignatureFactory::create($signKey); - } - - return new UrlBuilder($baseUrl, $httpSignature); - } -} diff --git a/vendor/league/glide/tests/Api/ApiTest.php b/vendor/league/glide/tests/Api/ApiTest.php deleted file mode 100644 index 1ff7c5bce9..0000000000 --- a/vendor/league/glide/tests/Api/ApiTest.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php - -namespace League\Glide\Api; - -use Mockery; - -class ApiTest extends \PHPUnit_Framework_TestCase -{ - private $output; - - public function setUp() - { - $this->api = new Api(Mockery::mock('Intervention\Image\ImageManager'), []); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Api\Api', $this->api); - } - - public function testSetImageManager() - { - $this->api->setImageManager(Mockery::mock('Intervention\Image\ImageManager')); - $this->assertInstanceOf('Intervention\Image\ImageManager', $this->api->getImageManager()); - } - - public function testGetImageManager() - { - $this->assertInstanceOf('Intervention\Image\ImageManager', $this->api->getImageManager()); - } - - public function testSetManipulators() - { - $this->api->setManipulators([Mockery::mock('League\Glide\Manipulators\ManipulatorInterface')]); - $manipulators = $this->api->getManipulators(); - $this->assertInstanceOf('League\Glide\Manipulators\ManipulatorInterface', $manipulators[0]); - } - - public function testSetInvalidManipulator() - { - $this->setExpectedException('InvalidArgumentException', 'Not a valid manipulator.'); - - $this->api->setManipulators([new \StdClass()]); - } - - public function testGetManipulators() - { - $this->assertEquals([], $this->api->getManipulators()); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('getEncoded')->andReturn('encoded'); - }); - - $manager = Mockery::mock('Intervention\Image\ImageManager', function ($mock) use ($image) { - $mock->shouldReceive('make')->andReturn($image); - }); - - $manipulator = Mockery::mock('League\Glide\Manipulators\ManipulatorInterface', function ($mock) use ($image) { - $mock->shouldReceive('setParams')->with([]); - $mock->shouldReceive('run')->andReturn($image); - }); - - $api = new Api($manager, [$manipulator]); - - $this->assertEquals('encoded', $api->run('source', [])); - } -} diff --git a/vendor/league/glide/tests/Manipulators/BackgroundTest.php b/vendor/league/glide/tests/Manipulators/BackgroundTest.php deleted file mode 100644 index 1fb132ae3f..0000000000 --- a/vendor/league/glide/tests/Manipulators/BackgroundTest.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class BackgroundTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Background', new Background()); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('width')->andReturn(100)->once(); - $mock->shouldReceive('height')->andReturn(100)->once(); - $mock->shouldReceive('getDriver')->andReturn(Mockery::mock('Intervention\Image\AbstractDriver', function ($mock) { - $mock->shouldReceive('newImage')->with(100, 100, 'rgba(0, 0, 0, 1)')->andReturn(Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('insert')->andReturn($mock)->once(); - }))->once(); - }))->once(); - }); - - $border = new Background(); - - $this->assertInstanceOf('Intervention\Image\Image', $border->run($image)); - $this->assertInstanceOf('Intervention\Image\Image', $border->setParams(['bg' => 'black'])->run($image)); - } -} diff --git a/vendor/league/glide/tests/Manipulators/BlurTest.php b/vendor/league/glide/tests/Manipulators/BlurTest.php deleted file mode 100644 index 8d0b315e99..0000000000 --- a/vendor/league/glide/tests/Manipulators/BlurTest.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class BlurTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function setUp() - { - $this->manipulator = new Blur(); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Blur', $this->manipulator); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('blur')->with('10')->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['blur' => 10])->run($image) - ); - } - - public function testGetBlur() - { - $this->assertSame(50, $this->manipulator->setParams(['blur' => '50'])->getBlur()); - $this->assertSame(50, $this->manipulator->setParams(['blur' => 50])->getBlur()); - $this->assertSame(null, $this->manipulator->setParams(['blur' => null])->getBlur()); - $this->assertSame(null, $this->manipulator->setParams(['blur' => 'a'])->getBlur()); - $this->assertSame(null, $this->manipulator->setParams(['blur' => '-1'])->getBlur()); - $this->assertSame(null, $this->manipulator->setParams(['blur' => '101'])->getBlur()); - } -} diff --git a/vendor/league/glide/tests/Manipulators/BorderTest.php b/vendor/league/glide/tests/Manipulators/BorderTest.php deleted file mode 100644 index 6a774ed909..0000000000 --- a/vendor/league/glide/tests/Manipulators/BorderTest.php +++ /dev/null @@ -1,133 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class BorderTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Border', new Border()); - } - - public function testGetBorder() - { - $image = Mockery::mock('Intervention\Image\Image'); - - $border = new Border(); - - $this->assertNull($border->getBorder($image)); - - $this->assertSame( - [10.0, 'rgba(0, 0, 0, 1)', 'overlay'], - $border->setParams(['border' => '10,black'])->getBorder($image) - ); - } - - public function testGetInvalidBorder() - { - $image = Mockery::mock('Intervention\Image\Image'); - - $border = new Border(); - - $this->assertNull( - $border->setParams(['border' => '0,black'])->getBorder($image) - ); - } - - public function testGetWidth() - { - $image = Mockery::mock('Intervention\Image\Image'); - - $border = new Border(); - - $this->assertSame(100.0, $border->getWidth($image, 1, '100')); - } - - public function testGetColor() - { - $border = new Border(); - - $this->assertSame('rgba(0, 0, 0, 1)', $border->getColor('black')); - } - - public function testGetMethod() - { - $border = new Border(); - - $this->assertSame('expand', $border->getMethod('expand')); - $this->assertSame('shrink', $border->getMethod('shrink')); - $this->assertSame('overlay', $border->getMethod('overlay')); - $this->assertSame('overlay', $border->getMethod('invalid')); - } - - public function testGetDpr() - { - $border = new Border(); - - $this->assertSame(1.0, $border->setParams(['dpr' => 'invalid'])->getDpr()); - $this->assertSame(1.0, $border->setParams(['dpr' => '-1'])->getDpr()); - $this->assertSame(1.0, $border->setParams(['dpr' => '9'])->getDpr()); - $this->assertSame(2.0, $border->setParams(['dpr' => '2'])->getDpr()); - } - - public function testRunWithNoBorder() - { - $image = Mockery::mock('Intervention\Image\Image'); - - $border = new Border(); - - $this->assertInstanceOf('Intervention\Image\Image', $border->run($image)); - } - - public function testRunOverlay() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('width')->andReturn(100)->once(); - $mock->shouldReceive('height')->andReturn(100)->once(); - $mock->shouldReceive('rectangle')->with(5, 5, 95, 95, Mockery::on(function ($closure) { - return true; - }))->andReturn($mock)->once(); - }); - - $border = new Border(); - $border->setParams(['border' => '10,5000,overlay']); - - $this->assertInstanceOf('Intervention\Image\Image', $border->run($image)); - } - - public function testRunShrink() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('width')->andReturn(100)->once(); - $mock->shouldReceive('height')->andReturn(100)->once(); - $mock->shouldReceive('resize')->with(80, 80)->andReturn($mock)->once(); - $mock->shouldReceive('resizeCanvas')->with(20, 20, 'center', true, 'rgba(0, 0, 0, 0.5)')->andReturn($mock)->once(); - }); - - $border = new Border(); - $border->setParams(['border' => '10,5000,shrink']); - - $this->assertInstanceOf('Intervention\Image\Image', $border->run($image)); - } - - public function testRunExpand() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('resizeCanvas')->with(20, 20, 'center', true, 'rgba(0, 0, 0, 0.5)')->andReturn($mock)->once(); - }); - - $border = new Border(); - $border->setParams(['border' => '10,5000,expand']); - - $this->assertInstanceOf('Intervention\Image\Image', $border->run($image)); - } -} diff --git a/vendor/league/glide/tests/Manipulators/BrightnessTest.php b/vendor/league/glide/tests/Manipulators/BrightnessTest.php deleted file mode 100644 index fef243bf82..0000000000 --- a/vendor/league/glide/tests/Manipulators/BrightnessTest.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class BrightnessTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function setUp() - { - $this->manipulator = new Brightness(); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Brightness', $this->manipulator); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('brightness')->with('50')->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['bri' => 50])->run($image) - ); - } - - public function testGetPixelate() - { - $this->assertSame(50, $this->manipulator->setParams(['bri' => '50'])->getBrightness()); - $this->assertSame(50, $this->manipulator->setParams(['bri' => 50])->getBrightness()); - $this->assertSame(null, $this->manipulator->setParams(['bri' => null])->getBrightness()); - $this->assertSame(null, $this->manipulator->setParams(['bri' => '101'])->getBrightness()); - $this->assertSame(null, $this->manipulator->setParams(['bri' => '-101'])->getBrightness()); - $this->assertSame(null, $this->manipulator->setParams(['bri' => 'a'])->getBrightness()); - } -} diff --git a/vendor/league/glide/tests/Manipulators/ContrastTest.php b/vendor/league/glide/tests/Manipulators/ContrastTest.php deleted file mode 100644 index 298e14a162..0000000000 --- a/vendor/league/glide/tests/Manipulators/ContrastTest.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class ContrastTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function setUp() - { - $this->manipulator = new Contrast(); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Contrast', $this->manipulator); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('contrast')->with('50')->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['con' => 50])->run($image) - ); - } - - public function testGetPixelate() - { - $this->assertSame(50, $this->manipulator->setParams(['con' => '50'])->getContrast()); - $this->assertSame(50, $this->manipulator->setParams(['con' => 50])->getContrast()); - $this->assertSame(null, $this->manipulator->setParams(['con' => null])->getContrast()); - $this->assertSame(null, $this->manipulator->setParams(['con' => '101'])->getContrast()); - $this->assertSame(null, $this->manipulator->setParams(['con' => '-101'])->getContrast()); - $this->assertSame(null, $this->manipulator->setParams(['con' => 'a'])->getContrast()); - } -} diff --git a/vendor/league/glide/tests/Manipulators/CropTest.php b/vendor/league/glide/tests/Manipulators/CropTest.php deleted file mode 100644 index 36a96fdad5..0000000000 --- a/vendor/league/glide/tests/Manipulators/CropTest.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class CropTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function setUp() - { - $this->manipulator = new Crop(); - $this->image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('width')->andReturn(100); - $mock->shouldReceive('height')->andReturn(100); - }); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Crop', $this->manipulator); - } - - public function testRun() - { - $this->image->shouldReceive('crop')->with(100, 100, 0, 0)->once(); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['crop' => '100,100,0,0'])->run($this->image) - ); - } - - public function testGetCoordinates() - { - $this->assertSame([100, 100, 0, 0], $this->manipulator->setParams(['crop' => '100,100,0,0'])->getCoordinates($this->image)); - $this->assertSame([101, 1, 1, 1], $this->manipulator->setParams(['crop' => '101,1,1,1'])->getCoordinates($this->image)); - $this->assertSame([1, 101, 1, 1], $this->manipulator->setParams(['crop' => '1,101,1,1'])->getCoordinates($this->image)); - $this->assertSame(null, $this->manipulator->setParams(['crop' => null])->getCoordinates($this->image)); - $this->assertSame(null, $this->manipulator->setParams(['crop' => '1,1,1,'])->getCoordinates($this->image)); - $this->assertSame(null, $this->manipulator->setParams(['crop' => '1,1,,1'])->getCoordinates($this->image)); - $this->assertSame(null, $this->manipulator->setParams(['crop' => '1,,1,1'])->getCoordinates($this->image)); - $this->assertSame(null, $this->manipulator->setParams(['crop' => ',1,1,1'])->getCoordinates($this->image)); - $this->assertSame(null, $this->manipulator->setParams(['crop' => '-1,1,1,1'])->getCoordinates($this->image)); - $this->assertSame(null, $this->manipulator->setParams(['crop' => '1,1,101,1'])->getCoordinates($this->image)); - $this->assertSame(null, $this->manipulator->setParams(['crop' => '1,1,1,101'])->getCoordinates($this->image)); - $this->assertSame(null, $this->manipulator->setParams(['crop' => 'a'])->getCoordinates($this->image)); - $this->assertSame(null, $this->manipulator->setParams(['crop' => ''])->getCoordinates($this->image)); - } - - public function testValidateCoordinates() - { - $this->assertSame([100, 100, 0, 0], $this->manipulator->limitToImageBoundaries($this->image, [100, 100, 0, 0])); - $this->assertSame([90, 90, 10, 10], $this->manipulator->limitToImageBoundaries($this->image, [100, 100, 10, 10])); - } -} diff --git a/vendor/league/glide/tests/Manipulators/EncodeTest.php b/vendor/league/glide/tests/Manipulators/EncodeTest.php deleted file mode 100644 index 9c10427b18..0000000000 --- a/vendor/league/glide/tests/Manipulators/EncodeTest.php +++ /dev/null @@ -1,107 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Intervention\Image\ImageManager; -use Mockery; - -class EncodeTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - private $jpg; - private $png; - private $gif; - private $tif; - private $webp; - - public function setUp() - { - $manager = new ImageManager(); - $this->jpg = $manager->canvas(100, 100)->encode('jpg'); - $this->png = $manager->canvas(100, 100)->encode('png'); - $this->gif = $manager->canvas(100, 100)->encode('gif'); - - if (function_exists('imagecreatefromwebp')) { - $this->webp = $manager->canvas(100, 100)->encode('webp'); - } - - $this->manipulator = new Encode(); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Encode', $this->manipulator); - } - - public function testRun() - { - $this->assertSame('image/jpeg', $this->manipulator->setParams(['fm' => 'jpg'])->run($this->jpg)->mime); - $this->assertSame('image/jpeg', $this->manipulator->setParams(['fm' => 'jpg'])->run($this->png)->mime); - $this->assertSame('image/jpeg', $this->manipulator->setParams(['fm' => 'jpg'])->run($this->gif)->mime); - $this->assertSame('image/jpeg', $this->manipulator->setParams(['fm' => 'pjpg'])->run($this->jpg)->mime); - $this->assertSame('image/jpeg', $this->manipulator->setParams(['fm' => 'pjpg'])->run($this->png)->mime); - $this->assertSame('image/jpeg', $this->manipulator->setParams(['fm' => 'pjpg'])->run($this->gif)->mime); - $this->assertSame('image/png', $this->manipulator->setParams(['fm' => 'png'])->run($this->jpg)->mime); - $this->assertSame('image/png', $this->manipulator->setParams(['fm' => 'png'])->run($this->png)->mime); - $this->assertSame('image/png', $this->manipulator->setParams(['fm' => 'png'])->run($this->gif)->mime); - $this->assertSame('image/gif', $this->manipulator->setParams(['fm' => 'gif'])->run($this->jpg)->mime); - $this->assertSame('image/gif', $this->manipulator->setParams(['fm' => 'gif'])->run($this->png)->mime); - $this->assertSame('image/gif', $this->manipulator->setParams(['fm' => 'gif'])->run($this->gif)->mime); - - if (function_exists('imagecreatefromwebp')) { - $this->assertSame('image/jpeg', $this->manipulator->setParams(['fm' => 'jpg'])->run($this->webp)->mime); - $this->assertSame('image/jpeg', $this->manipulator->setParams(['fm' => 'pjpg'])->run($this->webp)->mime); - $this->assertSame('image/png', $this->manipulator->setParams(['fm' => 'png'])->run($this->webp)->mime); - $this->assertSame('image/gif', $this->manipulator->setParams(['fm' => 'gif'])->run($this->webp)->mime); - $this->assertSame('image/webp', $this->manipulator->setParams(['fm' => 'webp'])->run($this->jpg)->mime); - $this->assertSame('image/webp', $this->manipulator->setParams(['fm' => 'webp'])->run($this->png)->mime); - $this->assertSame('image/webp', $this->manipulator->setParams(['fm' => 'webp'])->run($this->gif)->mime); - $this->assertSame('image/webp', $this->manipulator->setParams(['fm' => 'webp'])->run($this->webp)->mime); - } - } - - public function testGetFormat() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('mime')->andReturn('image/jpeg')->once(); - $mock->shouldReceive('mime')->andReturn('image/png')->once(); - $mock->shouldReceive('mime')->andReturn('image/gif')->once(); - $mock->shouldReceive('mime')->andReturn('image/bmp')->once(); - $mock->shouldReceive('mime')->andReturn('image/jpeg')->twice(); - - if (function_exists('imagecreatefromwebp')) { - $mock->shouldReceive('mime')->andReturn('image/webp')->once(); - } - }); - - $this->assertSame('jpg', $this->manipulator->setParams(['fm' => 'jpg'])->getFormat($image)); - $this->assertSame('png', $this->manipulator->setParams(['fm' => 'png'])->getFormat($image)); - $this->assertSame('gif', $this->manipulator->setParams(['fm' => 'gif'])->getFormat($image)); - $this->assertSame('jpg', $this->manipulator->setParams(['fm' => null])->getFormat($image)); - $this->assertSame('png', $this->manipulator->setParams(['fm' => null])->getFormat($image)); - $this->assertSame('gif', $this->manipulator->setParams(['fm' => null])->getFormat($image)); - $this->assertSame('jpg', $this->manipulator->setParams(['fm' => null])->getFormat($image)); - $this->assertSame('jpg', $this->manipulator->setParams(['fm' => ''])->getFormat($image)); - $this->assertSame('jpg', $this->manipulator->setParams(['fm' => 'invalid'])->getFormat($image)); - - if (function_exists('imagecreatefromwebp')) { - $this->assertSame('webp', $this->manipulator->setParams(['fm' => null])->getFormat($image)); - } - } - - public function testGetQuality() - { - $this->assertSame(100, $this->manipulator->setParams(['q' => '100'])->getQuality()); - $this->assertSame(100, $this->manipulator->setParams(['q' => 100])->getQuality()); - $this->assertSame(90, $this->manipulator->setParams(['q' => null])->getQuality()); - $this->assertSame(90, $this->manipulator->setParams(['q' => 'a'])->getQuality()); - $this->assertSame(50, $this->manipulator->setParams(['q' => '50.50'])->getQuality()); - $this->assertSame(90, $this->manipulator->setParams(['q' => '-1'])->getQuality()); - $this->assertSame(90, $this->manipulator->setParams(['q' => '101'])->getQuality()); - } -} diff --git a/vendor/league/glide/tests/Manipulators/FilterTest.php b/vendor/league/glide/tests/Manipulators/FilterTest.php deleted file mode 100644 index 5dd0de5eec..0000000000 --- a/vendor/league/glide/tests/Manipulators/FilterTest.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class FilterTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function setUp() - { - $this->manipulator = new Filter(); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Filter', $this->manipulator); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('greyscale')->twice()->andReturn($mock) - ->shouldReceive('brightness')->with(-10)->twice()->andReturn($mock) - ->shouldReceive('contrast')->with(10)->twice()->andReturn($mock) - ->shouldReceive('colorize')->with(38, 27, 12)->once()->andReturn($mock); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['filt' => 'greyscale'])->run($image) - ); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['filt' => 'sepia'])->run($image) - ); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams([])->run($image) - ); - } - - public function testRunGreyscaleFilter() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('greyscale')->andReturn($mock)->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runGreyscaleFilter($image) - ); - } - - public function testRunSepiaFilter() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('greyscale')->once()->andReturn($mock) - ->shouldReceive('brightness')->with(-10)->twice()->andReturn($mock) - ->shouldReceive('contrast')->with(10)->twice()->andReturn($mock) - ->shouldReceive('colorize')->with(38, 27, 12)->once()->andReturn($mock); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runSepiaFilter($image) - ); - } -} diff --git a/vendor/league/glide/tests/Manipulators/FlipTest.php b/vendor/league/glide/tests/Manipulators/FlipTest.php deleted file mode 100644 index e7fbfec825..0000000000 --- a/vendor/league/glide/tests/Manipulators/FlipTest.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class FlipTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function setUp() - { - $this->manipulator = new Flip(); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Flip', $this->manipulator); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('flip')->andReturn($mock)->with('h')->once(); - $mock->shouldReceive('flip')->andReturn($mock)->with('v')->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['flip' => 'h'])->run($image) - ); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['flip' => 'v'])->run($image) - ); - } - - public function testGetFlip() - { - $this->assertSame('h', $this->manipulator->setParams(['flip' => 'h'])->getFlip()); - $this->assertSame('v', $this->manipulator->setParams(['flip' => 'v'])->getFlip()); - } -} diff --git a/vendor/league/glide/tests/Manipulators/GammaTest.php b/vendor/league/glide/tests/Manipulators/GammaTest.php deleted file mode 100644 index b54fd34e41..0000000000 --- a/vendor/league/glide/tests/Manipulators/GammaTest.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class GammaTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function setUp() - { - $this->manipulator = new Gamma(); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Gamma', $this->manipulator); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('gamma')->with('1.5')->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['gam' => '1.5'])->run($image) - ); - } - - public function testGetGamma() - { - $this->assertSame(1.5, $this->manipulator->setParams(['gam' => '1.5'])->getGamma()); - $this->assertSame(1.5, $this->manipulator->setParams(['gam' => 1.5])->getGamma()); - $this->assertSame(null, $this->manipulator->setParams(['gam' => null])->getGamma()); - $this->assertSame(null, $this->manipulator->setParams(['gam' => 'a'])->getGamma()); - $this->assertSame(null, $this->manipulator->setParams(['gam' => '.1'])->getGamma()); - $this->assertSame(null, $this->manipulator->setParams(['gam' => '9.999'])->getGamma()); - $this->assertSame(null, $this->manipulator->setParams(['gam' => '0.005'])->getGamma()); - $this->assertSame(null, $this->manipulator->setParams(['gam' => '-1'])->getGamma()); - } -} diff --git a/vendor/league/glide/tests/Manipulators/Helpers/ColorTest.php b/vendor/league/glide/tests/Manipulators/Helpers/ColorTest.php deleted file mode 100644 index ffbafe67ef..0000000000 --- a/vendor/league/glide/tests/Manipulators/Helpers/ColorTest.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -namespace League\Glide\Manipulators\Helpers; - -class ColorTest extends \PHPUnit_Framework_TestCase -{ - public function testThreeDigitColorCode() - { - $color = new Color('000'); - - $this->assertSame('rgba(0, 0, 0, 1)', $color->formatted()); - } - - public function testFourDigitColorCode() - { - $color = new Color('5000'); - - $this->assertSame('rgba(0, 0, 0, 0.5)', $color->formatted()); - } - - public function testSixDigitColorCode() - { - $color = new Color('000000'); - - $this->assertSame('rgba(0, 0, 0, 1)', $color->formatted()); - } - - public function testEightDigitColorCode() - { - $color = new Color('50000000'); - - $this->assertSame('rgba(0, 0, 0, 0.5)', $color->formatted()); - } - - public function testNamedColorCode() - { - $color = new Color('black'); - - $this->assertSame('rgba(0, 0, 0, 1)', $color->formatted()); - } - - public function testUnknownColor() - { - $color = new Color('unknown'); - - $this->assertSame('rgba(255, 255, 255, 0)', $color->formatted()); - } -} diff --git a/vendor/league/glide/tests/Manipulators/Helpers/DimensionTest.php b/vendor/league/glide/tests/Manipulators/Helpers/DimensionTest.php deleted file mode 100644 index dd6ba9c2a2..0000000000 --- a/vendor/league/glide/tests/Manipulators/Helpers/DimensionTest.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -namespace League\Glide\Manipulators\Helpers; - -use Mockery; - -class DimensionTest extends \PHPUnit_Framework_TestCase -{ - private $image; - - public function setUp() - { - $this->image = Mockery::mock('Intervention\Image\Image'); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testPixels() - { - $dimension = new Dimension($this->image); - $this->assertSame(500.0, $dimension->get('500')); - } - - public function testRelativeWidth() - { - $this->image->shouldReceive('width')->andReturn('100')->once(); - - $dimension = new Dimension($this->image); - $this->assertSame(5.0, $dimension->get('5w')); - } - - public function testRelativeHeight() - { - $this->image->shouldReceive('height')->andReturn('100')->once(); - - $dimension = new Dimension($this->image); - $this->assertSame(5.0, $dimension->get('5h')); - } - - public function testDevicePixelRatio() - { - $dimension = new Dimension($this->image, 2); - $this->assertSame(1000.0, $dimension->get('500')); - } - - public function testInvalidInputs() - { - $dimension = new Dimension($this->image); - $this->assertSame(null, $dimension->get('invalid')); - $this->assertSame(null, $dimension->get('0')); - $this->assertSame(null, $dimension->get('-1')); - } -} diff --git a/vendor/league/glide/tests/Manipulators/OrientationTest.php b/vendor/league/glide/tests/Manipulators/OrientationTest.php deleted file mode 100644 index 88eda0dbbc..0000000000 --- a/vendor/league/glide/tests/Manipulators/OrientationTest.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class OrientationTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function setUp() - { - $this->manipulator = new Orientation(); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Orientation', $this->manipulator); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('orientate')->andReturn($mock)->once(); - $mock->shouldReceive('rotate')->andReturn($mock)->with('90')->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['or' => 'auto'])->run($image) - ); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['or' => '90'])->run($image) - ); - } - - public function testGetOrientation() - { - $this->assertSame('auto', $this->manipulator->setParams(['or' => 'auto'])->getOrientation()); - $this->assertSame('0', $this->manipulator->setParams(['or' => '0'])->getOrientation()); - $this->assertSame('90', $this->manipulator->setParams(['or' => '90'])->getOrientation()); - $this->assertSame('180', $this->manipulator->setParams(['or' => '180'])->getOrientation()); - $this->assertSame('270', $this->manipulator->setParams(['or' => '270'])->getOrientation()); - $this->assertSame('auto', $this->manipulator->setParams(['or' => null])->getOrientation()); - $this->assertSame('auto', $this->manipulator->setParams(['or' => '1'])->getOrientation()); - $this->assertSame('auto', $this->manipulator->setParams(['or' => '45'])->getOrientation()); - } -} diff --git a/vendor/league/glide/tests/Manipulators/PixelateTest.php b/vendor/league/glide/tests/Manipulators/PixelateTest.php deleted file mode 100644 index 207a102e7f..0000000000 --- a/vendor/league/glide/tests/Manipulators/PixelateTest.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class PixelateTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function setUp() - { - $this->manipulator = new Pixelate(); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Pixelate', $this->manipulator); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('pixelate')->with('10')->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['pixel' => '10'])->run($image) - ); - } - - public function testGetPixelate() - { - $this->assertSame(50, $this->manipulator->setParams(['pixel' => '50'])->getPixelate()); - $this->assertSame(50, $this->manipulator->setParams(['pixel' => 50.50])->getPixelate()); - $this->assertSame(null, $this->manipulator->setParams(['pixel' => null])->getPixelate()); - $this->assertSame(null, $this->manipulator->setParams(['pixel' => 'a'])->getPixelate()); - $this->assertSame(null, $this->manipulator->setParams(['pixel' => '-1'])->getPixelate()); - $this->assertSame(null, $this->manipulator->setParams(['pixel' => '1001'])->getPixelate()); - } -} diff --git a/vendor/league/glide/tests/Manipulators/SharpenTest.php b/vendor/league/glide/tests/Manipulators/SharpenTest.php deleted file mode 100644 index d1fe2f9713..0000000000 --- a/vendor/league/glide/tests/Manipulators/SharpenTest.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class SharpenTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function setUp() - { - $this->manipulator = new Sharpen(); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Sharpen', $this->manipulator); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('sharpen')->with('10')->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['sharp' => '10'])->run($image) - ); - } - - public function testGetPixelate() - { - $this->assertSame(10, $this->manipulator->setParams(['sharp' => '10'])->getSharpen()); - $this->assertSame(50, $this->manipulator->setParams(['sharp' => 50.5])->getSharpen()); - $this->assertSame(null, $this->manipulator->setParams(['sharp' => null])->getSharpen()); - $this->assertSame(null, $this->manipulator->setParams(['sharp' => 'a'])->getSharpen()); - $this->assertSame(null, $this->manipulator->setParams(['sharp' => '-1'])->getSharpen()); - $this->assertSame(null, $this->manipulator->setParams(['sharp' => '101'])->getSharpen()); - } -} diff --git a/vendor/league/glide/tests/Manipulators/SizeTest.php b/vendor/league/glide/tests/Manipulators/SizeTest.php deleted file mode 100644 index c59b6365cd..0000000000 --- a/vendor/league/glide/tests/Manipulators/SizeTest.php +++ /dev/null @@ -1,241 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class SizeTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - private $callback; - - public function setUp() - { - $this->manipulator = new Size(); - $this->callback = Mockery::on(function () { - return true; - }); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Size', $this->manipulator); - } - - public function testSetMaxImageSize() - { - $this->manipulator->setMaxImageSize(500 * 500); - $this->assertSame(500 * 500, $this->manipulator->getMaxImageSize()); - } - - public function testGetMaxImageSize() - { - $this->assertNull($this->manipulator->getMaxImageSize()); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('width')->andReturn('200')->twice(); - $mock->shouldReceive('height')->andReturn('200')->once(); - $mock->shouldReceive('resize')->with(100, 100, $this->callback)->andReturn($mock)->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->setParams(['w' => 100])->run($image) - ); - } - - public function testGetWidth() - { - $this->assertSame(100, $this->manipulator->setParams(['w' => 100])->getWidth()); - $this->assertSame(100, $this->manipulator->setParams(['w' => 100.1])->getWidth()); - $this->assertSame(null, $this->manipulator->setParams(['w' => null])->getWidth()); - $this->assertSame(null, $this->manipulator->setParams(['w' => 'a'])->getWidth()); - $this->assertSame(null, $this->manipulator->setParams(['w' => '-100'])->getWidth()); - } - - public function testGetHeight() - { - $this->assertSame(100, $this->manipulator->setParams(['h' => 100])->getHeight()); - $this->assertSame(100, $this->manipulator->setParams(['h' => 100.1])->getHeight()); - $this->assertSame(null, $this->manipulator->setParams(['h' => null])->getHeight()); - $this->assertSame(null, $this->manipulator->setParams(['h' => 'a'])->getHeight()); - $this->assertSame(null, $this->manipulator->setParams(['h' => '-100'])->getHeight()); - } - - public function testGetFit() - { - $this->assertSame('contain', $this->manipulator->setParams(['fit' => 'contain'])->getFit()); - $this->assertSame('fill', $this->manipulator->setParams(['fit' => 'fill'])->getFit()); - $this->assertSame('max', $this->manipulator->setParams(['fit' => 'max'])->getFit()); - $this->assertSame('stretch', $this->manipulator->setParams(['fit' => 'stretch'])->getFit()); - $this->assertSame('crop', $this->manipulator->setParams(['fit' => 'crop'])->getFit()); - $this->assertSame('contain', $this->manipulator->setParams(['fit' => 'invalid'])->getFit()); - } - - public function testGetCrop() - { - $this->assertSame([0, 0, 1.0], $this->manipulator->setParams(['fit' => 'crop-top-left'])->getCrop()); - $this->assertSame([0, 100, 1.0], $this->manipulator->setParams(['fit' => 'crop-bottom-left'])->getCrop()); - $this->assertSame([0, 50, 1.0], $this->manipulator->setParams(['fit' => 'crop-left'])->getCrop()); - $this->assertSame([100, 0, 1.0], $this->manipulator->setParams(['fit' => 'crop-top-right'])->getCrop()); - $this->assertSame([100, 100, 1.0], $this->manipulator->setParams(['fit' => 'crop-bottom-right'])->getCrop()); - $this->assertSame([100, 50, 1.0], $this->manipulator->setParams(['fit' => 'crop-right'])->getCrop()); - $this->assertSame([50, 0, 1.0], $this->manipulator->setParams(['fit' => 'crop-top'])->getCrop()); - $this->assertSame([50, 100, 1.0], $this->manipulator->setParams(['fit' => 'crop-bottom'])->getCrop()); - $this->assertSame([50, 50, 1.0], $this->manipulator->setParams(['fit' => 'crop-center'])->getCrop()); - $this->assertSame([50, 50, 1.0], $this->manipulator->setParams(['fit' => 'crop'])->getCrop()); - $this->assertSame([50, 50, 1.0], $this->manipulator->setParams(['fit' => 'crop-center'])->getCrop()); - $this->assertSame([25, 75, 1.0], $this->manipulator->setParams(['fit' => 'crop-25-75'])->getCrop()); - $this->assertSame([0, 100, 1.0], $this->manipulator->setParams(['fit' => 'crop-0-100'])->getCrop()); - $this->assertSame([50, 50, 1.0], $this->manipulator->setParams(['fit' => 'crop-101-102'])->getCrop()); - $this->assertSame([25, 75, 1.0], $this->manipulator->setParams(['fit' => 'crop-25-75-1'])->getCrop()); - $this->assertSame([25, 75, 1.5], $this->manipulator->setParams(['fit' => 'crop-25-75-1.5'])->getCrop()); - $this->assertSame([25, 75, 1.555], $this->manipulator->setParams(['fit' => 'crop-25-75-1.555'])->getCrop()); - $this->assertSame([25, 75, 2.0], $this->manipulator->setParams(['fit' => 'crop-25-75-2'])->getCrop()); - $this->assertSame([25, 75, 100.0], $this->manipulator->setParams(['fit' => 'crop-25-75-100'])->getCrop()); - $this->assertSame([50, 50, 1.0], $this->manipulator->setParams(['fit' => 'crop-25-75-101'])->getCrop()); - $this->assertSame([50, 50, 1.0], $this->manipulator->setParams(['fit' => 'invalid'])->getCrop()); - } - - public function testGetDpr() - { - $this->assertSame(1.0, $this->manipulator->setParams(['dpr' => 'invalid'])->getDpr()); - $this->assertSame(1.0, $this->manipulator->setParams(['dpr' => '-1'])->getDpr()); - $this->assertSame(1.0, $this->manipulator->setParams(['dpr' => '9'])->getDpr()); - $this->assertSame(2.0, $this->manipulator->setParams(['dpr' => '2'])->getDpr()); - } - - public function testResolveMissingDimensions() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('width')->andReturn(400); - $mock->shouldReceive('height')->andReturn(200); - }); - - $this->assertSame([400, 200], $this->manipulator->resolveMissingDimensions($image, null, null)); - $this->assertSame([100, 50], $this->manipulator->resolveMissingDimensions($image, 100, null)); - $this->assertSame([200, 100], $this->manipulator->resolveMissingDimensions($image, null, 100)); - } - - public function testLimitImageSize() - { - $this->assertSame([1000, 1000], $this->manipulator->limitImageSize(1000, 1000)); - $this->manipulator->setMaxImageSize(500 * 500); - $this->assertSame([500, 500], $this->manipulator->limitImageSize(500, 500)); - $this->assertSame([500, 500], $this->manipulator->limitImageSize(1000, 1000)); - } - - public function testRunResize() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('width')->andReturn(100)->times(4); - $mock->shouldReceive('height')->andReturn(100)->times(4); - $mock->shouldReceive('crop')->andReturn($mock)->once(); - $mock->shouldReceive('resize')->with(100, 100, $this->callback)->andReturn($mock)->times(4); - $mock->shouldReceive('resize')->with(100, 100)->andReturn($mock)->once(); - $mock->shouldReceive('resizeCanvas')->with(100, 100, 'center')->andReturn($mock)->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runResize($image, 'contain', 100, 100) - ); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runResize($image, 'fill', 100, 100) - ); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runResize($image, 'max', 100, 100) - ); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runResize($image, 'stretch', 100, 100) - ); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runResize($image, 'crop', 100, 100) - ); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runResize($image, 'invalid', 100, 100) - ); - } - - public function testRunContainResize() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('resize')->with(100, 100, $this->callback)->andReturn($mock)->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runContainResize($image, 100, 100) - ); - } - - public function testRunFillResize() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('resize')->with(100, 100, $this->callback)->andReturn($mock)->once(); - $mock->shouldReceive('resizeCanvas')->with(100, 100, 'center')->andReturn($mock)->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runFillResize($image, 100, 100) - ); - } - - public function testRunMaxResize() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('resize')->with(100, 100, $this->callback)->andReturn($mock)->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runMaxResize($image, 100, 100) - ); - } - - public function testRunStretchResize() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('resize')->with(100, 100)->andReturn($mock)->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runStretchResize($image, 100, 100) - ); - } - - public function testRunCropResize() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('width')->andReturn(100)->times(4); - $mock->shouldReceive('height')->andReturn(100)->times(4); - $mock->shouldReceive('resize')->with(100, 100, $this->callback)->andReturn($mock)->once(); - $mock->shouldReceive('crop')->with(100, 100, 0, 0)->andReturn($mock)->once(); - }); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->runCropResize($image, 100, 100, 'center') - ); - } -} diff --git a/vendor/league/glide/tests/Manipulators/WatermarkTest.php b/vendor/league/glide/tests/Manipulators/WatermarkTest.php deleted file mode 100644 index 55c496d681..0000000000 --- a/vendor/league/glide/tests/Manipulators/WatermarkTest.php +++ /dev/null @@ -1,218 +0,0 @@ -<?php - -namespace League\Glide\Manipulators; - -use Mockery; - -class WatermarkTest extends \PHPUnit_Framework_TestCase -{ - private $manipulator; - - public function setUp() - { - $this->manipulator = new Watermark( - Mockery::mock('League\Flysystem\FilesystemInterface') - ); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Manipulators\Watermark', $this->manipulator); - } - - public function testSetWatermarks() - { - $this->manipulator->setWatermarks(Mockery::mock('League\Flysystem\FilesystemInterface')); - $this->assertInstanceOf('League\Flysystem\FilesystemInterface', $this->manipulator->getWatermarks()); - } - - public function testGetWatermarks() - { - $this->assertInstanceOf('League\Flysystem\FilesystemInterface', $this->manipulator->getWatermarks()); - } - - public function testSetWatermarksPathPrefix() - { - $this->manipulator->setWatermarksPathPrefix('watermarks/'); - $this->assertEquals('watermarks', $this->manipulator->getWatermarksPathPrefix()); - } - - public function testGetWatermarksPathPrefix() - { - $this->assertEquals('', $this->manipulator->getWatermarksPathPrefix()); - } - - public function testRun() - { - $image = Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('insert')->once(); - $mock->shouldReceive('getDriver')->andReturn(Mockery::mock('Intervention\Image\AbstractDriver', function ($mock) { - $mock->shouldReceive('init')->with('content')->andReturn(Mockery::mock('Intervention\Image\Image', function ($mock) { - $mock->shouldReceive('width')->andReturn(0)->once(); - $mock->shouldReceive('resize')->once(); - }))->once(); - }))->once(); - }); - - $this->manipulator->setWatermarks(Mockery::mock('League\Flysystem\FilesystemInterface', function ($watermarks) { - $watermarks->shouldReceive('has')->with('image.jpg')->andReturn(true)->once(); - $watermarks->shouldReceive('read')->with('image.jpg')->andReturn('content')->once(); - })); - - $this->manipulator->setParams([ - 'mark' => 'image.jpg', - 'markw' => '100', - 'markh' => '100', - 'markpad' => '10', - ]); - - $this->assertInstanceOf( - 'Intervention\Image\Image', - $this->manipulator->run($image) - ); - } - - public function testGetImage() - { - $this->manipulator->getWatermarks() - ->shouldReceive('has') - ->with('watermarks/image.jpg') - ->andReturn(true) - ->once() - ->shouldReceive('read') - ->with('watermarks/image.jpg') - ->andReturn('content') - ->once(); - - $this->manipulator->setWatermarksPathPrefix('watermarks'); - - $driver = Mockery::mock('Intervention\Image\AbstractDriver'); - $driver->shouldReceive('init') - ->with('content') - ->andReturn(Mockery::mock('Intervention\Image\Image')) - ->once(); - - $image = Mockery::mock('Intervention\Image\Image'); - $image->shouldReceive('getDriver') - ->andReturn($driver) - ->once(); - - $this->manipulator->setParams(['mark' => 'image.jpg'])->getImage($image); - } - - public function testGetImageWithUnreadableSource() - { - $this->manipulator->getWatermarks() - ->shouldReceive('has') - ->with('image.jpg') - ->andReturn(true) - ->once() - ->shouldReceive('read') - ->with('image.jpg') - ->andReturn(false) - ->once(); - - $image = Mockery::mock('Intervention\Image\Image'); - - $this->setExpectedException( - 'League\Glide\Filesystem\FilesystemException', - 'Could not read the image `image.jpg`.' - ); - - $this->manipulator->setParams(['mark' => 'image.jpg'])->getImage($image); - } - - public function testGetImageWithoutMarkParam() - { - $image = Mockery::mock('Intervention\Image\Image'); - - $this->assertNull($this->manipulator->getImage($image)); - } - - public function testGetImageWithEmptyMarkParam() - { - $image = Mockery::mock('Intervention\Image\Image'); - - $this->assertNull($this->manipulator->setParams(['mark' => ''])->getImage($image)); - } - - public function testGetImageWithoutWatermarksFilesystem() - { - $this->manipulator->setWatermarks(null); - - $image = Mockery::mock('Intervention\Image\Image'); - - $this->assertNull($this->manipulator->setParams(['mark' => 'image.jpg'])->getImage($image)); - } - - public function testGetDimension() - { - $image = Mockery::mock('Intervention\Image\Image'); - $image->shouldReceive('width')->andReturn(2000); - $image->shouldReceive('height')->andReturn(1000); - - $this->assertSame(300.0, $this->manipulator->setParams(['w' => '300'])->getDimension($image, 'w')); - $this->assertSame(300.0, $this->manipulator->setParams(['w' => 300])->getDimension($image, 'w')); - $this->assertSame(1000.0, $this->manipulator->setParams(['w' => '50w'])->getDimension($image, 'w')); - $this->assertSame(500.0, $this->manipulator->setParams(['w' => '50h'])->getDimension($image, 'w')); - $this->assertSame(null, $this->manipulator->setParams(['w' => '101h'])->getDimension($image, 'w')); - $this->assertSame(null, $this->manipulator->setParams(['w' => -1])->getDimension($image, 'w')); - $this->assertSame(null, $this->manipulator->setParams(['w' => ''])->getDimension($image, 'w')); - } - - public function testGetDpr() - { - $this->assertSame(1.0, $this->manipulator->setParams(['dpr' => 'invalid'])->getDpr()); - $this->assertSame(1.0, $this->manipulator->setParams(['dpr' => '-1'])->getDpr()); - $this->assertSame(1.0, $this->manipulator->setParams(['dpr' => '9'])->getDpr()); - $this->assertSame(2.0, $this->manipulator->setParams(['dpr' => '2'])->getDpr()); - } - - public function testGetFit() - { - $this->assertSame('contain', $this->manipulator->setParams(['markfit' => 'contain'])->getFit()); - $this->assertSame('max', $this->manipulator->setParams(['markfit' => 'max'])->getFit()); - $this->assertSame('stretch', $this->manipulator->setParams(['markfit' => 'stretch'])->getFit()); - $this->assertSame('crop', $this->manipulator->setParams(['markfit' => 'crop'])->getFit()); - $this->assertSame('crop-top-left', $this->manipulator->setParams(['markfit' => 'crop-top-left'])->getFit()); - $this->assertSame('crop-top', $this->manipulator->setParams(['markfit' => 'crop-top'])->getFit()); - $this->assertSame('crop-top-right', $this->manipulator->setParams(['markfit' => 'crop-top-right'])->getFit()); - $this->assertSame('crop-left', $this->manipulator->setParams(['markfit' => 'crop-left'])->getFit()); - $this->assertSame('crop-center', $this->manipulator->setParams(['markfit' => 'crop-center'])->getFit()); - $this->assertSame('crop-right', $this->manipulator->setParams(['markfit' => 'crop-right'])->getFit()); - $this->assertSame('crop-bottom-left', $this->manipulator->setParams(['markfit' => 'crop-bottom-left'])->getFit()); - $this->assertSame('crop-bottom', $this->manipulator->setParams(['markfit' => 'crop-bottom'])->getFit()); - $this->assertSame('crop-bottom-right', $this->manipulator->setParams(['markfit' => 'crop-bottom-right'])->getFit()); - $this->assertSame(null, $this->manipulator->setParams(['markfit' => null])->getFit()); - $this->assertSame(null, $this->manipulator->setParams(['markfit' => 'invalid'])->getFit()); - } - - public function testGetPosition() - { - $this->assertSame('top-left', $this->manipulator->setParams(['markpos' => 'top-left'])->getPosition()); - $this->assertSame('top', $this->manipulator->setParams(['markpos' => 'top'])->getPosition()); - $this->assertSame('top-right', $this->manipulator->setParams(['markpos' => 'top-right'])->getPosition()); - $this->assertSame('left', $this->manipulator->setParams(['markpos' => 'left'])->getPosition()); - $this->assertSame('center', $this->manipulator->setParams(['markpos' => 'center'])->getPosition()); - $this->assertSame('right', $this->manipulator->setParams(['markpos' => 'right'])->getPosition()); - $this->assertSame('bottom-left', $this->manipulator->setParams(['markpos' => 'bottom-left'])->getPosition()); - $this->assertSame('bottom', $this->manipulator->setParams(['markpos' => 'bottom'])->getPosition()); - $this->assertSame('bottom-right', $this->manipulator->setParams(['markpos' => 'bottom-right'])->getPosition()); - $this->assertSame('bottom-right', $this->manipulator->setParams([])->getPosition()); - $this->assertSame('bottom-right', $this->manipulator->setParams(['markpos' => 'invalid'])->getPosition()); - } - - public function testGetAlpha() - { - $this->assertSame(100, $this->manipulator->setParams(['markalpha' => 'invalid'])->getAlpha()); - $this->assertSame(100, $this->manipulator->setParams(['markalpha' => 255])->getAlpha()); - $this->assertSame(100, $this->manipulator->setParams(['markalpha' => -1])->getAlpha()); - $this->assertSame(65, $this->manipulator->setParams(['markalpha' => '65'])->getAlpha()); - $this->assertSame(65, $this->manipulator->setParams(['markalpha' => 65])->getAlpha()); - } -} diff --git a/vendor/league/glide/tests/Responses/PsrResponseFactoryTest.php b/vendor/league/glide/tests/Responses/PsrResponseFactoryTest.php deleted file mode 100644 index f616069622..0000000000 --- a/vendor/league/glide/tests/Responses/PsrResponseFactoryTest.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -namespace League\Glide\Responses; - -use Mockery; - -class PsrResponseFactoryTest extends \PHPUnit_Framework_TestCase -{ - public function testCreateInstance() - { - $response = Mockery::mock('Psr\Http\Message\ResponseInterface'); - $streamCallback = function () { - }; - - $this->assertInstanceOf( - 'League\Glide\Responses\PsrResponseFactory', - new PsrResponseFactory($response, $streamCallback) - ); - } - - public function testCreate() - { - $response = Mockery::mock('Psr\Http\Message\ResponseInterface', function ($mock) { - $mock->shouldReceive('withBody')->andReturn($mock)->once(); - $mock->shouldReceive('withHeader')->andReturn($mock)->times(4); - }); - - $streamCallback = function ($stream) { - return $stream; - }; - - $cache = Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('getMimetype')->andReturn('image/jpeg'); - $mock->shouldReceive('getSize')->andReturn(0); - $mock->shouldReceive('readStream')->andReturn( - Mockery::mock('Psr\Http\Message\StreamInterface') - ); - }); - - $factory = new PsrResponseFactory($response, $streamCallback); - - $this->assertInstanceOf( - 'Psr\Http\Message\ResponseInterface', - $factory->create($cache, 'image.jpg') - ); - } -} diff --git a/vendor/league/glide/tests/ServerFactoryTest.php b/vendor/league/glide/tests/ServerFactoryTest.php deleted file mode 100644 index d5f91ae9cd..0000000000 --- a/vendor/league/glide/tests/ServerFactoryTest.php +++ /dev/null @@ -1,253 +0,0 @@ -<?php - -namespace League\Glide; - -use Mockery; - -class ServerFactoryTest extends \PHPUnit_Framework_TestCase -{ - public function testCreateServerFactory() - { - $this->assertInstanceOf('League\Glide\ServerFactory', new ServerFactory()); - } - - public function testGetServer() - { - $server = new ServerFactory([ - 'source' => Mockery::mock('League\Flysystem\FilesystemInterface'), - 'cache' => Mockery::mock('League\Flysystem\FilesystemInterface'), - 'response' => Mockery::mock('League\Glide\Responses\ResponseFactoryInterface'), - ]); - - $this->assertInstanceOf('League\Glide\Server', $server->getServer()); - } - - public function testGetSource() - { - $server = new ServerFactory([ - 'source' => Mockery::mock('League\Flysystem\FilesystemInterface'), - ]); - - $this->assertInstanceOf('League\Flysystem\FilesystemInterface', $server->getSource()); - - $server = new ServerFactory([ - 'source' => sys_get_temp_dir(), - ]); - - $this->assertInstanceOf('League\Flysystem\FilesystemInterface', $server->getSource()); - } - - public function testGetSourceWithNoneSet() - { - $this->setExpectedException( - 'InvalidArgumentException', - 'A "source" file system must be set.' - ); - - $server = new ServerFactory(); - $server->getSource(); - } - - public function testGetSourcePathPrefix() - { - $server = new ServerFactory([ - 'source_path_prefix' => 'source', - ]); - - $this->assertSame('source', $server->getSourcePathPrefix()); - } - - public function testGetCache() - { - $server = new ServerFactory([ - 'cache' => Mockery::mock('League\Flysystem\FilesystemInterface'), - ]); - - $this->assertInstanceOf('League\Flysystem\FilesystemInterface', $server->getCache()); - - $server = new ServerFactory([ - 'cache' => sys_get_temp_dir(), - ]); - - $this->assertInstanceOf('League\Flysystem\FilesystemInterface', $server->getCache()); - } - - public function testGetCacheWithNoneSet() - { - $this->setExpectedException( - 'InvalidArgumentException', - 'A "cache" file system must be set.' - ); - - $server = new ServerFactory(); - $server->getCache(); - } - - public function testGetCachePathPrefix() - { - $server = new ServerFactory([ - 'cache_path_prefix' => 'cache', - ]); - - $this->assertSame('cache', $server->getCachePathPrefix()); - } - - public function testGetGroupCacheInFolders() - { - $server = new ServerFactory(); - - $this->assertTrue($server->getGroupCacheInFolders()); - - $server = new ServerFactory([ - 'group_cache_in_folders' => false, - ]); - - $this->assertFalse($server->getGroupCacheInFolders()); - } - - public function testGetCacheWithFileExtensions() - { - $server = new ServerFactory(); - - $this->assertFalse($server->getCacheWithFileExtensions()); - - $server = new ServerFactory([ - 'cache_with_file_extensions' => true, - ]); - - $this->assertTrue($server->getCacheWithFileExtensions()); - } - - public function testGetWatermarks() - { - $server = new ServerFactory([ - 'watermarks' => Mockery::mock('League\Flysystem\FilesystemInterface'), - ]); - - $this->assertInstanceOf('League\Flysystem\FilesystemInterface', $server->getWatermarks()); - - $server = new ServerFactory([ - 'watermarks' => sys_get_temp_dir(), - ]); - - $this->assertInstanceOf('League\Flysystem\FilesystemInterface', $server->getWatermarks()); - } - - public function testGetWatermarksPathPrefix() - { - $server = new ServerFactory([ - 'watermarks_path_prefix' => 'watermarks', - ]); - - $this->assertSame('watermarks', $server->getWatermarksPathPrefix()); - } - - public function testGetApi() - { - $server = new ServerFactory(); - - $this->assertInstanceOf('League\Glide\Api\Api', $server->getApi()); - } - - public function testGetImageManager() - { - $server = new ServerFactory([ - 'driver' => 'imagick', - ]); - $imageManager = $server->getImageManager(); - - $this->assertInstanceOf('Intervention\Image\ImageManager', $imageManager); - $this->assertSame('imagick', $imageManager->config['driver']); - } - - public function testGetImageManagerWithNoneSet() - { - $server = new ServerFactory(); - $imageManager = $server->getImageManager(); - - $this->assertInstanceOf('Intervention\Image\ImageManager', $imageManager); - $this->assertSame('gd', $imageManager->config['driver']); - } - - public function testGetManipulators() - { - $server = new ServerFactory(); - $manipulators = $server->getManipulators(); - - $this->assertInternalType('array', $manipulators); - $this->assertInstanceOf('League\Glide\Manipulators\ManipulatorInterface', $manipulators[0]); - } - - public function testGetMaxImageSize() - { - $server = new ServerFactory([ - 'max_image_size' => 100, - ]); - - $this->assertSame(100, $server->getMaxImageSize()); - } - - public function testGetDefaults() - { - $defaults = [ - 'fm' => 'jpg', - ]; - - $server = new ServerFactory([ - 'defaults' => $defaults, - ]); - - $this->assertSame($defaults, $server->getDefaults()); - } - - public function testGetPresets() - { - $presets = [ - 'small' => [ - 'w' => 500, - ], - ]; - - $server = new ServerFactory([ - 'presets' => $presets, - ]); - - $this->assertSame($presets, $server->getPresets()); - } - - public function testGetBaseUrl() - { - $server = new ServerFactory([ - 'base_url' => 'img/', - ]); - - $this->assertSame('img/', $server->getBaseUrl()); - } - - public function testGetResponseFactory() - { - $server = new ServerFactory([ - 'response' => Mockery::mock('League\Glide\Responses\ResponseFactoryInterface'), - ]); - - $this->assertInstanceOf('League\Glide\Responses\ResponseFactoryInterface', $server->getResponseFactory()); - } - - public function testGetResponseFactoryWithNoneSet() - { - $server = new ServerFactory(); - - $this->assertNull($server->getResponseFactory()); - } - - public function testCreate() - { - $server = ServerFactory::create([ - 'source' => Mockery::mock('League\Flysystem\FilesystemInterface'), - 'cache' => Mockery::mock('League\Flysystem\FilesystemInterface'), - 'response' => Mockery::mock('League\Glide\Responses\ResponseFactoryInterface'), - ]); - - $this->assertInstanceOf('League\Glide\Server', $server); - } -} diff --git a/vendor/league/glide/tests/ServerTest.php b/vendor/league/glide/tests/ServerTest.php deleted file mode 100644 index e779a4c3ee..0000000000 --- a/vendor/league/glide/tests/ServerTest.php +++ /dev/null @@ -1,565 +0,0 @@ -<?php - -namespace League\Glide; - -use Mockery; - -class ServerTest extends \PHPUnit_Framework_TestCase -{ - private $server; - - public function setUp() - { - $response = Mockery::mock('Psr\Http\Message\ResponseInterface'); - - $responseFactory = Mockery::mock('League\Glide\Responses\ResponseFactoryInterface'); - $responseFactory - ->shouldReceive('create') - ->andReturn($response) - ->shouldReceive('send') - ->andReturnUsing(function () { - echo 'content'; - }); - - $this->server = new Server( - Mockery::mock('League\Flysystem\FilesystemInterface'), - Mockery::mock('League\Flysystem\FilesystemInterface'), - Mockery::mock('League\Glide\Api\ApiInterface'), - $responseFactory - ); - } - - public function tearDown() - { - Mockery::close(); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Server', $this->server); - } - - public function testSetSource() - { - $this->server->setSource(Mockery::mock('League\Flysystem\FilesystemInterface')); - $this->assertInstanceOf('League\Flysystem\FilesystemInterface', $this->server->getSource()); - } - - public function testGetSource() - { - $this->assertInstanceOf('League\Flysystem\FilesystemInterface', $this->server->getSource()); - } - - public function testSetSourcePathPrefix() - { - $this->server->setSourcePathPrefix('img/'); - $this->assertEquals('img', $this->server->getSourcePathPrefix()); - } - - public function testGetSourcePathPrefix() - { - $this->assertEquals('', $this->server->getSourcePathPrefix()); - } - - public function testGetSourcePath() - { - $this->assertEquals('image.jpg', $this->server->getSourcePath('image.jpg')); - } - - public function testGetSourcePathWithBaseUrl() - { - $this->server->setBaseUrl('img/'); - $this->assertEquals('image.jpg', $this->server->getSourcePath('img/image.jpg')); - - // Test for a bug where if the path starts with the same substring as the base url, the source - // path would trim the base url off the filename. eg, the following would've returned 'ur.jpg' - $this->assertEquals('imgur.jpg', $this->server->getSourcePath('imgur.jpg')); - } - - public function testGetSourcePathWithPrefix() - { - $this->server->setSourcePathPrefix('img/'); - $this->assertEquals('img/image.jpg', $this->server->getSourcePath('image.jpg')); - } - - public function testGetSourcePathWithMissingPath() - { - $this->setExpectedException( - 'League\Glide\Filesystem\FileNotFoundException', - 'Image path missing.' - ); - - $this->server->getSourcePath(''); - } - - public function testGetSourcePathWithEncodedEntities() - { - $this->assertEquals('an image.jpg', $this->server->getSourcePath('an%20image.jpg')); - } - - public function testSourceFileExists() - { - $this->server->setSource(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->with('image.jpg')->andReturn(true)->once(); - })); - - $this->assertTrue($this->server->sourceFileExists('image.jpg')); - } - - public function testSetBaseUrl() - { - $this->server->setBaseUrl('img/'); - $this->assertEquals('img', $this->server->getBaseUrl()); - } - - public function testGetBaseUrl() - { - $this->assertEquals('', $this->server->getBaseUrl()); - } - - public function testSetCache() - { - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface')); - $this->assertInstanceOf('League\Flysystem\FilesystemInterface', $this->server->getCache()); - } - - public function testGetCache() - { - $this->assertInstanceOf('League\Flysystem\FilesystemInterface', $this->server->getCache()); - } - - public function testSetCachePathPrefix() - { - $this->server->setCachePathPrefix('img/'); - $this->assertEquals('img', $this->server->getCachePathPrefix()); - } - - public function testGetCachePathPrefix() - { - $this->assertEquals('', $this->server->getCachePathPrefix()); - } - - public function testSetGroupCacheInFolders() - { - $this->server->setGroupCacheInFolders(false); - - $this->assertFalse($this->server->getGroupCacheInFolders()); - } - - public function testGetGroupCacheInFolders() - { - $this->assertTrue($this->server->getGroupCacheInFolders()); - } - - public function testSetCacheWithFileExtensions() - { - $this->server->setCacheWithFileExtensions(true); - - $this->assertTrue($this->server->getCacheWithFileExtensions()); - } - - public function testGetCacheWithFileExtensions() - { - $this->assertFalse($this->server->getCacheWithFileExtensions()); - } - - public function testGetCachePath() - { - $this->assertEquals( - 'image.jpg/e863e008b6f09807c3b0aa3805bc9c63', - $this->server->getCachePath('image.jpg', ['w' => '100']) - ); - } - - public function testGetCachePathWithNoFolderGrouping() - { - $this->server->setGroupCacheInFolders(false); - - $this->assertEquals( - 'e863e008b6f09807c3b0aa3805bc9c63', - $this->server->getCachePath('image.jpg', ['w' => '100']) - ); - } - - public function testGetCachePathWithPrefix() - { - $this->server->setCachePathPrefix('img/'); - $this->assertEquals('img/image.jpg/75094881e9fd2b93063d6a5cb083091c', $this->server->getCachePath('image.jpg', [])); - } - - public function testGetCachePathWithSourcePrefix() - { - $this->server->setSourcePathPrefix('img/'); - $this->assertEquals('image.jpg/75094881e9fd2b93063d6a5cb083091c', $this->server->getCachePath('image.jpg', [])); - } - - public function testGetCachePathWithExtension() - { - $this->server->setCacheWithFileExtensions(true); - $this->assertEquals('image.jpg/75094881e9fd2b93063d6a5cb083091c.jpg', $this->server->getCachePath('image.jpg', [])); - } - - public function testGetCachePathWithExtensionAndFmParam() - { - $this->server->setCacheWithFileExtensions(true); - $this->assertEquals('image.jpg/eb6091e07fb06219634a3c82afb88239.gif', $this->server->getCachePath('image.jpg', ['fm' => 'gif'])); - } - - public function testGetCachePathWithExtensionAndPjpgFmParam() - { - $this->server->setCacheWithFileExtensions(true); - $this->assertEquals('image.jpg/ce5cb75f4a37dec0a0a49854e94123eb.jpg', $this->server->getCachePath('image.jpg', ['fm' => 'pjpg'])); - } - - public function testGetCachePathWithExtensionAndFmFromDefaults() - { - $this->server->setCacheWithFileExtensions(true); - $this->server->setDefaults(['fm' => 'gif']); - $this->assertEquals('image.jpg/eb6091e07fb06219634a3c82afb88239.gif', $this->server->getCachePath('image.jpg', [])); - } - - public function testGetCachePathWithExtensionAndPjpgFmFromDefaults() - { - $this->server->setCacheWithFileExtensions(true); - $this->server->setDefaults(['fm' => 'pjpg']); - $this->assertEquals('image.jpg/ce5cb75f4a37dec0a0a49854e94123eb.jpg', $this->server->getCachePath('image.jpg', [])); - } - - public function testGetCachePathWithExtensionAndFmFromPreset() - { - $this->server->setCacheWithFileExtensions(true); - - $this->server->setPresets(['gif' => [ - 'fm' => 'gif', - ]]); - - $this->assertEquals('image.jpg/eb6091e07fb06219634a3c82afb88239.gif', $this->server->getCachePath('image.jpg', ['p' => 'gif'])); - } - - public function testGetCachePathWithExtensionAndPjpgFmFromPreset() - { - $this->server->setCacheWithFileExtensions(true); - - $this->server->setPresets(['pjpg' => [ - 'fm' => 'pjpg', - ]]); - - $this->assertEquals('image.jpg/ce5cb75f4a37dec0a0a49854e94123eb.jpg', $this->server->getCachePath('image.jpg', ['p' => 'pjpg'])); - } - - public function testCacheFileExists() - { - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->with('image.jpg/75094881e9fd2b93063d6a5cb083091c')->andReturn(true)->once(); - })); - - $this->assertTrue($this->server->cacheFileExists('image.jpg', [])); - } - - public function testDeleteCache() - { - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('deleteDir')->with('image.jpg')->andReturn(true)->once(); - })); - - $this->assertTrue($this->server->deleteCache('image.jpg', [])); - } - - public function testDeleteCacheWithGroupCacheInFoldersDisabled() - { - $this->setExpectedException( - 'InvalidArgumentException', - 'Deleting cached image manipulations is not possible when grouping cache into folders is disabled.' - ); - - $this->server->setGroupCacheInFolders(false); - - $this->server->deleteCache('image.jpg', []); - } - - public function testSetApi() - { - $api = Mockery::mock('League\Glide\Api\ApiInterface'); - $this->server->setApi($api); - $this->assertInstanceOf('League\Glide\Api\ApiInterface', $this->server->getApi()); - } - - public function testGetApi() - { - $this->assertInstanceOf('League\Glide\Api\ApiInterface', $this->server->getApi()); - } - - public function testSetDefaults() - { - $defaults = [ - 'fm' => 'jpg', - ]; - - $this->server->setDefaults($defaults); - - $this->assertSame($defaults, $this->server->getDefaults()); - } - - public function testGetDefaults() - { - $this->testSetDefaults(); - } - - public function testSetPresets() - { - $presets = [ - 'small' => [ - 'w' => '200', - 'h' => '200', - 'fit' => 'crop', - ], - ]; - - $this->server->setPresets($presets); - - $this->assertSame($presets, $this->server->getPresets()); - } - - public function testGetPresets() - { - $this->testSetPresets(); - } - - public function testGetAllParams() - { - $this->server->setDefaults([ - 'fm' => 'jpg', - ]); - - $this->server->setPresets([ - 'small' => [ - 'w' => '200', - 'h' => '200', - 'fit' => 'crop', - ], - ]); - - $all_params = $this->server->getAllParams([ - 'w' => '100', - 'p' => 'small', - ]); - - $this->assertSame([ - 'fm' => 'jpg', - 'w' => '100', - 'h' => '200', - 'fit' => 'crop', - 'p' => 'small', - ], $all_params); - } - - public function testSetResponseFactory() - { - $this->server->setResponseFactory(Mockery::mock('League\Glide\Responses\ResponseFactoryInterface')); - - $this->assertInstanceOf( - 'League\Glide\Responses\ResponseFactoryInterface', - $this->server->getResponseFactory() - ); - } - - public function testGetResponseFactory() - { - $this->testSetResponseFactory(); - } - - public function testGetImageResponse() - { - $this->server->setResponseFactory(Mockery::mock('League\Glide\Responses\ResponseFactoryInterface', function ($mock) { - $mock->shouldReceive('create')->andReturn(Mockery::mock('Psr\Http\Message\ResponseInterface')); - })); - - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(true); - })); - - $this->assertInstanceOf( - 'Psr\Http\Message\ResponseInterface', - $this->server->getImageResponse('image.jpg', []) - ); - } - - public function testGetImageResponseWithoutResponseFactory() - { - $this->setExpectedException( - 'InvalidArgumentException', - 'Unable to get image response, no response factory defined.' - ); - - $this->server->getImageResponse('image.jpg', []); - } - - public function testGetImageAsBase64() - { - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(true); - $mock->shouldReceive('getMimetype')->andReturn('image/jpeg'); - $mock->shouldReceive('read')->andReturn('content')->once(); - })); - - $this->assertEquals( - 'data:image/jpeg;base64,Y29udGVudA==', - $this->server->getImageAsBase64('image.jpg', []) - ); - } - - public function testGetImageAsBase64WithUnreadableSource() - { - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(true); - $mock->shouldReceive('read')->andReturn(false)->once(); - })); - - $this->setExpectedException( - 'League\Glide\Filesystem\FilesystemException', - 'Could not read the image `image.jpg/75094881e9fd2b93063d6a5cb083091c`.' - ); - - $this->server->getImageAsBase64('image.jpg', []); - } - - /** - * @runInSeparateProcess - */ - public function testOutputImage() - { - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(true); - $mock->shouldReceive('getMimetype')->andReturn('image/jpeg'); - $mock->shouldReceive('getSize')->andReturn(0); - - $file = tmpfile(); - fwrite($file, 'content'); - $mock->shouldReceive('readStream')->andReturn($file); - })); - - ob_start(); - $response = $this->server->outputImage('image.jpg', []); - $content = ob_get_clean(); - - $this->assertNull($response); - $this->assertEquals('content', $content); - } - - public function testMakeImageFromSource() - { - $this->server->setSource(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(true)->once(); - $mock->shouldReceive('read')->andReturn('content')->once(); - })); - - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(false)->once(); - $mock->shouldReceive('write')->with('image.jpg/75094881e9fd2b93063d6a5cb083091c', 'content')->once(); - })); - - $this->server->setApi(Mockery::mock('League\Glide\Api\ApiInterface', function ($mock) { - $mock->shouldReceive('run')->andReturn('content')->once(); - })); - - $this->assertEquals( - 'image.jpg/75094881e9fd2b93063d6a5cb083091c', - $this->server->makeImage('image.jpg', []) - ); - } - - public function testMakeImageFromCache() - { - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(true); - })); - - $this->assertEquals( - 'image.jpg/75094881e9fd2b93063d6a5cb083091c', - $this->server->makeImage('image.jpg', []) - ); - } - - public function testMakeImageFromSourceThatDoesNotExist() - { - $this->setExpectedException( - 'League\Glide\Filesystem\FileNotFoundException', - 'Could not find the image `image.jpg`.' - ); - - $this->server->setSource(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(false)->once(); - })); - - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(false)->once(); - })); - - $this->server->makeImage('image.jpg', []); - } - - public function testMakeImageWithUnreadableSource() - { - $this->setExpectedException( - 'League\Glide\Filesystem\FilesystemException', - 'Could not read the image `image.jpg`.' - ); - - $this->server->setSource(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(true)->once(); - $mock->shouldReceive('read')->andReturn(false)->once(); - })); - - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(false)->once(); - })); - - $this->server->makeImage('image.jpg', []); - } - - public function testMakeImageWithUnwritableCache() - { - $this->setExpectedException( - 'League\Glide\Filesystem\FilesystemException', - 'Could not write the image `image.jpg/75094881e9fd2b93063d6a5cb083091c`.' - ); - - $this->server->setSource(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(true)->once(); - $mock->shouldReceive('read')->andReturn('content')->once(); - })); - - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(false)->once(); - $mock->shouldReceive('write')->andReturn(false)->once(); - })); - - $this->server->setApi(Mockery::mock('League\Glide\Api\ApiInterface', function ($mock) { - $mock->shouldReceive('run')->andReturn('content')->once(); - })); - - $this->server->makeImage('image.jpg', []); - } - - public function testMakeImageWithExistingCacheFile() - { - $this->server->setSource(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(true)->once(); - $mock->shouldReceive('read')->andReturn('content')->once(); - })); - - $this->server->setCache(Mockery::mock('League\Flysystem\FilesystemInterface', function ($mock) { - $mock->shouldReceive('has')->andReturn(false)->once(); - $mock->shouldReceive('write')->andThrow(new \League\Flysystem\FileExistsException('75094881e9fd2b93063d6a5cb083091c')); - })); - - $this->server->setApi(Mockery::mock('League\Glide\Api\ApiInterface', function ($mock) { - $mock->shouldReceive('run')->andReturn('content')->once(); - })); - - $this->assertEquals( - 'image.jpg/75094881e9fd2b93063d6a5cb083091c', - $this->server->makeImage('image.jpg', []) - ); - } -} diff --git a/vendor/league/glide/tests/Signatures/SignatureFactoryTest.php b/vendor/league/glide/tests/Signatures/SignatureFactoryTest.php deleted file mode 100644 index 6a235f8ee3..0000000000 --- a/vendor/league/glide/tests/Signatures/SignatureFactoryTest.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -namespace League\Glide\Signatures; - -class SignatureFactoryTest extends \PHPUnit_Framework_TestCase -{ - public function testCreate() - { - $this->assertInstanceOf('League\Glide\Signatures\Signature', SignatureFactory::create('example')); - } -} diff --git a/vendor/league/glide/tests/Signatures/SignatureTest.php b/vendor/league/glide/tests/Signatures/SignatureTest.php deleted file mode 100644 index 9256575bfc..0000000000 --- a/vendor/league/glide/tests/Signatures/SignatureTest.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - -namespace League\Glide\Signatures; - -class SignatureTest extends \PHPUnit_Framework_TestCase -{ - private $httpSignature; - - public function setUp() - { - $this->httpSignature = new Signature('example'); - } - - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Signatures\Signature', $this->httpSignature); - } - - public function testAddSignature() - { - $this->assertEquals( - ['w' => '100', 's' => '9978a40f1fc75fa64ac92ea9baf16ff3'], - $this->httpSignature->addSignature('image.jpg', ['w' => '100']) - ); - } - - public function testAddSignatureWithExistingSignature() - { - $this->assertEquals( - ['w' => '100', 's' => '9978a40f1fc75fa64ac92ea9baf16ff3'], - $this->httpSignature->addSignature('image.jpg', ['w' => '100', 's' => 'existing']) - ); - } - - public function testValidateRequest() - { - $this->assertNull( - $this->httpSignature->validateRequest('image.jpg', [ - 'w' => '100', - 's' => '9978a40f1fc75fa64ac92ea9baf16ff3', - ]) - ); - } - - public function testValidateRequestWithLeadingSlash() - { - $this->assertNull( - $this->httpSignature->validateRequest('/image.jpg', [ - 'w' => '100', - 's' => '9978a40f1fc75fa64ac92ea9baf16ff3', - ]) - ); - } - - public function testValidateRequestWithMissingSignature() - { - $this->setExpectedException('League\Glide\Signatures\SignatureException', 'Signature is missing.'); - - $this->httpSignature->validateRequest('image.jpg', [ - 'w' => '100', - ]); - } - - public function testValidateRequestWithInvalidSignature() - { - $this->setExpectedException('League\Glide\Signatures\SignatureException', 'Signature is not valid.'); - - $this->httpSignature->validateRequest('image.jpg', [ - 'w' => '100', - 's' => 'invalid', - ]); - } - - public function testGenerateSignature() - { - $this->assertEquals( - '9978a40f1fc75fa64ac92ea9baf16ff3', - $this->httpSignature->generateSignature('image.jpg', ['w' => '100']) - ); - } -} diff --git a/vendor/league/glide/tests/Urls/UrlBuilderFactoryTest.php b/vendor/league/glide/tests/Urls/UrlBuilderFactoryTest.php deleted file mode 100644 index 1cf56f0fef..0000000000 --- a/vendor/league/glide/tests/Urls/UrlBuilderFactoryTest.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -namespace League\Glide\Urls; - -class UrlBuilderFactoryTest extends \PHPUnit_Framework_TestCase -{ - public function testCreate() - { - $urlBuilder = UrlBuilderFactory::create('/img'); - - $this->assertInstanceOf('League\Glide\Urls\UrlBuilder', $urlBuilder); - $this->assertEquals('/img/image.jpg', $urlBuilder->getUrl('image.jpg')); - } - - public function testCreateWithSignKey() - { - $urlBuilder = UrlBuilderFactory::create('img', 'example-sign-key'); - - $this->assertEquals( - '/img/image.jpg?s=56020c3dc5f68487c14510343c3e2c43', - $urlBuilder->getUrl('image.jpg') - ); - } - - public function testCreateWithSignKeyWithLeadingSlash() - { - $urlBuilder = UrlBuilderFactory::create('/img', 'example-sign-key'); - - $this->assertEquals( - '/img/image.jpg?s=56020c3dc5f68487c14510343c3e2c43', - $urlBuilder->getUrl('image.jpg') - ); - } -} diff --git a/vendor/league/glide/tests/Urls/UrlBuilderTest.php b/vendor/league/glide/tests/Urls/UrlBuilderTest.php deleted file mode 100644 index f700b8bdbc..0000000000 --- a/vendor/league/glide/tests/Urls/UrlBuilderTest.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -namespace League\Glide\Urls; - -use League\Glide\Signatures\Signature; - -class UrlBuilderTest extends \PHPUnit_Framework_TestCase -{ - public function testCreateInstance() - { - $this->assertInstanceOf('League\Glide\Urls\UrlBuilder', new UrlBuilder()); - } - - public function testGetUrl() - { - $urlBuilder = new UrlBuilder('http://example.com'); - - $this->assertEquals( - 'http://example.com/image.jpg?w=100', - $urlBuilder->getUrl('image.jpg', ['w' => '100']) - ); - } - - public function testGetUrlWithNoDomain() - { - $urlBuilder = new UrlBuilder(); - - $this->assertEquals( - '/image.jpg?w=100', - $urlBuilder->getUrl('image.jpg', ['w' => '100']) - ); - } - - public function testGetUrlWithDomainAndPort() - { - $urlBuilder = new UrlBuilder('http://localhost:8000'); - - $this->assertEquals( - 'http://localhost:8000/image.jpg?w=100', - $urlBuilder->getUrl('image.jpg', ['w' => '100']) - ); - } - - public function testGetUrlWithProtocolRelativeDomain() - { - $urlBuilder = new UrlBuilder('//localhost:8000'); - - $this->assertEquals( - '//localhost:8000/image.jpg?w=100', - $urlBuilder->getUrl('image.jpg', ['w' => '100']) - ); - } - - public function testGetUrlWithToken() - { - $urlBuilder = new UrlBuilder('http://example.com', new Signature('example-sign-key')); - - $this->assertEquals( - 'http://example.com/image.jpg?w=100&s=e1b69d4b79ecf33283128819fd008906', - $urlBuilder->getUrl('image.jpg', ['w' => '100']) - ); - } - - public function testGetInvalidUrl() - { - $this->setExpectedException('\InvalidArgumentException', 'Not a valid path.'); - - $urlBuilder = new UrlBuilder(':80'); - $urlBuilder->getUrl('image.jpg'); - } -} |
