From 8001e1a8761a239be1d99e0ed5da83573d7be560 Mon Sep 17 00:00:00 2001 From: merdan Date: Thu, 8 Apr 2021 17:38:39 +0500 Subject: [PATCH] image resize, api --- .htaccess | 30 + .../abwebdevelopers/imageresize/LICENCE.md | 19 + .../abwebdevelopers/imageresize/Plugin.php | 215 +++ plugins/abwebdevelopers/imageresize/README.md | 181 +++ .../imageresize/assets/image-not-found.png | Bin 0 -> 10318 bytes .../imageresize/assets/image-not-found.psd | Bin 0 -> 1416190 bytes .../imageresize/assets/settings-patch.css | 4 + .../imageresize/classes/Resizer.php | 1148 +++++++++++++++++ .../imageresize/commands/ImageResizeClear.php | 21 + .../imageresize/commands/ImageResizeGc.php | 25 + .../commands/ImageResizeResetPermalinks.php | 24 + .../imageresize/lang/en/lang.php | 160 +++ .../imageresize/lang/fi/lang.php | 136 ++ .../imageresize/lang/ru/lang.php | 135 ++ .../imageresize/models/ImagePermalink.php | 254 ++++ .../imageresize/models/Settings.php | 286 ++++ .../imageresize/models/settings/fields.yaml | 190 +++ .../reportwidgets/ImageResizeClearWidget.php | 131 ++ .../partials/_default.htm | 12 + .../abwebdevelopers/imageresize/routes.php | 40 + .../traits/HasPermalinkIdentifiers.php | 21 + .../updates/clear_old_cache_dir.php | 33 + .../updates/create_permalinks_table.php | 35 + .../imageresize/updates/seed_filters.php | 99 ++ .../imageresize/updates/version.yaml | 58 + .../imageresize/vendor/autoload.php | 7 + .../vendor/composer/ClassLoader.php | 445 +++++++ .../imageresize/vendor/composer/LICENSE | 21 + .../vendor/composer/autoload_classmap.php | 9 + .../vendor/composer/autoload_files.php | 11 + .../vendor/composer/autoload_namespaces.php | 9 + .../vendor/composer/autoload_psr4.php | 13 + .../vendor/composer/autoload_real.php | 70 + .../vendor/composer/autoload_static.php | 60 + .../vendor/composer/installed.json | 373 ++++++ .../vendor/composer/installers/LICENSE | 19 + .../vendor/composer/installers/composer.json | 119 ++ .../composer/installers/phpstan.neon.dist | 10 + .../src/Composer/Installers/AglInstaller.php | 21 + .../Composer/Installers/AimeosInstaller.php | 9 + .../Installers/AnnotateCmsInstaller.php | 11 + .../Composer/Installers/AsgardInstaller.php | 49 + .../Composer/Installers/AttogramInstaller.php | 9 + .../src/Composer/Installers/BaseInstaller.php | 137 ++ .../Composer/Installers/BitrixInstaller.php | 126 ++ .../Composer/Installers/BonefishInstaller.php | 9 + .../Composer/Installers/CakePHPInstaller.php | 65 + .../src/Composer/Installers/ChefInstaller.php | 11 + .../Composer/Installers/CiviCrmInstaller.php | 9 + .../Installers/ClanCatsFrameworkInstaller.php | 10 + .../Composer/Installers/CockpitInstaller.php | 32 + .../Installers/CodeIgniterInstaller.php | 11 + .../Installers/Concrete5Installer.php | 13 + .../Composer/Installers/CraftInstaller.php | 35 + .../Composer/Installers/CroogoInstaller.php | 21 + .../Composer/Installers/DecibelInstaller.php | 10 + .../Composer/Installers/DframeInstaller.php | 10 + .../Composer/Installers/DokuWikiInstaller.php | 50 + .../Composer/Installers/DolibarrInstaller.php | 16 + .../Composer/Installers/DrupalInstaller.php | 22 + .../src/Composer/Installers/ElggInstaller.php | 9 + .../Composer/Installers/EliasisInstaller.php | 12 + .../Installers/ExpressionEngineInstaller.php | 29 + .../Installers/EzPlatformInstaller.php | 10 + .../src/Composer/Installers/FuelInstaller.php | 11 + .../Composer/Installers/FuelphpInstaller.php | 9 + .../src/Composer/Installers/GravInstaller.php | 30 + .../Composer/Installers/HuradInstaller.php | 25 + .../Composer/Installers/ImageCMSInstaller.php | 11 + .../src/Composer/Installers/Installer.php | 294 +++++ .../src/Composer/Installers/ItopInstaller.php | 9 + .../Composer/Installers/JoomlaInstaller.php | 15 + .../Composer/Installers/KanboardInstaller.php | 18 + .../Composer/Installers/KirbyInstaller.php | 11 + .../Composer/Installers/KnownInstaller.php | 11 + .../Composer/Installers/KodiCMSInstaller.php | 10 + .../Composer/Installers/KohanaInstaller.php | 9 + .../LanManagementSystemInstaller.php | 27 + .../Composer/Installers/LaravelInstaller.php | 9 + .../Composer/Installers/LavaLiteInstaller.php | 10 + .../Composer/Installers/LithiumInstaller.php | 10 + .../Installers/MODULEWorkInstaller.php | 9 + .../Composer/Installers/MODXEvoInstaller.php | 16 + .../Composer/Installers/MagentoInstaller.php | 11 + .../Composer/Installers/MajimaInstaller.php | 37 + .../src/Composer/Installers/MakoInstaller.php | 9 + .../Composer/Installers/MantisBTInstaller.php | 23 + .../Composer/Installers/MauticInstaller.php | 25 + .../src/Composer/Installers/MayaInstaller.php | 33 + .../Installers/MediaWikiInstaller.php | 51 + .../Installers/MicroweberInstaller.php | 119 ++ .../src/Composer/Installers/ModxInstaller.php | 12 + .../Composer/Installers/MoodleInstaller.php | 59 + .../Composer/Installers/OctoberInstaller.php | 47 + .../Composer/Installers/OntoWikiInstaller.php | 24 + .../Composer/Installers/OsclassInstaller.php | 14 + .../src/Composer/Installers/OxidInstaller.php | 59 + .../src/Composer/Installers/PPIInstaller.php | 9 + .../Composer/Installers/PhiftyInstaller.php | 11 + .../Composer/Installers/PhpBBInstaller.php | 11 + .../Composer/Installers/PimcoreInstaller.php | 21 + .../Composer/Installers/PiwikInstaller.php | 32 + .../Installers/PlentymarketsInstaller.php | 29 + .../src/Composer/Installers/Plugin.php | 27 + .../Composer/Installers/PortoInstaller.php | 9 + .../Installers/PrestashopInstaller.php | 10 + .../Installers/ProcessWireInstaller.php | 22 + .../Composer/Installers/PuppetInstaller.php | 11 + .../Composer/Installers/PxcmsInstaller.php | 63 + .../Composer/Installers/RadPHPInstaller.php | 24 + .../Composer/Installers/ReIndexInstaller.php | 10 + .../Composer/Installers/Redaxo5Installer.php | 10 + .../Composer/Installers/RedaxoInstaller.php | 10 + .../Installers/RoundcubeInstaller.php | 22 + .../src/Composer/Installers/SMFInstaller.php | 10 + .../Composer/Installers/ShopwareInstaller.php | 60 + .../Installers/SilverStripeInstaller.php | 35 + .../Installers/SiteDirectInstaller.php | 25 + .../Composer/Installers/StarbugInstaller.php | 12 + .../Composer/Installers/SyDESInstaller.php | 47 + .../Composer/Installers/SyliusInstaller.php | 9 + .../Composer/Installers/Symfony1Installer.php | 26 + .../Composer/Installers/TYPO3CmsInstaller.php | 16 + .../Installers/TYPO3FlowInstaller.php | 38 + .../src/Composer/Installers/TaoInstaller.php | 30 + .../Composer/Installers/TheliaInstaller.php | 12 + .../src/Composer/Installers/TuskInstaller.php | 14 + .../Installers/UserFrostingInstaller.php | 9 + .../Composer/Installers/VanillaInstaller.php | 10 + .../Composer/Installers/VgmcpInstaller.php | 49 + .../Composer/Installers/WHMCSInstaller.php | 21 + .../Composer/Installers/WolfCMSInstaller.php | 9 + .../Installers/WordPressInstaller.php | 12 + .../Composer/Installers/YawikInstaller.php | 32 + .../src/Composer/Installers/ZendInstaller.php | 11 + .../Composer/Installers/ZikulaInstaller.php | 10 + .../composer/installers/src/bootstrap.php | 13 + .../vendor/guzzlehttp/psr7/CHANGELOG.md | 270 ++++ .../vendor/guzzlehttp/psr7/LICENSE | 19 + .../vendor/guzzlehttp/psr7/README.md | 809 ++++++++++++ .../vendor/guzzlehttp/psr7/composer.json | 49 + .../guzzlehttp/psr7/src/AppendStream.php | 244 ++++ .../guzzlehttp/psr7/src/BufferStream.php | 140 ++ .../guzzlehttp/psr7/src/CachingStream.php | 139 ++ .../guzzlehttp/psr7/src/DroppingStream.php | 43 + .../vendor/guzzlehttp/psr7/src/FnStream.php | 160 +++ .../vendor/guzzlehttp/psr7/src/Header.php | 71 + .../guzzlehttp/psr7/src/InflateStream.php | 53 + .../guzzlehttp/psr7/src/LazyOpenStream.php | 40 + .../guzzlehttp/psr7/src/LimitStream.php | 156 +++ .../vendor/guzzlehttp/psr7/src/Message.php | 252 ++++ .../guzzlehttp/psr7/src/MessageTrait.php | 214 +++ .../vendor/guzzlehttp/psr7/src/MimeType.php | 140 ++ .../guzzlehttp/psr7/src/MultipartStream.php | 154 +++ .../guzzlehttp/psr7/src/NoSeekStream.php | 23 + .../vendor/guzzlehttp/psr7/src/PumpStream.php | 168 +++ .../vendor/guzzlehttp/psr7/src/Query.php | 108 ++ .../vendor/guzzlehttp/psr7/src/Request.php | 152 +++ .../vendor/guzzlehttp/psr7/src/Response.php | 155 +++ .../vendor/guzzlehttp/psr7/src/Rfc7230.php | 18 + .../guzzlehttp/psr7/src/ServerRequest.php | 378 ++++++ .../vendor/guzzlehttp/psr7/src/Stream.php | 270 ++++ .../psr7/src/StreamDecoratorTrait.php | 151 +++ .../guzzlehttp/psr7/src/StreamWrapper.php | 163 +++ .../guzzlehttp/psr7/src/UploadedFile.php | 325 +++++ .../vendor/guzzlehttp/psr7/src/Uri.php | 761 +++++++++++ .../guzzlehttp/psr7/src/UriNormalizer.php | 217 ++++ .../guzzlehttp/psr7/src/UriResolver.php | 220 ++++ .../vendor/guzzlehttp/psr7/src/Utils.php | 398 ++++++ .../vendor/guzzlehttp/psr7/src/functions.php | 417 ++++++ .../guzzlehttp/psr7/src/functions_include.php | 6 + .../vendor/intervention/image/LICENSE | 9 + .../vendor/intervention/image/composer.json | 47 + .../vendor/intervention/image/provides.json | 11 + .../src/Intervention/Image/AbstractColor.php | 229 ++++ .../Intervention/Image/AbstractDecoder.php | 359 ++++++ .../src/Intervention/Image/AbstractDriver.php | 136 ++ .../Intervention/Image/AbstractEncoder.php | 244 ++++ .../src/Intervention/Image/AbstractFont.php | 267 ++++ .../src/Intervention/Image/AbstractShape.php | 71 + .../Image/Commands/AbstractCommand.php | 81 ++ .../Intervention/Image/Commands/Argument.php | 225 ++++ .../Image/Commands/ChecksumCommand.php | 29 + .../Image/Commands/CircleCommand.php | 35 + .../Image/Commands/EllipseCommand.php | 36 + .../Image/Commands/ExifCommand.php | 51 + .../Image/Commands/IptcCommand.php | 66 + .../Image/Commands/LineCommand.php | 36 + .../Image/Commands/OrientateCommand.php | 48 + .../Image/Commands/PolygonCommand.php | 49 + .../Image/Commands/PsrResponseCommand.php | 45 + .../Image/Commands/RectangleCommand.php | 36 + .../Image/Commands/ResponseCommand.php | 26 + .../Image/Commands/StreamCommand.php | 25 + .../Image/Commands/TextCommand.php | 34 + .../src/Intervention/Image/Constraint.php | 92 ++ .../Image/Exception/ImageException.php | 8 + .../Exception/InvalidArgumentException.php | 8 + .../Exception/MissingDependencyException.php | 8 + .../Image/Exception/NotFoundException.php | 8 + .../Image/Exception/NotReadableException.php | 8 + .../Image/Exception/NotSupportedException.php | 8 + .../Image/Exception/NotWritableException.php | 8 + .../Image/Exception/RuntimeException.php | 8 + .../src/Intervention/Image/Facades/Image.php | 19 + .../image/src/Intervention/Image/File.php | 92 ++ .../Intervention/Image/Filters/DemoFilter.php | 44 + .../Image/Filters/FilterInterface.php | 16 + .../image/src/Intervention/Image/Gd/Color.php | 227 ++++ .../Image/Gd/Commands/BackupCommand.php | 25 + .../Image/Gd/Commands/BlurCommand.php | 25 + .../Image/Gd/Commands/BrightnessCommand.php | 21 + .../Image/Gd/Commands/ColorizeCommand.php | 29 + .../Image/Gd/Commands/ContrastCommand.php | 21 + .../Image/Gd/Commands/CropCommand.php | 40 + .../Image/Gd/Commands/DestroyCommand.php | 27 + .../Image/Gd/Commands/FillCommand.php | 69 + .../Image/Gd/Commands/FitCommand.php | 32 + .../Image/Gd/Commands/FlipCommand.php | 37 + .../Image/Gd/Commands/GammaCommand.php | 21 + .../Image/Gd/Commands/GetSizeCommand.php | 25 + .../Image/Gd/Commands/GreyscaleCommand.php | 19 + .../Image/Gd/Commands/HeightenCommand.php | 28 + .../Image/Gd/Commands/InsertCommand.php | 34 + .../Image/Gd/Commands/InterlaceCommand.php | 23 + .../Image/Gd/Commands/InvertCommand.php | 19 + .../Image/Gd/Commands/LimitColorsCommand.php | 53 + .../Image/Gd/Commands/MaskCommand.php | 83 ++ .../Image/Gd/Commands/OpacityCommand.php | 31 + .../Image/Gd/Commands/PickColorCommand.php | 37 + .../Image/Gd/Commands/PixelCommand.php | 25 + .../Image/Gd/Commands/PixelateCommand.php | 21 + .../Image/Gd/Commands/ResetCommand.php | 38 + .../Image/Gd/Commands/ResizeCanvasCommand.php | 83 ++ .../Image/Gd/Commands/ResizeCommand.php | 84 ++ .../Image/Gd/Commands/RotateCommand.php | 30 + .../Image/Gd/Commands/SharpenCommand.php | 34 + .../Image/Gd/Commands/TrimCommand.php | 176 +++ .../Image/Gd/Commands/WidenCommand.php | 28 + .../src/Intervention/Image/Gd/Decoder.php | 155 +++ .../src/Intervention/Image/Gd/Driver.php | 89 ++ .../src/Intervention/Image/Gd/Encoder.php | 124 ++ .../image/src/Intervention/Image/Gd/Font.php | 256 ++++ .../Image/Gd/Shapes/CircleShape.php | 40 + .../Image/Gd/Shapes/EllipseShape.php | 65 + .../Image/Gd/Shapes/LineShape.php | 90 ++ .../Image/Gd/Shapes/PolygonShape.php | 49 + .../Image/Gd/Shapes/RectangleShape.php | 76 ++ .../image/src/Intervention/Image/Image.php | 365 ++++++ .../src/Intervention/Image/ImageManager.php | 142 ++ .../Intervention/Image/ImageManagerStatic.php | 88 ++ .../Image/ImageServiceProvider.php | 87 ++ .../Image/ImageServiceProviderLaravel4.php | 112 ++ .../Image/ImageServiceProviderLaravel5.php | 89 ++ .../Image/ImageServiceProviderLeague.php | 42 + .../Image/ImageServiceProviderLumen.php | 34 + .../src/Intervention/Image/Imagick/Color.php | 279 ++++ .../Image/Imagick/Commands/BackupCommand.php | 25 + .../Image/Imagick/Commands/BlurCommand.php | 21 + .../Imagick/Commands/BrightnessCommand.php | 21 + .../Imagick/Commands/ColorizeCommand.php | 44 + .../Imagick/Commands/ContrastCommand.php | 21 + .../Image/Imagick/Commands/CropCommand.php | 45 + .../Image/Imagick/Commands/DestroyCommand.php | 27 + .../Image/Imagick/Commands/ExifCommand.php | 63 + .../Image/Imagick/Commands/FillCommand.php | 105 ++ .../Image/Imagick/Commands/FitCommand.php | 42 + .../Image/Imagick/Commands/FlipCommand.php | 27 + .../Image/Imagick/Commands/GammaCommand.php | 21 + .../Image/Imagick/Commands/GetSizeCommand.php | 28 + .../Imagick/Commands/GreyscaleCommand.php | 19 + .../Imagick/Commands/HeightenCommand.php | 28 + .../Image/Imagick/Commands/InsertCommand.php | 33 + .../Imagick/Commands/InterlaceCommand.php | 29 + .../Image/Imagick/Commands/InvertCommand.php | 19 + .../Imagick/Commands/LimitColorsCommand.php | 59 + .../Image/Imagick/Commands/MaskCommand.php | 60 + .../Image/Imagick/Commands/OpacityCommand.php | 23 + .../Imagick/Commands/PickColorCommand.php | 30 + .../Image/Imagick/Commands/PixelCommand.php | 31 + .../Imagick/Commands/PixelateCommand.php | 27 + .../Image/Imagick/Commands/ResetCommand.php | 40 + .../Imagick/Commands/ResizeCanvasCommand.php | 91 ++ .../Image/Imagick/Commands/ResizeCommand.php | 29 + .../Image/Imagick/Commands/RotateCommand.php | 30 + .../Image/Imagick/Commands/SharpenCommand.php | 21 + .../Image/Imagick/Commands/TrimCommand.php | 121 ++ .../Image/Imagick/Commands/WidenCommand.php | 28 + .../Intervention/Image/Imagick/Decoder.php | 124 ++ .../src/Intervention/Image/Imagick/Driver.php | 74 ++ .../Intervention/Image/Imagick/Encoder.php | 173 +++ .../src/Intervention/Image/Imagick/Font.php | 121 ++ .../Image/Imagick/Shapes/CircleShape.php | 40 + .../Image/Imagick/Shapes/EllipseShape.php | 66 + .../Image/Imagick/Shapes/LineShape.php | 94 ++ .../Image/Imagick/Shapes/PolygonShape.php | 81 ++ .../Image/Imagick/Shapes/RectangleShape.php | 84 ++ .../image/src/Intervention/Image/Point.php | 64 + .../image/src/Intervention/Image/Response.php | 78 ++ .../image/src/Intervention/Image/Size.php | 374 ++++++ .../intervention/image/src/config/config.php | 20 + .../vendor/psr/http-message/CHANGELOG.md | 36 + .../vendor/psr/http-message/LICENSE | 19 + .../vendor/psr/http-message/README.md | 13 + .../vendor/psr/http-message/composer.json | 26 + .../psr/http-message/src/MessageInterface.php | 187 +++ .../psr/http-message/src/RequestInterface.php | 129 ++ .../http-message/src/ResponseInterface.php | 68 + .../src/ServerRequestInterface.php | 261 ++++ .../psr/http-message/src/StreamInterface.php | 158 +++ .../src/UploadedFileInterface.php | 123 ++ .../psr/http-message/src/UriInterface.php | 323 +++++ .../vendor/ralouphie/getallheaders/LICENSE | 21 + .../vendor/ralouphie/getallheaders/README.md | 27 + .../ralouphie/getallheaders/composer.json | 26 + .../getallheaders/src/getallheaders.php | 46 + plugins/ahmadfatoni/apigenerator/Plugin.php | 18 + plugins/ahmadfatoni/apigenerator/Readme.md | 50 + .../controllers/ApiGeneratorController.php | 336 +++++ .../controllers/api/CategoriesController.php | 99 ++ .../controllers/api/postsController.php | 99 ++ .../apigenerator/controllers/api/readme.txt | 1 + .../apigeneratorcontroller/_list_toolbar.htm | 18 + .../_reorder_toolbar.htm | 3 + .../apigeneratorcontroller/config_form.yaml | 10 + .../apigeneratorcontroller/config_list.yaml | 11 + .../config_reorder.yaml | 4 + .../apigeneratorcontroller/create.htm | 97 ++ .../apigeneratorcontroller/index.htm | 1 + .../apigeneratorcontroller/preview.htm | 22 + .../apigeneratorcontroller/reorder.htm | 8 + .../apigeneratorcontroller/update.htm | 133 ++ .../apigenerator/helpers/Helpers.php | 19 + .../ahmadfatoni/apigenerator/lang/en/lang.php | 6 + .../apigenerator/models/ApiGenerator.php | 76 ++ .../models/apigenerator/columns.yaml | 9 + .../models/apigenerator/fields.yaml | 33 + plugins/ahmadfatoni/apigenerator/plugin.yaml | 17 + plugins/ahmadfatoni/apigenerator/routes.php | 10 + .../apigenerator/template/controller.dot | 99 ++ .../apigenerator/template/controller.php | 35 + .../template/customcontroller.dot | 83 ++ .../apigenerator/template/route.dot | 3 + .../apigenerator/template/routes.dot | 6 + ...e_create_ahmadfatoni_apigenerator_data.php | 26 + .../apigenerator/updates/version.yaml | 15 + plugins/vdlp/rssfetcher/components/Items.php | 2 + .../rssfetcher/models/source/columns.yaml | 2 + .../vdlp/rssfetcher/models/source/fields.yaml | 8 + plugins/vdlp/rssfetcher/updates/version.yaml | 23 +- .../content/static-pages-en/contact.htm | 13 +- .../modern/content/static-pages/contact.htm | 2 + themes/modern/meta/menus/top-menu.yaml | 9 +- themes/modern/pages/post.htm | 2 +- themes/modern/partials/header.htm | 8 +- .../modern/partials/index/category_posts.htm | 2 +- themes/modern/partials/index/top_section.htm | 2 +- themes/modern/partials/slider.htm | 4 +- 358 files changed, 25572 insertions(+), 25 deletions(-) create mode 100644 plugins/abwebdevelopers/imageresize/LICENCE.md create mode 100644 plugins/abwebdevelopers/imageresize/Plugin.php create mode 100644 plugins/abwebdevelopers/imageresize/README.md create mode 100644 plugins/abwebdevelopers/imageresize/assets/image-not-found.png create mode 100644 plugins/abwebdevelopers/imageresize/assets/image-not-found.psd create mode 100644 plugins/abwebdevelopers/imageresize/assets/settings-patch.css create mode 100644 plugins/abwebdevelopers/imageresize/classes/Resizer.php create mode 100644 plugins/abwebdevelopers/imageresize/commands/ImageResizeClear.php create mode 100644 plugins/abwebdevelopers/imageresize/commands/ImageResizeGc.php create mode 100644 plugins/abwebdevelopers/imageresize/commands/ImageResizeResetPermalinks.php create mode 100644 plugins/abwebdevelopers/imageresize/lang/en/lang.php create mode 100644 plugins/abwebdevelopers/imageresize/lang/fi/lang.php create mode 100644 plugins/abwebdevelopers/imageresize/lang/ru/lang.php create mode 100644 plugins/abwebdevelopers/imageresize/models/ImagePermalink.php create mode 100644 plugins/abwebdevelopers/imageresize/models/Settings.php create mode 100644 plugins/abwebdevelopers/imageresize/models/settings/fields.yaml create mode 100644 plugins/abwebdevelopers/imageresize/reportwidgets/ImageResizeClearWidget.php create mode 100644 plugins/abwebdevelopers/imageresize/reportwidgets/imageresizeclearwidget/partials/_default.htm create mode 100644 plugins/abwebdevelopers/imageresize/routes.php create mode 100644 plugins/abwebdevelopers/imageresize/traits/HasPermalinkIdentifiers.php create mode 100644 plugins/abwebdevelopers/imageresize/updates/clear_old_cache_dir.php create mode 100644 plugins/abwebdevelopers/imageresize/updates/create_permalinks_table.php create mode 100644 plugins/abwebdevelopers/imageresize/updates/seed_filters.php create mode 100644 plugins/abwebdevelopers/imageresize/updates/version.yaml create mode 100644 plugins/abwebdevelopers/imageresize/vendor/autoload.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/ClassLoader.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/LICENSE create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/autoload_classmap.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/autoload_files.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/autoload_namespaces.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/autoload_psr4.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/autoload_real.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/autoload_static.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installed.json create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/LICENSE create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/composer.json create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/phpstan.neon.dist create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AglInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ChefInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/GravInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Installer.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ItopInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MakoInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Plugin.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PortoInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/bootstrap.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/CHANGELOG.md create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/LICENSE create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/README.md create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/composer.json create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/AppendStream.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/BufferStream.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/CachingStream.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/DroppingStream.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/FnStream.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Header.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/InflateStream.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/LazyOpenStream.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/LimitStream.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Message.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/MessageTrait.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/MimeType.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/MultipartStream.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/NoSeekStream.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/PumpStream.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Query.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Request.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Response.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Rfc7230.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/ServerRequest.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Stream.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/StreamWrapper.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/UploadedFile.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Uri.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/UriNormalizer.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/UriResolver.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Utils.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/functions.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/functions_include.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/LICENSE create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/composer.json create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/provides.json create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractColor.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractDriver.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractEncoder.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractFont.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractShape.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/AbstractCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/Argument.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/ChecksumCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/CircleCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/EllipseCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/ExifCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/IptcCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/LineCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/OrientateCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/PolygonCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/PsrResponseCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/RectangleCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/ResponseCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/StreamCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/TextCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Constraint.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Exception/ImageException.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Exception/InvalidArgumentException.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Exception/MissingDependencyException.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Exception/NotFoundException.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Exception/NotReadableException.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Exception/NotSupportedException.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Exception/NotWritableException.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Exception/RuntimeException.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Facades/Image.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/File.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Filters/DemoFilter.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Filters/FilterInterface.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Color.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BackupCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BlurCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BrightnessCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ColorizeCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ContrastCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/CropCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/DestroyCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FillCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FitCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FlipCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GammaCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GetSizeCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GreyscaleCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/HeightenCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InsertCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InterlaceCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InvertCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/LimitColorsCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/MaskCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/OpacityCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PickColorCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelateCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResetCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResizeCanvasCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResizeCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/RotateCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/SharpenCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/TrimCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/WidenCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Driver.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Encoder.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Font.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/CircleShape.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/EllipseShape.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/LineShape.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/PolygonShape.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/RectangleShape.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Image.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageManager.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageManagerStatic.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProvider.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel4.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel5.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLeague.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLumen.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Color.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BackupCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BlurCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BrightnessCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ColorizeCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ContrastCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/CropCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/DestroyCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ExifCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FillCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FitCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FlipCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GammaCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GetSizeCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GreyscaleCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/HeightenCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InsertCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InterlaceCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InvertCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/LimitColorsCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/MaskCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/OpacityCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PickColorCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PixelCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PixelateCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResetCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResizeCanvasCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResizeCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/RotateCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/SharpenCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/TrimCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/WidenCommand.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Decoder.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Driver.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Encoder.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Font.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/CircleShape.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/EllipseShape.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/LineShape.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/PolygonShape.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/RectangleShape.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Point.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Response.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Size.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/config/config.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/psr/http-message/CHANGELOG.md create mode 100644 plugins/abwebdevelopers/imageresize/vendor/psr/http-message/LICENSE create mode 100644 plugins/abwebdevelopers/imageresize/vendor/psr/http-message/README.md create mode 100644 plugins/abwebdevelopers/imageresize/vendor/psr/http-message/composer.json create mode 100644 plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/MessageInterface.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/RequestInterface.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/ResponseInterface.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/ServerRequestInterface.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/StreamInterface.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/UploadedFileInterface.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/UriInterface.php create mode 100644 plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/LICENSE create mode 100644 plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/README.md create mode 100644 plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/composer.json create mode 100644 plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/src/getallheaders.php create mode 100644 plugins/ahmadfatoni/apigenerator/Plugin.php create mode 100644 plugins/ahmadfatoni/apigenerator/Readme.md create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/ApiGeneratorController.php create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/api/CategoriesController.php create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/api/readme.txt create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/_list_toolbar.htm create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/_reorder_toolbar.htm create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/config_form.yaml create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/config_list.yaml create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/config_reorder.yaml create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/create.htm create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/index.htm create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/preview.htm create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/reorder.htm create mode 100644 plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/update.htm create mode 100644 plugins/ahmadfatoni/apigenerator/helpers/Helpers.php create mode 100644 plugins/ahmadfatoni/apigenerator/lang/en/lang.php create mode 100644 plugins/ahmadfatoni/apigenerator/models/ApiGenerator.php create mode 100644 plugins/ahmadfatoni/apigenerator/models/apigenerator/columns.yaml create mode 100644 plugins/ahmadfatoni/apigenerator/models/apigenerator/fields.yaml create mode 100644 plugins/ahmadfatoni/apigenerator/plugin.yaml create mode 100644 plugins/ahmadfatoni/apigenerator/routes.php create mode 100644 plugins/ahmadfatoni/apigenerator/template/controller.dot create mode 100644 plugins/ahmadfatoni/apigenerator/template/controller.php create mode 100644 plugins/ahmadfatoni/apigenerator/template/customcontroller.dot create mode 100644 plugins/ahmadfatoni/apigenerator/template/route.dot create mode 100644 plugins/ahmadfatoni/apigenerator/template/routes.dot create mode 100644 plugins/ahmadfatoni/apigenerator/updates/builder_table_create_ahmadfatoni_apigenerator_data.php create mode 100644 plugins/ahmadfatoni/apigenerator/updates/version.yaml diff --git a/.htaccess b/.htaccess index addd1a9f0..5a0c61cdc 100644 --- a/.htaccess +++ b/.htaccess @@ -1,3 +1,33 @@ +## START OFFLINE.ResponsiveImages - webp-rewrite +# DO NOT REMOVE THESE LINES + + # Vary: Accept for all the requests to jpeg and png + SetEnvIf Request_URI "\.(jpe?g|png)$" REQUEST_image + + + RewriteEngine On + + # If the Browser supports WebP images, and the .webp file exists, use it. + RewriteCond %{HTTP_ACCEPT} image/webp + RewriteCond %{REQUEST_URI} ^/?storage/.*\.(jpe?g|png) + RewriteCond %{REQUEST_FILENAME}.webp -f + RewriteRule ^/?(.*)$ $1.webp [NC,T=image/webp,END] + + # If the Browser supports WebP images, and the .webp file does not exist, generate it. + RewriteCond %{HTTP_ACCEPT} image/webp + RewriteCond %{REQUEST_URI} ^/?storage/.*\.(jpe?g|png) + RewriteCond %{REQUEST_FILENAME}\.webp !-f + RewriteRule ^/?(.*)$ plugins/offline/responsiveimages/webp.php?path=$1 [NC,END] + + + Header append Vary Accept env=REQUEST_image + + + AddType image/webp .webp + + +## END OFFLINE.ResponsiveImages - webp-rewrite + diff --git a/plugins/abwebdevelopers/imageresize/LICENCE.md b/plugins/abwebdevelopers/imageresize/LICENCE.md new file mode 100644 index 000000000..d39912d18 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/LICENCE.md @@ -0,0 +1,19 @@ +# MIT licence + +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. diff --git a/plugins/abwebdevelopers/imageresize/Plugin.php b/plugins/abwebdevelopers/imageresize/Plugin.php new file mode 100644 index 000000000..a22c8d36d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/Plugin.php @@ -0,0 +1,215 @@ + 'abwebdevelopers.imageresize::lang.plugin.name', + 'description' => 'abwebdevelopers.imageresize::lang.plugin.description', + 'author' => 'AB Web Developers', + 'icon' => 'icon-file-image-o', + 'homepage' => 'https://abweb.com.au' + ]; + } + + /** + * @inheritDoc + */ + public function registerMarkupTags() + { + return [ + 'filters' => [ + 'resize' => function ($image, $width, $height = null, $options = []) { + $resizer = new Resizer(); + + $width = ($width !== null) ? (int) $width : null; + $height = ($height !== null) ? (int) $height : null; + $options = ($options instanceof Arrayable) ? $options->toArray() : (array) $options; + + // If the given configuration has a permalink identifier then resize using it + if (isset($options['permalink']) && strlen($options['permalink'])) { + $resizer->preventDefaultImage(); + $resizer->setImage((string) $image); + + return $resizer->resizePermalink($options['permalink'], $width, $height, $options)->permalink_url; + } + + $resizer->setImage((string) $image); + + return $resizer->resize($width, $height, $options); + }, + 'modify' => function ($image, $options = []) { + $resizer = new Resizer(); + + $width = null; + $height = null; + $options = ($options instanceof Arrayable) ? $options->toArray() : (array) $options; + + // If the given configuration has a permalink identifier then resize using it + if (isset($options['permalink']) && strlen($options['permalink'])) { + $resizer->preventDefaultImage(); + $resizer->setImage((string) $image); + + return $resizer->resizePermalink($options['permalink'], $width, $height, $options)->permalink_url; + } + + $resizer->setImage((string) $image); + + return $resizer->resize($width, $height, $options); + }, + 'filterHtmlImageResize' => function ($html, $width, $height = null, $options = []) { + $html = (string) $html; + $width = ($width !== null) ? (int) $width : null; + $height = ($height !== null) ? (int) $height : null; + $options = ($options instanceof Arrayable) ? $options->toArray() : (array) $options; + + return Resizer::parseFindReplaceImages($html, $width, $height, $options); + }, + 'filterHtmlImageModify' => function ($html, $options = []) { + $html = (string) $html; + $width = null; + $height = null; + $options = ($options instanceof Arrayable) ? $options->toArray() : (array) $options; + + return Resizer::parseFindReplaceImages($html, $width, $height, $options); + } + ] + ]; + } + + /** + * @inheritDoc + */ + public function registerSettings() + { + return [ + 'settings' => [ + 'label' => 'abwebdevelopers.imageresize::lang.plugin.name', + 'description' => 'Manage default settings for the Image Resizer plugin', + 'category' => 'Content', + 'icon' => 'icon-image', + 'class' => 'ABWebDevelopers\ImageResize\Models\Settings', + 'permissions' => ['abwebdevelopers.imageresize.access_settings'], + 'order' => 500, + 'keywords' => 'image resize resizing modify photo modifier' + ] + ]; + } + + /** + * @inheritDoc + */ + public function registerPermissions() + { + return [ + 'abwebdevelopers.imageresize.access_settings' => ['tab' => 'abwebdevelopers.imageresize::lang.permissions.tab', 'label' => 'abwebdevelopers.imageresize::lang.permissions.access_settings'], + ]; + } + + /** + * @inheritDoc + */ + public function boot() + { + Event::listen('backend.page.beforeDisplay', function ($controller, $action, $params) { + if ($controller instanceof \System\Controllers\Settings) { + // Check this is the settings page for this plugin: + if ($params === ['abwebdevelopers', 'imageresize', 'settings']) { + // Add CSS (minor patch) + $controller->addCss('/plugins/abwebdevelopers/imageresize/assets/settings-patch.css'); + } + } + }); + + Event::listen('cache:cleared', function () { + $this->ifDatabaseExists(function () { + if (Settings::cleanupOnCacheClear()) { + if (App::runningInConsole()) { + $output = new ConsoleOutput(); + $output->writeln('Imagesizer: Deleting cached resized images...'); + } + + Artisan::call('imageresize:clear'); + + if (App::runningInConsole()) { + $output->writeln('Imagesizer: ' . Artisan::output() . ''); + } + } + }); + }); + } + + /** + * @inheritDoc + */ + public function register() + { + $this->registerConsoleCommand('imageresize:gc', ImageResizeGc::class); + $this->registerConsoleCommand('imageresize:clear', ImageResizeClear::class); + $this->registerConsoleCommand('imageresize:reset-permalink', ImageResizeResetPermalinks::class); + } + + /** + * @inheritDoc + */ + public function registerSchedule($schedule) + { + // This is throttled by your settings, it won't necessarily clear all images every 5 minutes + $schedule->command('imageresize:gc')->everyFiveMinutes(); + } + + /** + * @inheritDoc + */ + public function registerReportWidgets() + { + return [ + ImageResizeClearWidget::class => [ + 'label' => 'Clear Image Resizer Cache', + 'context' => 'dashboard', + ], + ]; + } + + /** + * Run the callback only if/when the database exists (and system_settings table exists). + * + * @param \Closure $callback + * @return mixed + */ + public function ifDatabaseExists(\Closure $callback) + { + $canConnectToDatabase = false; + try { + // Test database connection (throw exception if no DB is configured yet) + $canConnectToDatabase = DB::table('system_settings')->exists(); + } catch (QueryException $e) { + } + + if ($canConnectToDatabase) { + return $callback(); + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/README.md b/plugins/abwebdevelopers/imageresize/README.md new file mode 100644 index 000000000..1b09ab669 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/README.md @@ -0,0 +1,181 @@ +# October CMS Image Resize Plugin + +Resize and transform images on the fly in Twig and October CMS. + +## Requirements + +- October CMS +- PHP 7.0 or above +- PHP `fileinfo` extension +- PHP `gd` extension **or** `imagick` extension + +Please note that GD is bound by PHP's memory limits, whereas Imagick isn't. If your site returns 503 when resizing images, try Imagick (can be changed via Settings). + + +## Getting started + +- [Installation](#installation) +- [October CMS usage](#october-cms-usage) + +### Installation + +You can install this plugin in a number of ways: + +#### Via Composer + +Run the following commands in your October CMS project folder to install the plugin. + +```bash +composer require abwebdevelopers/oc-imageresize-plugin +php artisan october:up +``` + +#### Via Updates & Plugins screen + +In the October CMS backend, you can navigate to *Settings > Updates & Plugins* and then click the +*Install Plugins* button to install a plugin to your October CMS install. Add +`ABWebDevelopers.ImageResize` to the search box to be able to select this plugin and install it. + +#### Via command-line + +Run the following command in your October CMS project folder to install the plugin. + +```bash +php artisan plugin:install ABWebDevelopers.ImageResize +``` + +### October CMS usage + +This plugin utilises [Intervention Image](https://github.com/Intervention/image)'s magical powers to resize and transform your images with ease. Please note that this plugin does not cover every feature of the Intervention Image library. + +#### Basic Resizing + +**Twig Filter:** `| resize(int $width, int $height, array $options)` + +Basic resizing in Twig is done using the `| resize` filter. Resizing requires at least one of the two dimension arguments. + +```html +Resize to width 1000px and height 700px: + + +Resize to width 1000px and automatically calculate height: + + +Resize to height 700px and automatically calculate width: + +``` + +A third argument is available, `options`, which allows you specify the resizing mode, along with any other image modifications which are detailed below. + +#### Resizing Modes + +Resizing modes are almost synonymous to CSS3 `background-size` modes to make it easier to remember. Available options are: `auto` (default), `cover` and `contain`, each doing the same as their CSS equivalent, with one additional mode: `stretch` which behaves how a basic `` element would: + +```html +Default (image is displayed in its original size): + + +Resize the background image to make sure the image is fully visible + + +Resize the background image to cover the entire container, even if it has to cut a little bit off one of the edges + + +Stretch and morph it to fit exatly in the defined dimensions + +``` + +When using `mode: cover` (alias `mode: crop`) you may specify the `fit_position` modifier to choose where the center of the resize should be focused. + +**Further Modifications** + +A few image adjustment tools and filters have been implemented into this plugin, which utilise their Intervention Image library counterparts. + +Usage of the modifiers is simple, either add them in a `key: value` fashion in the 3rd argument of the resize filter, or by using the modify filter, as such: + +```html + + +``` + +| Modifier Name | Code | Rules | Examples | Details | +| ------------- | ---------- | ---------------------- | ------------------------ | ------- | +| Format | format | in:jpg,png,webp,bmp,gif,ico,auto | `jpg`, `png`, `auto`, ... | Change the format of the image. +| Blur | blur | min:0 max:100 | `0`, `50`, `100` | Blurs the image +| Sharpen | sharpen | min:0 max:100 | `0`, `50`, `100` | Sharpens the image +| Brightness | brightness | min:-100 max:100 | `-100`, `50`, `100` | Brightens (or darkens) the image +| Contrast | contrast | min:-100 max:100 | `-100`, `50`, `100` | Increases/decreases the contrast of the image +| Pixelate | pixelate | min:1 max:1000 | `1`, `500`, `1000` | Pixelates the image +| Greyscale | greyscale/grayscale | accepted | `true`, `1` | See [accepted](https://octobercms.com/docs/services/validation#rule-accepted) rule. Sets the image mode to greyscale. Both codes are accepted (one just maps to the other) | +| Invert | invert | accepted | `true`, `1` | See [accepted](https://octobercms.com/docs/services/validation#rule-accepted) rule. Inverts all image colors | +| Opacity | opacity | min:0 max:100 | `0`, `50`, `100` | Set the opacity of the image +| Rotate | rotate | min:0 max:360 | `45`, `90`, `360` | Rotate the image (width / height does not constrain the rotated image, the image is resized prior to modifications) +| Flip | flip | 'h' or 'v' | `h`, `v` | Flip horizontally (h) or vertically (v) | +| Background | fill/background | Hex color | `#fff`, `#123456`, `000` | Set a background color - Hex color (with or without hashtag). Both codes are accepted (one just maps to the other) | +| Colorize | colourise/colorize | string (format: r,g,b) | `255,0,0`, `0,50,25` | Colorize the image. String containing 3 numbers (0-255), comma separated. Both codes are accepted (one just maps to the other) | + +A couple examples from the above: +```html + + + + + +``` + +**Please Note:** In order to encode images to WebP format, you will need to enable WebP support on your chosen driver (Imagick or GD). It's likely that by default you will not have WebP support, so using this format may result in errors or broken images. + + +### Filters (templates for configuration) + +Filters in the Image Resize plugin, while following a similar concept to filters in Intervention Image, are handled differently in this plugin. + +Filters are specified in the *Settings > Image Resizer* page. By clicking the *Filters* tab at the top, you can specify a filter "code" which can apply a set of enhancements and modifications to an image. Once saved, you can then use the `filter` option in the `resize` and `modify` Twig filters to specify the filter to use. + + A common example would be a basic thumbnail - you want this to always be `format: jpg`, `mode: cover`, `quality: 60`, `max_width: 200`, `max_height: 200` and maybe `background: #fff`. + +With filters, you can specify the above, call it something useful like `thumbnail`, then simply do the following: +```html + + +or + + +``` + +Which will use the predefined list of modifiers and have them overwritten by any that are supplied, for example: + +```html + +``` + +> There are a couple new modifiers for filters which include: `min_width`, `max_width`, `min_height`, `max_height` which all act as constraints for the dimensions of the images using filters. +> +>Should you use one, please note that if you use it with the `| resize(w, h)` function, your supplied dimensions will be ignored *if* they are out of bounds of the constraints. + + +**Using the library in PHP** + +Should you want to implement your own use of this library outside of Twig, you can use it in a very similar manner: + +```php +$resizer = new \ABWebDevelopers\ImageResize\Classes\Resizer($image); +$resizer->resize(800, 250, [ + 'rotate' => 45 +]); +// $resizer->render(); // only use this if you intend on aborting the script immediately at this point +``` + +Which is synonymous to: + +```html + +``` + +### Bugs and New Features + +We encourage you to open PRs and/or issues relating to any bugs or features so that everyone can benefit from them. + +### Special thanks to + +- [Intervention Image](https://github.com/Intervention/image) diff --git a/plugins/abwebdevelopers/imageresize/assets/image-not-found.png b/plugins/abwebdevelopers/imageresize/assets/image-not-found.png new file mode 100644 index 0000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S8~t5^9nyJZ%S(0<21A>0toJye4lC^NV{}Y_qnddAxBxra zA#MGS*ZD&eUDyg2Jy?QmvzlSUjY<59YuL<5);Ba4g{XD3b)&J?S#?W#$U^wG&9-rKis!K{2Kk=-BU6Q*1jQ=9uSZ4qqF6&GAl>vq~7Ty^P$Lq|; z3&qGGFFT(*Oc*0LJV#->lz}t~vw<4jzyWi8#Q_~crb9g=pxnrT6KY^ShErK*uxS#- zIbcf3xX?o0I8Wz_h0A!?_;@x2aFEjN#{rm{B?d~!;qs@!u=76m`z96YV7GkU%e`RD zwdB5KKJqbKX*r=UBI7ZFJZliQq?rfda|F(iXaRmommSgy-5^lh7_iEK8X0T{sWV(O`qXVuYc9gwHoxZW8lJs*hTU+8sTA+>ZSO@tAa_~!gRxyzrfB8E^8bw zrHY_eR13CA6Y-N`L`jZ}f6OkHxW}x~`5G3%cdil|Y^{+FU{T58GW3FKLB%O^SGbH1 zIQjB$LzD)h-OK)mzIT@*=e{Y(!pFX9C)5X8j^&vnLtdu*J4zWFm8%_)p@YL^A(GIq zH%rjC=fE$^kNFMQP$II>w64N@)lsORmQxvbJ31Ah$oJ0iF@A$&TGK)`_>KcU%+YW; zb^t8hGNnZNbi2u-b_J(h6NLD5Ei5k_v9a+EIjM5wIw zkT@N#=2;Y2hAJ=kaRwMYr_i4@*u6PkCZuPHDVR{Bc=*ugje^}oDrxOkDE6wN86;X_}viy>yFjcrg-Oq z@a@PAX6v`jTT{XLQ01TS)Wj2(pDceEPf+-r4p;Ox>+=setImage($image, $doNotModifyPath); + } + + /** + * Instantiate an instance using an image path + * + * @param string|null $image + * @return Resizer + */ + public static function using(string $image = null): Resizer + { + $that = new static($image, true); + + return $that; + } + + /** + * Set the format cache + * + * @param array $cache + * @return $this + */ + public function setFormatCache(array $cache) + { + $this->formatCache = $cache; + + return $this; + } + + /** + * Specify the image to use + * + * @param string $image + * @return $this + */ + public function setImage(string $image = null, bool $doNotModifyPath = false) + { + if ($doNotModifyPath) { + $this->image = $image; + + return $this; + } + + if ($image !== null) { + $absolutePath = false; + + // Support JSON objects containing path property, e.g: {"path":"USETHISPATH",...} + if (substr($image, 0, 2) === '{"') { + $attempt = json_decode($image); + + if (!empty($attempt->path)) { + $image = $attempt->path; + } + } + + // Get the domain + $domain = $_SERVER['SERVER_NAME'] ?? ''; + if (empty($domain)) { + $domain = parse_url(url()->to('/'), PHP_URL_HOST); + } + + // Check if the image is an absolute url to the same server, if so get the storage path of the image + $regex = '/^(?:https?:\/\/)?' . $domain . '(?::\d+)?\/(.+)$/'; + if (preg_match($regex, $image, $m)) { + // Convert spaces, not going to urldecode as it will mess with pluses + $image = base_path(str_replace('%20', ' ', $m[1])); + $absolutePath = true; + } + + // If not an absolute path, set it to an absolute path + if (!$absolutePath) { + $image = base_path(trim($image, '/')); + } + } + + // Set the image + $this->image = $image; + + return $this; + } + + /** + * Get the path to the image (or default if necessary) + * + * @return string + */ + public function getImagePath(): string + { + $image = $this->image; + + if ($this->allowDefaultImage) { + // If the image is invalid, default to Image Not Found + if ($image === null || $image === '' || !file_exists($image)) { + $image = $this->getDefaultImage(); + } + } + + return $image; + } + + /** + * Get the path to the image (relative path preferred) + */ + public function getImagePathRelativePreferred(): string + { + $image = $this->getImagePath(); + $base = rtrim(base_path(), '/'); + + if (Str::startsWith($image, $base)) { + $image = ltrim(substr($image, strlen($base)), '/'); + } + + return $image; + } + + /** + * Retrieve the Image Not Found image + * + * @return string + */ + protected function getDefaultImage(): string + { + // Retrieve the Image Not Found image from settings + $image = Settings::get('image_not_found'); + + // If available, apply it + if (!empty($image)) { + $image = base_path(ltrim(config('cms.storage.media.path'), '/')) . $image; + } + + // If the image still doesn't exist, use the provided Image Not Found image + if (!$image || !file_exists($image)) { + $image = Settings::getDefaultImageNotFound(true); + } + + // Use the default Image Not Found background + $this->options['background'] = Settings::get('image_not_found_background', '#fff'); + + // If the 404 image should be transparent then remove the default background + if (Settings::get('image_not_found_transparent')) { + unset($this->options['background']); + } + + // If the 404 image format is not auto then apply this format + $format = Settings::get('image_not_found_format', 'auto'); + if ($format !== 'auto') { + $this->options['format'] = $format; + } + + // Apply 404 image mode and quality + $this->options['mode'] = Settings::get('image_not_found_mode', 'cover'); + $this->options['quality'] = Settings::get('image_not_found_quality', 65); + + return $image; + } + + /** + * Set some options for the image resizer + * + * @param array $options + * @return $this + */ + public function setOptions(array $options) + { + foreach ($options as $key => $value) { + $this->options[$key] = $value; + } + + return $this; + } + + /** + * Set the hash for this file + * + * @param string $hash + * @return $this + */ + public function setHash(string $hash) + { + $this->hash = $hash; + + return $this; + } + + /** + * Initialise the resource - Creates the original and (to be) modified image resource entities + * + * @return $this + */ + public function initResource() + { + if (empty($this->im)) { + Image::configure([ + 'driver' => $this->options['driver'] ?? 'gd' + ]); + + try { + // Default the image if it's a directory + if (is_dir($this->image)) { + throw new \Exception('Image file does not exist (is directory)'); + } + + // Default the image if it doesn't exist + if (is_dir($this->image)) { + throw new \Exception('Image file does not exist (not found)'); + } + + $this->im = $this->original = Image::make($this->image); + } catch (\Exception $e) { + if ($this->allowDefaultImage) { + $this->setFormatCache([]); + $this->im = $this->original = Image::make($this->image = $this->getDefaultImage()); + } + } + } + + return $this; + } + + /** + * Initialise the options - Maps options and uses default options as a base as well as + * setting the hash to be used for caching + * + * @param array $options + * @return $this + */ + private function initOptions(array $options = null) + { + if ($options !== null) { + // Allow options with key $k, in place of key $v + $map = [ + 'fill' => 'background', + 'grayscale' => 'greyscale', + 'colourise' => 'colorize' + ]; + + // Change them over + foreach ($map as $k => $v) { + if (isset($this->options[$k])) { + $options[$v] = $this->options[$k]; + unset($options[$k]); + } + } + + // A couple predefined presets (deprecated, use filters now) + if (!empty($options['preset'])) { + switch ($options['preset']) { + case 'low': + $options['format'] = 'jpg'; + $options['quality'] = 50; + break; + case 'medium': + $options['format'] = 'jpg'; + $options['quality'] = 80; + break; + case 'high': + if (!empty($options['format'])) { + unset($options['format']); + } + $options['quality'] = 100; + break; + } + } + + // Check to see if a filter is being used for this image + if (!empty($options['filter'])) { + // If options were passed then use them to override any filters used + $options = array_filter((array) $options); + $this->override = array_merge($this->override, $options); + + // Now find it + $availableFilters = Settings::get('filters'); + foreach ($availableFilters as $filter) { + if ($filter['code'] === $options['filter']) { + // Found it, now apply the rules to the options + foreach ($filter['rules'] as $rule) { + $options[$rule['modifier']] = $rule['value']; + } + break; + } + } + } + + // Apply overrides + if (!empty($this->override)) { + foreach ($this->override as $key => $value) { + $options[$key] = $value; + } + } + } else { + $options = []; + } + + // Get defaults from settings + $defaults = [ + 'driver' => Settings::get('driver'), + 'mode' => Settings::get('mode'), + 'quality' => Settings::get('quality'), + 'format' => Settings::get('format'), + ]; + + // Don't cache defaults + $this->cacheableOptions = $options; + + // Merge defaults and options + $this->options = array_merge($defaults, $options); + + // Set hash based on image and options + $this->hash = hash('sha256', $this->image . json_encode($this->options)); + + return $this; + } + + /** + * Get the options defined in this resizer + * + * @return array + */ + public function getOptions(): array + { + return $this->options; + } + + /** + * Get the options defined in this resizer, excluding defaults + * + * @return array + */ + public function getCacheableOptions(): array + { + return $this->cacheableOptions; + } + + /** + * Get the absolute physical path of the image + * + * @return string + */ + public function getAbsolutePath(): string + { + return base_path($this->getRelativePath()); + } + + /** + * Get the expected output extension + * + * @return string + */ + public function outputExtension(): string + { + return $this->detectFormat(true)[1]; + } + + /** + * Get the path relative to the base directory + * + * @return string + */ + public function getRelativePath(): string + { + $rel = '/' . substr($this->hash, 0, 3) . + '/' . substr($this->hash, 3, 3) . + '/' . substr($this->hash, 6, 3) . + '/' . $this->hash . + '.' . $this->outputExtension(); + + return Settings::getBasePath($rel); + } + + /** + * Get the URL for resizing this image for the first time. + * + * @return string + */ + public function getFirstTimeUrl(): string + { + $url = '/imageresize/' . $this->hash . '.' . $this->outputExtension(); + $url = url($url); + + return $url; + } + + /** + * Get the URL of the resized (and cached) image. + * + * Simply returns a relative URL to the website. + * + * @return string + */ + public function getCacheUrl(): string + { + $url = '/' . $this->getRelativePath(); + $url = url($url); + + return $url; + } + + /** + * Store the configuration in the cache, and retrieve the URL + * + * @return bool|string + */ + public function storeCacheAndgetFirstTimeUrl() + { + Cache::remember(static::CACHE_PREFIX . $this->hash, Carbon::now()->addWeek(), function () { + return [ + 'image' => $this->image, + 'options' => $this->options, + 'formatCache' => $this->formatCache, + ]; + }); + + $cacheExists = $this->hasStoredFile(); + + return ($cacheExists) ? $this->getCacheUrl() : $this->getFirstTimeUrl(); + } + + /** + * Set the cache, storing the modified image to file and return the public facing path to it + * + * @return $this + */ + public function storeResizedImage() + { + // Get absolute path + $path = $this->getAbsolutePath(); + + // Create directory if not exists + $base = dirname($path); + if (!file_exists($base)) { + mkdir($base, 0775, true); + } + + // Save to file + $this->im->save($path, $this->options['quality'] ?? null); + + return $this; + } + + /** + * Resize - Optionally resize the image, and/or modify the image with options. + * + * Contrary to function name, this [as of v2.0] only returns a publicly accessible URL for the image. + * Resizing happens in the public endpoint. + * + * @param int $width + * @param int $height + * @param array $options + * @return string + */ + public function resize(int $width = null, int $height = null, array $options = null): string + { + $width = ($width > 0) ? $width : null; + $height = ($height > 0) ? $height : null; + + // Fill these keys in, as it'll be used to help identify the cache + $options['width'] = $width; + $options['height'] = $height; + + // Set options, set hash for cache + $this->initOptions($options); + + // Get cache if exists + return $this->storeCacheAndgetFirstTimeUrl(); + } + + /** + * Resize - Optionally resize the image, and/or modify the image with options. + * + * This implements a permalink class and does not resize until first accessed + * + * @param int $width + * @param int $height + * @param array $options + * @return ImagePermalink + */ + public function resizePermalink(string $identifier, int $width = null, int $height = null, array $options = []): ImagePermalink + { + $identifier = trim($identifier, '/'); + + $width = ($width > 0) ? $width : null; + $height = ($height > 0) ? $height : null; + + // Fill these keys in, as it'll be used to help identify the cache + $options['width'] = $width; + $options['height'] = $height; + + // Don't need to cache this + unset($options['permalink']); + + // Set options, set hash for cache + $this->initOptions($options); + + return ImagePermalink::fromResizer($identifier, $this); + } + + /** + * Does the current file exist in the filesystem? + * + * @return bool + */ + public function hasStoredFile(): bool + { + return file_exists($this->getAbsolutePath()); + } + + /** + * Should the image be cached? + * + * @return bool + */ + public function shouldCache(): bool + { + return !isset($this->options['cache']) || (bool) $this->options['cache']; + } + + /** + * Do the resizing (if applicable) + * + * @return $this + */ + public function doResize() + { + if ($this->shouldCache() && $this->hasStoredFile()) { + return $this; + } + + $width = $this->options['width'] ?? null; + $height = $this->options['height'] ?? null; + + $hasMinMaxConstraint = array_key_exists('min_height', $this->options) || + array_key_exists('max_height', $this->options) || + array_key_exists('min_width', $this->options) || + array_key_exists('max_width', $this->options); + + // Get the image resource entity if not already loaded + $this->initResource(); + + // If width or height is set, resize the image to it + if (($width !== null) || ($height !== null) || $hasMinMaxConstraint) { + $oheight = $this->original->height(); + $owidth = $this->original->width(); + $oratio = $owidth / $oheight; + + // Will the dimensions be the same? + $same = ($width === null || $height === null); + + if ($width === null && $height !== null) { + // Only the height was given + + if (!empty($this->options['min_height'])) { + $height = max($this->options['min_height'], $height); + } + + if (!empty($this->options['max_height'])) { + $height = min($this->options['max_height'], $height); + } + + $width = (int) ($height * $oratio); + } elseif ($height === null && $width !== null) { + // Only the width was given + + if (!empty($this->options['min_width'])) { + $width = max($this->options['min_width'], $width); + } + + if (!empty($this->options['max_width'])) { + $width = min($this->options['max_width'], $width); + } + + $height = (int) ($width / $oratio); + } else if ($width === null && $height === null) { // Neither were given + $height = $oheight; + $width = $owidth; + + if (!empty($this->options['min_width'])) { + $width = max($this->options['min_width'], $width); + } + + if (!empty($this->options['max_width'])) { + $width = min($this->options['max_width'], $width); + } + + if (!empty($this->options['min_height'])) { + $height = max($this->options['min_height'], $height); + } + + if (!empty($this->options['max_height'])) { + $height = min($this->options['max_height'], $height); + } + } else { // Both were given + if (!empty($this->options['min_width'])) { + $width = max($this->options['min_width'], $width); + } + + if (!empty($this->options['max_width'])) { + $width = min($this->options['max_width'], $width); + } + + if (!empty($this->options['min_height'])) { + $height = max($this->options['min_height'], $height); + } + + if (!empty($this->options['max_height'])) { + $height = min($this->options['max_height'], $height); + } + } + + // Determine the ratio, and whether or not its the same ratio thats being generated + $ratio = $width / $height; + $same = $same ?? ($ratio === $oratio); + + // What we'll resize the image to, before cropping (may differ from specified dimensions) + $resizeWidth = $width; + $resizeHeight = $height; + + // Use fit mode? + $fit = false; + // Get the position to fit to + $fitPosition = $this->options['fit_position'] ?? 'center'; + + // Allow upsizing of the image? (default: false) + $allowUpsizing = (!empty($this->options['upsize']) && (bool) $this->options['upsize']); + + // Should the canvas be resized to the dimensions specified? + $resizeCanvas = false; + + // Figure out what to do, crop, pad, etc + if (!empty($this->options['mode'])) { + switch ($this->options['mode']) { + case 'contain': + if ($same) { + break; // Nothing needs to be done + } elseif ($oratio > $ratio) { + // Was wider, is more thinner now, so calculate the height of the image ($height is now simply the canvas size) + $resizeHeight = $width / $oratio; + $resizeCanvas = true; + } else { + // Was taller, is more smaller now, so calculate the width of the image ($width is now simply the canvas size) + $resizeWidth = $height * $oratio; + $resizeCanvas = true; + } + break; + case 'cover': + case 'crop': + $fit = true; + break; + case 'auto': + $this->im->resizeCanvas($width, $height); + break; + case 'stretch': + // Use width and height, stretch to fit + break; + default: + // + break; + } + } + + // If using the fit mode, use fit + if ($fit) { + $this->im->fit($width, $height, function ($constraint) use ($allowUpsizing) { + if (!$allowUpsizing) { + $constraint->upsize(); // prevent upsizing + } + }, $fitPosition); + } else { + // Otherwise resize using traditional resize method + $this->im->resize($resizeWidth, $resizeHeight, function ($constraint) use ($allowUpsizing) { + if (!$allowUpsizing) { + $constraint->upsize(); // prevent upsizing + } + }); + } + + // Resize the canvas to the specified dimensions (contain: adds padding) + if ($resizeCanvas) { + $this->im->resizeCanvas($width, $height); + } + } + + // Get the format / mime to export to (either original, or overridden) + list($mime, $format) = $this->detectFormat(true); + + // If it's exporting to a flat image and no background is set, and it was transparent to start off with.. + if (($format !== 'png') && ($format !== 'webp') && empty($this->options['background']) && $this->detectAlpha()) { + // Then fill in the background - Would be nice to guess the color but that's not my job + $this->options['background'] = '#fff'; + } + + // Run the modifications on the image + $this->modify(); + + $this->storeResizedImage(); + + return $this; + } + + /** + * Prevent the Resizer from defaulting the image + * + * @return $this + */ + public function preventDefaultImage() + { + $this->allowDefaultImage = false; + + return $this; + } + + /** + * Prevent the Resizer from defaulting the image + * + * @return $this + */ + public function allowDefaultImage() + { + $this->allowDefaultImage = false; + + return $this; + } + + /** + * Detect format of input file for default export format + * + * Return value is: [mime, format] + * Example: ['image/jpeg', 'jpg'] + * + * @param array $options + * @return array + */ + public function detectFormat(bool $useNewFormat = false): array + { + // Convert standard boolean to numeric boolean (for array access) + $useNewFormat = ($useNewFormat) ? 1 : 0; + + // If it's already calculated these, then return the cached copy of it + if (!empty($this->formatCache[$useNewFormat])) { + return $this->formatCache[$useNewFormat]; + } + + // Determine whether or not to use the new format in + if ($useNewFormat && !empty($this->options['format']) && ($this->options['format'] !== 'auto')) { + $format = $this->options['format']; + } else { + if (File::exists($path = $this->getImagePath())) { + $format = File::mimeType($path); + $format = Str::after($format, '/'); + } else { + // If the file doesn't exist then inherit from the new format + $format = $this->options['format']; + // If the new format is automatic, then use the default 404 image format (otherwise jpg) + if ($format === 'auto') { + $format = Settings::get('image_not_found_format', 'auto'); + // And lastly, if you have nothing defined you can get a JPG + if ($format === 'auto') { + $format = 'jpg'; + } + } + } + } + + // For the most part, the mime is the format: image/{format} + $mime = $format; + + // Determine mime/fprmat from format + switch ($format) { + case 'jpeg': + case 'jpg': + $format = 'jpg'; + $mime = 'jpeg'; + break; + case 'png': + break; + case 'webp': + break; + case 'bmp': + break; + case 'gif': + break; + case 'ico': + break; + } + + // Cache and return + return $this->formatCache[$useNewFormat] = [$mime, $format]; + } + + /** + * Detect if the original image had an alpha channel - used for when flattening an alpha channel + * image (such as png) into a flat image (such as jpg) + * + * @return bool + */ + private function detectAlpha(): bool + { + // Get source file's format + list($mime, $format) = $this->detectFormat(); + + switch ($format) { + case 'png': + // Determine if png had alpha channel + return (ord(@file_get_contents($this->image, null, null, 25, 1)) === 6); + break; + default: + // otherwise false + return false; + } + } + + /** + * Modify the image with the options provided + * + * @return $this + */ + public function modify() + { + // Initialise the resouce if not already initialised + $this->initResource(); + + // available modifiers + $availableOptions = [ + 'blur' => [ + 'rules' => 'integer|min:0|max:100', + 'pass' => true + ], + 'sharpen' => [ + 'rules' => 'integer|min:0|max:100', + 'pass' => true + ], + 'brightness' => [ + 'rules' => 'integer|min:-100|max:100', + 'pass' => true + ], + 'contrast' => [ + 'rules' => 'integer|min:-100|max:100', + 'pass' => true + ], + 'pixelate' => [ + 'rules' => 'integer|min:1|max:1000', + 'pass' => true + ], + 'greyscale' => [ + 'rules' => 'accepted', + 'pass' => false + ], + 'invert' => [ + 'rules' => 'accepted', + 'pass' => false + ], + 'opacity' => [ + 'rules' => 'integer|min:0|max:100', + 'pass' => true + ], + 'rotate' => [ + 'rules' => 'integer|min:0|max:360', + 'pass' => true + ], + 'flip' => [ + 'rules' => 'in:v,h', + 'pass' => true + ], + 'background' => [ + 'rules' => 'regex:/^#([a-f0-9]{3}){1,2}$/', + 'pass' => false + ], + 'colorize' => [ + 'rules' => [ + 'regex:/^(?:-?(?:100|[0-9]{2})),(?:-?(?:100|[0-9]{2})),(?:-?(?:100|[0-9]{2}))$/' + ], + 'pass' => false + ], + 'insert' => [ + 'rules' => 'regex:/^(.+),(\d+),(\d+)$/', + 'pass' => false, + ] + ]; + + // Compile rules and data of those options that are modifiers + $data = []; + $rules = []; + foreach ($this->options as $key => $value) { + if (array_key_exists($key, $availableOptions)) { + $data[$key] = $value; + $rules[$key] = $availableOptions[$key]['rules']; + } + } + + // No modifiers? May as well skip the validation process then + if (empty($data)) { + return; + } + + // Get validator + $validator = Validator::make($data, $rules); + + // Validate the data + if (!$validator->passes()) { + // Errors were found in the options so throw an error with all errors compiled + $error = []; + foreach ($validator->messages()->toArray() as $field => $errors) { + $error[] = implode("\n", $errors); + } + + throw new Exception('Cannot process image: ' . implode("\n", $error)); + } + + // Passed validation, so begin modifying the image + foreach ($data as $key => $value) { + switch ($key) { + case 'background': + $this->im = Image::canvas($this->im->width(), $this->im->height(), $value)->insert($this->im); + break; + case 'colorize': + list($r, $g, $b) = explode(',', $value); + $this->im->colorize($r, $g, $b); + break; + case 'insert': + $exp = explode(',', $value); + $path = $exp[0]; + $position = (isset($exp[1])) ? $exp[1] : null; + $x = (isset($exp[2])) ? $exp[2] : null; + $y = (isset($exp[3])) ? $exp[3] : null; + $this->im->insert($path, $position, $x, $y); + break; + default: + // Pass argument if configured to do so: + if ($availableOptions[$key]['pass']) { + $this->im->{$key}($value); + } else { + $this->im->{$key}(); + } + break; + } + } + + return $this; + } + + /** + * Render the image (from the filesystem) in the desired output format, exiting immediately after. + * + * @return void + */ + public function render(): void + { + list($mime, $format) = $this->detectFormat(true); + + header('Content-Type: image/' . $mime); + echo file_get_contents($this->getAbsolutePath()); + exit(); + } + + /** + * Delete all cached images. + * + * @param Carbon|null $minAge Optional minimum age (delete before this date), `null` for all files. + * @param string|null $directory Optional directory to delete from + * @return int Number of files deleted + */ + public static function clearFiles(Carbon $minAge = null, string $directory = null): int + { + $directory = $directory ?? Settings::getBasePath(); + + // Skip if the directory doesn't exist + if (!is_dir($directory)) { + return 0; + } + + $files = collect(File::allFiles($directory)) + ->transform(function ($file) use ($minAge) { + $delete = true; + + // If a custom time was given, only delete if the file is older + if ($minAge !== null) { + $mtime = Carbon::createFromTimestamp($file->getMTime()); + $delete = $mtime->lte($minAge); + } + + return ($delete) ? $file->getRealPath() : null; + }) + ->filter() + ->toArray(); + + // Iterate each directory and delete it if it's empty + collect(File::directories($directory)) + ->each(function ($dir) { + $files = File::allFiles($dir); + + if (empty($files)) { + File::deleteDirectory($dir); + @unlink($dir); + } + }); + + // Fire event to hook into and modify $files before deleting + Event::fire('abweb.imageresize.clearFiles', [&$files, $minAge]); + + // Delete the files + File::delete($files); + + return count($files); + } + + /** + * Parse a given HTML string for images and replace them with the resized copies as per the given modifications. + * + * CAUTION: Experimental + * + * This uses regex to find and replace HTML content which is often frowned upon. You may supply your own custom + * regexes, or you may rely on the defaults (which may change in future versions of this plugin soo beware). + * + * By default this will search img elements with a src, data-src or lazy-src attribute, as well as any "style" + * attribute with a background or background-image CSS rule (of which contains a "url()" to an image) + * + * Example Usage (a richeditor field that contains custom embedded images that require OTF optimisation or resizing): + * {{ service.description | filterHtmlImageResize(600, 600, { mode: 'contain' }) }} + * {{ service.description | filterHtmlImageModifiy({ quality: 60 }) }} + * + * @param string $html The HTML to find/replace images + * @param int|null $width + * @param int|null $height + * @param array $options + * @param array $regexes List of regexes (keys) and callbacks (values) to use in the preg_replace_callback. + * @param int $limit See preg_replace_callback $limit docs + * @return string The same HTML but with images replaced with their resized URL equivalents + */ + public static function parseFindReplaceImages( + string $html, + int $width = null, + int $height = null, + array $options = [], + array $regexes = null, + int $limit = 255 + ): string { + $regexes = ($regexes !== null) ? $regexes : [ + '/(]*(?:src|data-src|lazy-src)=)"([^"]+)"/' => function ($match) use ($width, $height, $options) { + $resizer = new Resizer((string) $match[2]); + + $url = $resizer->resize($width, $height, $options); + + return $match[1] . '"' . $url . '"'; + }, + '/(style="([^"]*)background(-image)?:(\s*[^"]+)?url\(\'?)(.+?)(\'?\))"/' => function ($match) use ($width, $height, $options) { + $resizer = new Resizer((string) $match[2]); + + $url = $resizer->resize($width, $height, $options); + + return $match[1] . $url . $match[6]; + }, + ]; + + foreach ($regexes as $regex => $callback) { + $html = preg_replace_callback($regex, $callback, $html, $limit); + } + + return $html; + } +} diff --git a/plugins/abwebdevelopers/imageresize/commands/ImageResizeClear.php b/plugins/abwebdevelopers/imageresize/commands/ImageResizeClear.php new file mode 100644 index 000000000..7a275c1cc --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/commands/ImageResizeClear.php @@ -0,0 +1,21 @@ +info('Successfully deleted ' . $deleted . ' ' . Str::plural('file', $deleted)); + } +} diff --git a/plugins/abwebdevelopers/imageresize/commands/ImageResizeGc.php b/plugins/abwebdevelopers/imageresize/commands/ImageResizeGc.php new file mode 100644 index 000000000..46e92b681 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/commands/ImageResizeGc.php @@ -0,0 +1,25 @@ +modify('-' . Settings::getAgeToDelete()); + + $deleted = Resizer::clearFiles($minAge); + + $this->info('Successfully deleted ' . $deleted . ' ' . Str::plural('file', $deleted)); + } +} diff --git a/plugins/abwebdevelopers/imageresize/commands/ImageResizeResetPermalinks.php b/plugins/abwebdevelopers/imageresize/commands/ImageResizeResetPermalinks.php new file mode 100644 index 000000000..59a7b1917 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/commands/ImageResizeResetPermalinks.php @@ -0,0 +1,24 @@ +delete(); + + $this->info('Successfully deleted ' . $deleted . ' ' . Str::plural('permalink', $deleted)); + } +} diff --git a/plugins/abwebdevelopers/imageresize/lang/en/lang.php b/plugins/abwebdevelopers/imageresize/lang/en/lang.php new file mode 100644 index 000000000..b0a6ef3c0 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/lang/en/lang.php @@ -0,0 +1,160 @@ + [ + 'name' => 'Image Resizer', + 'description' => 'Adds filters for templates, allowing you to resize, crop, etc, images on the fly with caching', + ], + 'permissions' => [ + 'tab' => 'Image Resizer', + 'access_settings' => 'Access to image resizer settings', + ], + 'settings' => [ + 'tabs' => [ + 'main' => 'Main', + 'filters' => 'Filters', + 'cache' => 'Caching', + ], + 'sections' => [ + '_404' => [ + 'label' => 'Image Not Found', + 'comment' => 'Specify what to do when an image is not found' + ] + ], + 'fields' => [ + 'driver' => [ + 'label' => 'Image Driver for PHP', + 'comment' => 'Choose the image driver (only supports drivers supported by intervention\image library)', + 'options' => [ + 'gd' => 'GD Library', + 'imagick' => 'Imagick Extension' + ], + ], + 'mode' => [ + 'label' => 'Default resizing mode', + 'comment' => 'Choose the different mode to use when resizing to a specific size (CSS "background-size" options are supported, with an additional mode "stretch" which acts like an img element)', + 'options' => [ + 'auto' => 'Auto', + 'contain' => 'Contain', + 'cover' => 'Cover', + 'stretch' => 'Stretch', + ], + ], + 'quality' => [ + 'label' => 'Default Output Quality', + 'comment' => 'Default output quality for images (1-100)' + ], + 'image_not_found' => [ + 'label' => '404 Image Source', + 'comment' => 'Select a different image to be displayed when images are not found', + ], + 'image_not_found_background' => [ + 'label' => '404 Image Background Color', + 'comment' => 'Background color for the default 404 image', + ], + 'image_not_found_transparent' => [ + 'label' => '404 Image Transparent?', + 'comment' => 'Should the 404 image be transparent?', + ], + 'image_not_found_mode' => [ + 'label' => '404 Image Resize Mode', + 'comment' => 'Resizing mode for image above', + ], + 'image_not_found_format' => [ + 'label' => '404 Image Format', + 'comment' => 'Output format for image above', + ], + 'image_not_found_quality' => [ + 'label' => '404 Image Quality', + 'comment' => 'Default output quality for the image above', + ], + 'format' => [ + 'label' => 'Default Output Format', + 'comment' => 'Select the default format to resize/export images to', + 'options' => [ + 'auto' => 'Automatic (Use input format)', + 'jpg' => 'JPG', + 'png' => 'PNG', + 'webp' => 'WEBP', + 'bmp' => 'BMP', + 'gif' => 'GIF', + 'ico' => 'ICO', + ] + ], + 'background' => [ + 'label' => 'Default Background Color', + 'comment' => 'When converting alpha-channel images (png, webp) to flat images (jpg, etc), define the default color of the background', + ], + 'filters' => [ + 'label' => 'Filters', + 'prompt' => 'Add a new Filter', + 'fields' => [ + 'code' => [ + 'label' => 'Code', + 'comment' => 'Used in reference when using filters', + ], + 'description' => [ + 'label' => 'Description', + 'comment' => 'Description of this filter', + ], + 'rules' => [ + 'label' => 'Rules / Modifications', + 'prompt' => 'Add a new rule', + 'fields' => [ + 'modifier' => [ + 'label' => 'Modifier Rule', + 'comment' => 'Add a modifier', + 'options' => [ + 'width' => 'Width', + 'height' => 'Height', + 'min_width' => 'Min Width', + 'min_height' => 'Min Height', + 'max_width' => 'Max Width', + 'max_height' => 'Max Height', + 'blur' => 'Blur', + 'sharpen' => 'Sharpen', + 'brightness' => 'Brightness', + 'contrast' => 'Contrast', + 'pixelate' => 'Pixelate', + 'greyscale' => 'Greyscale', + 'invert' => 'Invert', + 'opacity' => 'Opacity', + 'rotate' => 'Rotate', + 'flip' => 'Flip', + 'background' => 'Background', + 'colorize' => 'Colorize', + 'format' => 'Format', + 'quality' => 'Quality', + 'mode' => 'Mode', + 'fit_position' => 'Fit Position (for cover mode)', + ] + ], + 'value' => [ + 'label' => 'Modifier Value', + 'comment' => 'Specify the value for this modifier', + ] + ] + ] + ] + ], + 'cache_directory' => [ + 'label' => 'Cache Directory', + 'comment' => 'The directory to store cached resized images (absolute or relative to base_path). Default: storage/temp/public/imageresizecache', + ], + 'cache_clear_interval' => [ + 'label' => 'Cache Clear Interval', + 'comment' => 'Default/Empty: Disables auto clear. Else: Datetime intveral in human readable form (e.g. 12 hours, 5 days, 1 year)', + ], + 'cleanup_on_cache_clear' => [ + 'label' => 'Clear Images on Cache Clear?', + 'comment' => 'When running `artisan cache:clear` should all images be cleared as well? Default: false' + ] + ], + ], + 'widgets' => [ + 'clear' => [ + 'cleared' => 'Successfully cleared all resized cached images (:size)', + 'showGcInterval' => 'Show Garbage Collection Interval', + ] + ], +]; diff --git a/plugins/abwebdevelopers/imageresize/lang/fi/lang.php b/plugins/abwebdevelopers/imageresize/lang/fi/lang.php new file mode 100644 index 000000000..24ab5d476 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/lang/fi/lang.php @@ -0,0 +1,136 @@ + [ + 'name' => 'Kuvamuunnin', + 'description' => 'Lisää suotimia sivupohjiin mahdollistaen kuvien kokomuunnokset, rajaukset, jne. (hyödyntää välimuistia)', + ], + 'permissions' => [ + 'tab' => 'Kuvan muunnin', + 'access_settings' => 'Pääsy kuvamuutimen asetuksiin', + ], + 'settings' => [ + 'tabs' => [ + 'main' => 'Asetukset', + 'filters' => 'Suotimet' + ], + 'sections' => [ + '_404' => [ + 'label' => 'Kuvaa ei löydy', + 'comment' => 'Määrittele toiminto tilanteeseen, kun kuvaa ei löydy' + ] + ], + 'fields' => [ + 'driver' => [ + 'label' => 'PHP-kuvaohjain', + 'comment' => 'Valitse kuvaohjain (tukee vain kuvakirjaston omia ominaisuuksia)', + 'options' => [ + 'gd' => 'GD Library', + 'imagick' => 'Imagick Extension' + ], + ], + 'mode' => [ + 'label' => 'Oletus muuntomoodi', + 'comment' => 'Choose the different mode to use when resizing to a specific size (CSS "background-size" options are supported, with an additional mode "stretch" which acts like an img element)', + 'options' => [ + 'auto' => 'Autom.', + 'contain' => 'Säilytä', + 'cover' => 'Täytä', + 'stretch' => 'Venytä', + ], + ], + 'quality' => [ + 'label' => 'Oletuslaatu', + 'comment' => 'Oletuslaatu kuville (1-100)' + ], + 'image_not_found' => [ + 'label' => '404 kuvan lähde', + 'comment' => 'Valitse kuva, joka näytetään mikäli alkuperäistä ei löydy', + ], + 'image_not_found_background' => [ + 'label' => '404 kuvan taustaväri', + 'comment' => 'Background color for the image above', + ], + 'image_not_found_mode' => [ + 'label' => '404 kuvan kokomuuntimen moodi', + 'comment' => 'Kokomuuntimen toimintatapa', + ], + 'image_not_found_format' => [ + 'label' => '404 kuvaformaatti', + 'comment' => 'Kuvan formaatti', + ], + 'image_not_found_quality' => [ + 'label' => '404 kuvan laatu', + 'comment' => 'Kuvan laatu', + ], + 'format' => [ + 'label' => 'Oletus kuvaformaatti', + 'comment' => 'Valitse oletus kuvaformaatti', + 'options' => [ + 'auto' => 'automaattinen (käytä alkuperäistä)', + 'jpg' => 'JPG', + 'png' => 'PNG', + 'webp' => 'WEBP', + 'bmp' => 'BMP', + 'gif' => 'GIF', + 'ico' => 'ICO', + ] + ], + 'background' => [ + 'label' => 'Taustan oletusväri', + 'comment' => 'Määritä taustaväri tilanteisiin, jossa läpinäkyvällä taustalla oleva kuva (png, webp) muunnetaan (jpg, etc) taustalliseksi', + ], + 'filters' => [ + 'label' => 'Suotimet', + 'prompt' => 'Lisää suodin', + 'fields' => [ + 'code' => [ + 'label' => 'Koodi', + 'comment' => 'Käytetään suotimien referenssinä', + ], + 'description' => [ + 'label' => 'Kuvaus', + 'comment' => 'Suotimen kuvaus', + ], + 'rules' => [ + 'label' => 'Säännöt / Muokkaukset', + 'prompt' => 'Lisää uusi sääntö', + 'fields' => [ + 'modifier' => [ + 'label' => 'Muokkaussääntö', + 'comment' => 'Lisää muokkain', + 'options' => [ + 'width' => 'Leveys', + 'height' => 'Korkeus', + 'min_width' => 'Min. leveys', + 'min_height' => 'Min. korkeus', + 'max_width' => 'Maks. leveys', + 'max_height' => 'Maks. korkeus', + 'blur' => 'Sumenna', + 'sharpen' => 'Terävöitä', + 'brightness' => 'Kirkkaus', + 'contrast' => 'Kontrasti', + 'pixelate' => 'Pikselöi', + 'greyscale' => 'Harmaasävy', + 'invert' => 'Käänteinen väri', + 'opacity' => 'Läpinäkyvyys', + 'rotate' => 'Pyöritä', + 'flip' => 'Käännä', + 'background' => 'Tausta', + 'colorize' => 'Väritä', + 'format' => 'Formaatti', + 'quality' => 'Laatu', + 'mode' => 'Moodi', + ] + ], + 'value' => [ + 'label' => 'Muokkaimen arvo', + 'comment' => 'Määritä tämän muokkaimen arvo', + ] + ] + ] + ] + ] + ], + ], +]; diff --git a/plugins/abwebdevelopers/imageresize/lang/ru/lang.php b/plugins/abwebdevelopers/imageresize/lang/ru/lang.php new file mode 100644 index 000000000..fb4bcc6d6 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/lang/ru/lang.php @@ -0,0 +1,135 @@ + [ + 'name' => 'Image Resizer', + 'description' => 'Добавляет фильтры, позволяющие обрабатывать изображения на лету (изменение размера, обрезка и пр.) с кешированием', + ], + 'permissions' => [ + 'tab' => 'Image Resizer', + 'access_settings' => 'Настройки обработки изображений', + ], + 'settings' => [ + 'tabs' => [ + 'main' => 'Основные', + 'filters' => 'Фильтры' + ], + 'sections' => [ + '_404' => [ + 'label' => 'Изображение не найдено', + 'comment' => 'Выберите, как поступить, если изображение не найдено' + ] + ], + 'fields' => [ + 'driver' => [ + 'label' => 'PHP-драйвер для обработки изображений', + 'comment' => 'Выберите драйвер (только поддерживаемые библиотекой intervention\image)', + 'options' => [ + 'gd' => 'Библиотека GD', + 'imagick' => 'Расширение Imagick' + ], + ], + 'mode' => [ + 'label' => 'Режим по-умолчанию', + 'comment' => 'Выберите режим, который будет использоваться, если заданы фиксированные значения ширины и высоты (поддерживаются опции CSS "background-size", с дополнительным режимом "stretch")', + 'options' => [ + 'auto' => 'Автоматически', + 'contain' => 'Вписать (contain)', + 'cover' => 'Заполнить (cover)', + 'stretch' => 'Растянуть (stretch)', + ], + ], + 'format' => [ + 'label' => 'Формат генерируемых изображений', + 'comment' => 'Выберите формат, в котором будут выводиться генерируемые изображения', + 'options' => [ + 'auto' => 'Автоматически (исходный формат)', + 'jpg' => 'JPG', + 'png' => 'PNG', + 'webp' => 'WEBP', + 'bmp' => 'BMP', + 'gif' => 'GIF', + 'ico' => 'ICO', + ] + ], + 'quality' => [ + 'label' => 'Качество по-умолчанию', + 'comment' => 'Выберите качество генерируемых изображений (1-100)' + ], + 'image_not_found' => [ + 'label' => '404 Изображение не найдено', + 'comment' => 'Выберите изображение, которое будет выводиться, если исходное не найдено', + ], + 'image_not_found_background' => [ + 'label' => 'Цвет фона изображения 404', + 'comment' => 'Выберите цвет фона для изображения, заданного выше', + ], + 'image_not_found_mode' => [ + 'label' => 'Режим по-умолчанию изображения 404', + 'comment' => 'Выберите режим изменения размера для изображения 404', + ], + 'image_not_found_format' => [ + 'label' => 'Формат изображения 404', + 'comment' => 'Выберите формат, в котором будут выводиться изображения 404', + ], + 'image_not_found_quality' => [ + 'label' => 'Качество по-умолчанию изображения 404', + 'comment' => 'Выберите качество генерируемых изображений 404 (1-100)', + ], + 'background' => [ + 'label' => 'Фон по-умолчанию', + 'comment' => 'Выберите цвет, который будет замещать прозрачные участки изображений с прозрачностью (png, webp) при конвертировании в форматы, не поддерживающие прозрачность (jpg, etc)', + ], + 'filters' => [ + 'label' => 'Фильтры', + 'prompt' => 'Добавить фильтр', + 'fields' => [ + 'code' => [ + 'label' => 'Код фильтра', + 'comment' => 'Используется при ссылке на фильтр', + ], + 'description' => [ + 'label' => 'Описание', + 'comment' => 'Напишите описание для этого фильтра', + ], + 'rules' => [ + 'label' => 'Правила / Модификации', + 'prompt' => 'Добавить новое правило', + 'fields' => [ + 'modifier' => [ + 'label' => 'Свойство', + 'comment' => 'Выберите свойство', + 'options' => [ + 'width' => 'Ширина', + 'height' => 'Высота', + 'min_width' => 'Минимальная ширина', + 'min_height' => 'Минимальная высота', + 'max_width' => 'Максимальная ширина', + 'max_height' => 'Максимальная высота', + 'blur' => 'Размытие', + 'sharpen' => 'Резкость', + 'brightness' => 'Яркость', + 'contrast' => 'Контрастность', + 'pixelate' => 'Пикселизация', + 'greyscale' => 'Оттенки серого', + 'invert' => 'Инвертировать', + 'opacity' => 'Прозрачность', + 'rotate' => 'Поворот', + 'flip' => 'Отражение', + 'background' => 'Цвет фона', + 'colorize' => 'Изменение оттенка', + 'format' => 'Формат', + 'quality' => 'Качество', + 'mode' => 'Режим', + ] + ], + 'value' => [ + 'label' => 'Значение', + 'comment' => 'Задайте значение для выбранного свойства', + ] + ] + ] + ] + ] + ], + ], +]; diff --git a/plugins/abwebdevelopers/imageresize/models/ImagePermalink.php b/plugins/abwebdevelopers/imageresize/models/ImagePermalink.php new file mode 100644 index 000000000..581ada8e8 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/models/ImagePermalink.php @@ -0,0 +1,254 @@ + 'string', + 'image' => 'string', + 'path' => 'string', + ]; + + public $jsonable = [ + 'options', + ]; + + /** + * When casting this object to string, retrieve the Permalink URL + * + * @return string + */ + public function __toString() + { + return $this->permalink_url; + } + + /** + * Set default for options (empty array) and path (empty string) on save + * + * @return void + */ + public function beforeSave() + { + if (is_null($this->options)) { + $this->options = []; + } + + if (is_null($this->path)) { + $this->path = ''; + } + } + + /** + * Get an ImagePermalink class by the given identifier (and provide + * defaults for when not resized yet: width, height, options) + * + * @param string $identifier + * @param string $image + * @param integer $width + * @param integer $height + * @param array $options + * @return ImagePermalink + */ + public static function getPermalink(string $identifier, string $image, int $width = null, int $height = null, array $options = []): ImagePermalink + { + $resizer = new Resizer((string) $image); + + $width = ($width !== null) ? (int) $width : null; + $height = ($height !== null) ? (int) $height : null; + $options = ($options instanceof Arrayable) ? $options->toArray() : (array) $options; + + return $resizer->resizePermalink($identifier, $width, $height, $options)->permalink_url; + } + + /** + * Scope all results by those matching the identifier (should always be only one) + * + * @param Builder $query + * @param string $identifier + * @return void + */ + public function scopeByIdentifier(Builder $query, string $identifier): void + { + $query->where('identifier', $identifier); + } + + /** + * Get the Image Permalink with this identifier if it exists + * + * @param string $identifier + * @return ImagePermalink|null + */ + public static function withIdentifer(string $identifier): ?ImagePermalink + { + return static::byIdentifier($identifier)->first(); + } + + /** + * Does the resized version of this image exist? + * + * @return boolean + */ + public function resizeExists(): bool + { + return !empty($this->path) && file_exists($this->absolute_path); + } + + /** + * Generate a short life hash for this file. + * This will be where the image is stored in the storage path + * + * @return string + */ + public function generateShortLifeHash(): string + { + return hash('sha256', $this->identifier . ':permalink:' . json_encode($this->options)); + } + + /** + * Resize the image, if not already resized + * + * @return void + */ + public function resize() + { + if ($this->resizeExists() === false) { + $config = $this->options ?? []; + + $resizer = Resizer::using($this->image) + ->setHash($hash = $this->generateShortLifeHash()) + ->setOptions($config) + ->doResize(); + + $path = $resizer->getRelativePath(); + + $this->path = $path; + $this->resized_at = now(); + $this->save(); + } + + return $this; + } + + /** + * Get the absolute path to the resized image + * + * @return string + */ + public function getAbsolutePathAttribute(): string + { + return base_path($this->path); + } + + /** + * Get the permalink URL for this image + * + * @return string + */ + public function getPermalinkUrlAttribute(): string + { + return url('/imageresizestatic/' . $this->identifier . '.' . $this->extension); + } + + /** + * If the resized copy of this image exists, delete it. + * + * @return $this + */ + public function deleteResize() + { + if ($this->resizeExists()) { + unlink($this->absolute_path); + } + + $this->path = null; + + return $this; + } + + /** + * Render this image to screen, now. + * + * @return void + */ + public function render() + { + $this->resize(); // if not resized + + header('Content-Type: ' . $this->mime_type); + header('Content-Length: ' . filesize($this->absolute_path)); + echo file_get_contents($this->absolute_path); + exit(); + } + + /** + * Get a default 404 image not found mock permalink + * + * @return ImagePermalink + */ + public static function defaultNotFound(): ImagePermalink + { + $identifier = '404'; + $resizer = Resizer::using(''); + + return static::fromResizer($identifier, $resizer); + } + + /** + * Initialise an ImagePermalink from the given Resizer instance + * + * @param string $identifier + * @param Resizer $resizer + * @return ImagePermalink + */ + public static function fromResizer(string $identifier, Resizer $resizer): ImagePermalink + { + $that = static::withIdentifer($identifier); + + if ($that === null) { + $that = new static(); + + $resizer->preventDefaultImage(); + $that->identifier = $identifier; + $that->image = $resizer->getImagePathRelativePreferred(); + + list($mime, $format) = $resizer->detectFormat(true); + + $that->mime_type = 'image/' . $mime; + $that->extension = $format; + $that->options = $resizer->getCacheableOptions(); + + $that->save(); + } elseif (($that->resizeExists() === false) || empty($that->image)) { + // In the case where the resize doesn't exist (typically after cache:flush) we want + // to update the image reference as well as options. + $that->image = $resizer->getImagePathRelativePreferred(); + + // If resize exists, delete the resized copy + $that->deleteResize(); + + list($mime, $format) = $resizer->detectFormat(true); + + $that->mime_type = 'image/' . $mime; + $that->extension = $format; + $that->options = $resizer->getCacheableOptions(); + + $that->save(); + } + + return $that; + } +} diff --git a/plugins/abwebdevelopers/imageresize/models/Settings.php b/plugins/abwebdevelopers/imageresize/models/Settings.php new file mode 100644 index 000000000..2723651a0 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/models/Settings.php @@ -0,0 +1,286 @@ + 'required|string|in:gd,imagick', + 'background' => 'required|string|regex:/^#([a-f0-9]{3}){1,2}$/i', + 'mode' => 'required|string|in:auto,cover,contain,stretch', + 'quality' => 'required|min:1|max:100', + 'format' => 'required|string|in:auto,jpg,png,bmp,gif,ico,webp', + 'filters.*.modifier' => 'in:width,height,min_width,min_height,max_width,max_height,blur,sharpen,brightness,contrast,pixelate,greyscale,invert,opacity,rotate,flip,background,colorize,format,quality,mode', + 'filters.*.value' => 'string|min:0|max:10', + 'image_not_found' => 'nullable', + 'image_not_found_background' => 'required|regex:/^#([a-f0-9]{3}){1,2}$/i', + 'image_not_found_mode' => 'required|in:auto,cover,contain,stretch', + 'image_not_found_quality' => 'required|min:1|max:100', + + 'cache_directory' => 'nullable|string', + 'cache_clear_interval' => 'nullable|string', + 'cleanup_on_cache_clear' => 'nullable|boolean', + ]; + + /** + * Define cast types for each modifier type + * + * @var array + */ + protected $castModifiers = [ + 'width' => 'int', + 'height' => 'int', + 'min_width' => 'int', + 'min_height' => 'int', + 'max_width' => 'int', + 'max_height' => 'int', + 'blur' => 'int', + 'sharpen' => 'int', + 'brightness' => 'int', + 'contrast' => 'int', + 'pixelate' => 'int', + 'greyscale' => 'bool', + 'invert' => 'bool', + 'opacity' => 'int', + 'rotate' => 'int', + 'flip' => 'string', + 'background' => 'string', + 'colorize' => 'string', + 'format' => 'string', + 'quality' => 'int', + 'mode' => 'string', + 'fit_position' => 'string', + ]; + + /** + * Define validation rules for each modifier type + * + * @var array + */ + public $modifierRules = [ + 'width' => 'bail|int|min:0|max:10000', + 'height' => 'bail|int|min:0|max:10000', + 'min_width' => 'bail|int|min:0|max:10000', + 'min_height' => 'bail|int|min:0|max:10000', + 'max_width' => 'bail|int|min:0|max:10000', + 'max_height' => 'bail|int|min:0|max:10000', + 'blur' => 'bail|int|min:0|max:100', + 'sharpen' => 'bail|int|min:0|max:100', + 'brightness' => 'bail|int|min:-100|max:100', + 'contrast' => 'bail|int|min:-100|max:100', + 'pixelate' => 'bail|int|min:1|max:1000', + 'greyscale' => 'bail|accepted', + 'invert' => 'bail|accepted', + 'opacity' => 'bail|int|min:0|max:100', + 'rotate' => 'bail|int|min:0|max:360', + 'flip' => 'bail|string|in:v,h', + 'background' => 'bail|string|regex:/^#([a-f0-9]{3}){1,2}$/', + 'colorize' => 'bail|string|regex:/^(?:-?(?:100|[0-9]{2})),(?:-?(?:100|[0-9]{2})),(?:-?(?:100|[0-9]{2}))$/', + 'format' => 'bail|string|in:auto,jpg,png,bmp,gif,ico,webp', + 'quality' => 'bail|int|min:1|max:100', + 'mode' => 'bail|string|in:auto,cover,contain,stretch', + 'fit_position' => 'bail|string|in:top-left,top,top-right,left,center,right,bottom-left,bottom,bottom-right', + ]; + + /** + * Before validating, cast modifier values to their respective type + * + * @return void + */ + public function beforeValidate() + { + if (!empty($this->value)) { + $data = $this->value; + + if (!empty($data['filters'])) { + foreach ($data['filters'] as $filterId => $filter) { + foreach ($filter['rules'] as $ruleId => $rule) { + switch ($this->castModifiers[$rule['modifier']]) { + case 'int': + $rule['value'] = (int) $rule['value']; + break; + case 'float': + $rule['value'] = (float) $rule['value']; + break; + case 'bool': + $rule['value'] = (bool) ($rule['value'] === '1' || $rule['value'] === 'true'); + break; + case 'string': + default: + $rule['value'] = (string) $rule['value']; + break; + } + $filter['rules'][$ruleId] = $rule; + } + $data['filters'][$filterId] = $filter; + } + } + + $this->value = $data; + } + } + + /** + * Before saving, validate the modifiers which have their own validation logic. Throw an + * exception on fail. + * + * @return void + */ + public function beforeSave() + { + if (!empty($this->value)) { + $data = $this->value; + + if (empty($data['cache_directory'])) { + $data['cache_directory'] = $this->getBasePath(); + } + + if (empty($data['cache_clear_interval'])) { + $data['cache_clear_interval'] = $this->getAgeToDelete(); + } + + if (!empty($data['filters'])) { + foreach ($data['filters'] as $filterId => $filter) { + $validationData = []; + $validationRules = []; + + foreach ($filter['rules'] as $ruleId => $rule) { + $validationData[$rule['modifier']] = $rule['value']; + $validationRules[$rule['modifier']] = $this->modifierRules[$rule['modifier']]; + } + + $validator = Validator::make($validationData, $validationRules); + + if (!$validator->passes()) { + $errors = []; + foreach ($validator->messages()->toArray() as $field => $fieldErrors) { + $errors[] = implode(", ", $fieldErrors); + } + throw new \Exception("Unable to save Settings: " . implode("\n", $errors)); + } + } + } + } + } + + /** + * Retrieve the default "Not Found" image path + * + * @param bool $absolute Return absolute path? + * @return string + */ + public static function getDefaultImageNotFound(bool $absolute = false): string + { + $path = static::DEFAULT_IMAGE_NOT_FOUND; + + if ($absolute) { + $path = (substr($path, 0, 1) === '/') ? $path : base_path($path); + } + + return $path; + } + + /** + * Get the base path for all cached images. + * + * Similarly to base_path(), storage_path(), etc, you can provide a subdir path + * as the first argument. This function will never return a trailing slash + * unless you provide it in the first argument. + * + * @return string + */ + public static function getBasePath(string $subdirectoryPath = null, bool $absolute = false): string + { + $path = rtrim(static::DEFAULT_STORAGE_PATH, '/'); + + // Get the cache directory from the Settings + $that = static::instance(); + if (!empty($that->cache_directory)) { + $path = rtrim($that->cache_directory, '/'); + } + + // // Uncomment to initialise a gitignore file for this directory + // if ($path === rtrim(static::DEFAULT_STORAGE_PATH, '/')) { + // if (!is_file($path . '/.gitignore')) { + // file_put_contents($path . '/.gitignore', "*\n!.gitignore\n!public"); + // } + // } + + if ($subdirectoryPath !== null) { + $path .= '/' . ltrim($subdirectoryPath, '/'); + } + + if ($absolute) { + $path = (substr($path, 0, 1) === '/') ? $path : base_path($path); + } + + return $path; + } + + /** + * Get the age a cached file must be before scheduled deletion. + * Equivalent to: `->modify("-{$age}")` (now minus the age) + * + * @return string + */ + public static function getAgeToDelete(): string + { + $that = static::instance(); + + if (!empty($that->cache_clear_interval)) { + return $that->cache_clear_interval; + } + + return static::DEFAULT_CACHE_CLEAR_AGE; + } + + public static function cleanupOnCacheClear(): bool + { + $that = static::instance(); + + return $that->cleanup_on_cache_clear ?? false; + } +} diff --git a/plugins/abwebdevelopers/imageresize/models/settings/fields.yaml b/plugins/abwebdevelopers/imageresize/models/settings/fields.yaml new file mode 100644 index 000000000..53e424c8e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/models/settings/fields.yaml @@ -0,0 +1,190 @@ +tabs: + fields: + driver: + label: 'abwebdevelopers.imageresize::lang.settings.fields.driver.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.driver.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.main' + span: left + required: 1 + type: dropdown + options: + gd: 'abwebdevelopers.imageresize::lang.settings.fields.driver.options.gd' + imagick: 'abwebdevelopers.imageresize::lang.settings.fields.driver.options.imagick' + default: gd + background: + label: 'abwebdevelopers.imageresize::lang.settings.fields.background.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.background.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.main' + span: right + type: colorpicker + default: '#ffffff' + mode: + label: 'abwebdevelopers.imageresize::lang.settings.fields.mode.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.mode.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.main' + span: left + required: 1 + type: dropdown + options: + auto: 'abwebdevelopers.imageresize::lang.settings.fields.mode.options.auto' + contain: 'abwebdevelopers.imageresize::lang.settings.fields.mode.options.contain' + cover: 'abwebdevelopers.imageresize::lang.settings.fields.mode.options.cover' + stretch: 'abwebdevelopers.imageresize::lang.settings.fields.mode.options.stretch' + default: auto + format: + label: 'abwebdevelopers.imageresize::lang.settings.fields.format.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.format.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.main' + span: left + required: 1 + type: dropdown + options: + auto: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.auto' + jpg: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.jpg' + png: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.png' + webp: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.webp' + bmp: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.bmp' + gif: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.gif' + ico: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.ico' + default: auto + quality: + label: 'abwebdevelopers.imageresize::lang.settings.fields.quality.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.quality.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.main' + span: left + type: text + default: 65 + _404: + type: section + label: 'abwebdevelopers.imageresize::lang.settings.sections._404.label' + comment: 'abwebdevelopers.imageresize::lang.settings.sections._404.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.main' + image_not_found: + label: 'abwebdevelopers.imageresize::lang.settings.fields.image_not_found.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.image_not_found.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.main' + span: left + type: mediafinder + image_not_found_background: + label: 'abwebdevelopers.imageresize::lang.settings.fields.image_not_found_background.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.image_not_found_background.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.main' + span: right + type: colorpicker + default: '#c9d5d3' + image_not_found_mode: + label: 'abwebdevelopers.imageresize::lang.settings.fields.image_not_found_mode.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.image_not_found_mode.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.main' + span: left + type: dropdown + options: + auto: 'abwebdevelopers.imageresize::lang.settings.fields.mode.options.auto' + contain: 'abwebdevelopers.imageresize::lang.settings.fields.mode.options.contain' + cover: 'abwebdevelopers.imageresize::lang.settings.fields.mode.options.cover' + stretch: 'abwebdevelopers.imageresize::lang.settings.fields.mode.options.stretch' + default: contain + image_not_found_transparent: + label: 'abwebdevelopers.imageresize::lang.settings.fields.image_not_found_transparent.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.image_not_found_transparent.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.main' + span: right + type: checkbox + image_not_found_format: + label: 'abwebdevelopers.imageresize::lang.settings.fields.image_not_found_format.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.image_not_found_format.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.main' + span: left + type: dropdown + options: + auto: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.auto' + jpg: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.jpg' + png: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.png' + webp: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.webp' + bmp: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.bmp' + gif: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.gif' + ico: 'abwebdevelopers.imageresize::lang.settings.fields.format.options.ico' + default: contain + image_not_found_quality: + label: 'abwebdevelopers.imageresize::lang.settings.fields.image_not_found_quality.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.image_not_found_quality.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.main' + span: left + type: text + default: 65 + filters: + label: 'abwebdevelopers.imageresize::lang.settings.fields.filters.label' + prompt: 'abwebdevelopers.imageresize::lang.settings.fields.filters.prompt' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.filters' + type: repeater + form: + fields: + code: + label: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.code.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.code.comment' + type: text + span: left + description: + label: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.description.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.description.comment' + type: text + span: right + rules: + label: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.label' + prompt: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.prompt' + type: repeater + form: + fields: + modifier: + label: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.comment' + type: dropdown + span: left + options: + width: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.width' + height: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.height' + min_width: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.min_width' + min_height: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.min_height' + max_width: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.max_width' + max_height: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.max_height' + blur: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.blur' + sharpen: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.sharpen' + brightness: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.brightness' + contrast: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.contrast' + pixelate: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.pixelate' + greyscale: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.greyscale' + invert: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.invert' + opacity: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.opacity' + rotate: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.rotate' + flip: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.flip' + background: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.background' + colorize: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.colorize' + format: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.format' + quality: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.quality' + mode: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.mode' + fit_position: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.modifier.options.fit_position' + value: + label: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.value.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.filters.fields.rules.fields.value.comment' + type: text + span: right + cache_directory: + label: 'abwebdevelopers.imageresize::lang.settings.fields.cache_directory.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.cache_directory.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.cache' + span: left + type: text + default: 'storage/app/media/imageresizecache' + cache_clear_interval: + label: 'abwebdevelopers.imageresize::lang.settings.fields.cache_clear_interval.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.cache_clear_interval.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.cache' + span: right + type: text + default: 604800 + cleanup_on_cache_clear: + label: 'abwebdevelopers.imageresize::lang.settings.fields.cleanup_on_cache_clear.label' + comment: 'abwebdevelopers.imageresize::lang.settings.fields.cleanup_on_cache_clear.comment' + tab: 'abwebdevelopers.imageresize::lang.settings.tabs.cache' + span: left + type: checkbox diff --git a/plugins/abwebdevelopers/imageresize/reportwidgets/ImageResizeClearWidget.php b/plugins/abwebdevelopers/imageresize/reportwidgets/ImageResizeClearWidget.php new file mode 100644 index 000000000..5ee84ba87 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/reportwidgets/ImageResizeClearWidget.php @@ -0,0 +1,131 @@ + [ + 'title' => 'abwebdevelopers.imageresize::lang.widgets.clear.showGcInterval', + 'default' => true, + 'type' => 'checkbox', + ] + ]; + } + + /** + * Default handler: Render the widget + * + * @return void + */ + public function render() + { + return $this->makePartial('default'); + } + + /** + * AJAX callback: Clear the cache + * + * @return void + */ + public function onClear() + { + $from = $this->directorySize(); + Artisan::call('imageresize:clear'); + $to = $this->directorySize(); + + $size = $this->formatSize($from - $to); + Flash::success(Lang::get('abwebdevelopers.imageresize::lang.widgets.clear.cleared', [ + 'size' => $size + ])); + + return [ + 'partial' => $this->render(), + ]; + } + + /** + * Get the total size (in bytes) of all resized images + * + * @return int + */ + protected function directorySize(): int + { + $size = 0; + $path = Settings::getBasePath(); + + foreach (File::allFiles($path) as $file) { + $size += $file->getSize(); + } + + return $size; + } + + /** + * Format the bytes to human readable form + * + * @param int $size + * @param int $precision + * @return string + */ + protected function formatSize(int $size, int $precision = 2): string + { + if (empty($size)) { + return '0B'; + } + + $base = log($size, 1024); + $suffixes = ['B', 'KB', 'MB', 'GB', 'TB']; + + return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)]; + } + + /** + * Get the title of the widget + * + * @return string + */ + public function title(): string + { + return 'Image Resize Cache'; + } + + /** + * Get the size of all cached images (formatted) + * + * @return string + */ + public function size(): string + { + return $this->formatSize($this->directorySize()); + } + + /** + * Get the configured cache clear interval + * + * @return string|null + */ + public function garbageCollectionInterval(): ?string + { + return Settings::getAgeToDelete(); + } + + /** + * Should the garbage collection interval be displayed in this widget? + * + * @return boolean + */ + public function showGarbageCollectionInterval(): bool + { + return (bool) $this->property('showGcInterval', false); + } +} diff --git a/plugins/abwebdevelopers/imageresize/reportwidgets/imageresizeclearwidget/partials/_default.htm b/plugins/abwebdevelopers/imageresize/reportwidgets/imageresizeclearwidget/partials/_default.htm new file mode 100644 index 000000000..c4383919a --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/reportwidgets/imageresizeclearwidget/partials/_default.htm @@ -0,0 +1,12 @@ +
+

title())) ?>

+ garbageCollectionInterval() && $this->showGarbageCollectionInterval()): ?> +

Garbage collection interval: garbageCollectionInterval()) ?>

+ + +
\ No newline at end of file diff --git a/plugins/abwebdevelopers/imageresize/routes.php b/plugins/abwebdevelopers/imageresize/routes.php new file mode 100644 index 000000000..0c001c0e5 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/routes.php @@ -0,0 +1,40 @@ + null, + 'options' => [], + 'formatCache' => [], + ]; + } + + return Resizer::using($config['image']) + ->setHash($hash) + ->setOptions($config['options'] ?? []) + ->setFormatCache($config['formatCache'] ?? []) + ->doResize() + ->render(); +}); + +/** + * Publicly accessible URL for permalink image using an identifier/ext. + */ +Route::get('imageresizestatic/{identifier}.{ext}', function (string $identifier, string $ext) { + $perma = ImagePermalink::withIdentifer($identifier); + + if ($perma === null) { + $perma = ImagePermalink::defaultNotFound(); + } + + return $perma->render(); +})->where('identifier', '(.+?)'); diff --git a/plugins/abwebdevelopers/imageresize/traits/HasPermalinkIdentifiers.php b/plugins/abwebdevelopers/imageresize/traits/HasPermalinkIdentifiers.php new file mode 100644 index 000000000..c1270c380 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/traits/HasPermalinkIdentifiers.php @@ -0,0 +1,21 @@ +slug; + } +} diff --git a/plugins/abwebdevelopers/imageresize/updates/clear_old_cache_dir.php b/plugins/abwebdevelopers/imageresize/updates/clear_old_cache_dir.php new file mode 100644 index 000000000..392b9d35d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/updates/clear_old_cache_dir.php @@ -0,0 +1,33 @@ +where('item', 'abwebdevelopers_imageresize')->exists()) { + $oldpath = base_path('storage/app/media/imageresizecache'); + + if (Settings::instance()->cache_directory !== $oldpath) { + if (is_dir($oldpath)) { + Resizer::clearFiles(null, $oldpath); + + File::deleteDirectory($oldpath); + @unlink($oldpath); + } + } + } + } + + public function down() + { + } +} diff --git a/plugins/abwebdevelopers/imageresize/updates/create_permalinks_table.php b/plugins/abwebdevelopers/imageresize/updates/create_permalinks_table.php new file mode 100644 index 000000000..bb1e01f6b --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/updates/create_permalinks_table.php @@ -0,0 +1,35 @@ +increments('id'); + + $table->text('identifier'); + $table->text('image'); + $table->string('mime_type'); + $table->string('extension'); + $table->text('options'); + $table->text('path'); + $table->dateTime('resized_at')->nullable()->default(null); + + $table->timestamps(); + }); + } + } + + public function down() + { + if (Schema::hasTable('abweb_imageresize_permalinks') === true) { + Schema::drop('abweb_imageresize_permalinks'); + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/updates/seed_filters.php b/plugins/abwebdevelopers/imageresize/updates/seed_filters.php new file mode 100644 index 000000000..6bac83383 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/updates/seed_filters.php @@ -0,0 +1,99 @@ + $value) { + if ($value['code'] == 'thumbnail') { + $hasThumbnail = true; + } elseif ($value['code'] == 'hero') { + $hasHero = true; + } + } + + if (!$hasThumbnail) { + $filters[] = [ + "code" => "thumbnail", + "description" => "Basic thumbnail filter", + "rules" => [ + [ + "modifier" => "max_width", + "value" => "500", + ], + [ + "modifier" => "max_height", + "value" => "500", + ], + [ + "modifier" => "brightness", + "value" => "50", + ], + [ + "modifier" => "background", + "value" => "#fff", + ], + [ + "modifier" => "greyscale", + "value" => "true", + ], + [ + "modifier" => "quality", + "value" => "60", + ], + [ + "modifier" => "format", + "value" => "jpg", + ], + [ + "modifier" => "mode", + "value" => "cover", + ], + ], + ]; + } + + if (!$hasHero) { + $filters[] = [ + "code" => "hero", + "description" => "Standard hero filter", + "rules" => [ + [ + "modifier" => "width", + "value" => "1920", + ], + [ + "modifier" => "height", + "value" => "500", + ], + [ + "modifier" => "mode", + "value" => "cover", + ], + [ + "modifier" => "quality", + "value" => "80", + ], + [ + "modifier" => "format", + "value" => "jpg", + ], + ], + ]; + } + } + + public function down() + { + + } +} diff --git a/plugins/abwebdevelopers/imageresize/updates/version.yaml b/plugins/abwebdevelopers/imageresize/updates/version.yaml new file mode 100644 index 000000000..c1f3687c3 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/updates/version.yaml @@ -0,0 +1,58 @@ +1.0.0: + - Initial version of Image Resize +1.1.0: + - Add settings, filters, image not found placeholder, and various other improvements +1.1.1: + - Enable image caching +1.1.2: + - Minor tweaks and improvements, ship plugin with 2 filters +1.1.3: + - Fix PHP 7.0 incompatibility issue, support all relative URL images +1.1.4: + - Register access permissions +1.1.5: + - Fix issue with spaces in filenames +1.1.6: + - Fix return type errors +1.1.7: + - Remove debug routes file +2.0.0: + - Optimise image resizing on initial pageload by offloading to separate thread (by resizing when requesting images) +2.0.1: + - Fix bug (since 2.0.0) where the 'default 404 image' does not utilise the configured background/mode/quality +2.0.2: + - Implement ability to add watermarks to images +2.1.0: + - Move default imageresizecache directory (out of app/media) and store+serve images with file extension (change default imagresize cache clear to 1 week) +2.1.1: + - Fix double slash issue in resized image URLs +2.1.2: + - Clear old images (for the v2.1.0 directory change) + - clear_old_cache_dir.php +2.1.3: + - Fix - Generate absolute URLs instead of domain-relative URLs +2.1.4: + - Add new Dashboard Widget as an alternative method of clearing the image resize cache +2.1.5: + - Add new setting that runs `imageresize:clear` when `cache:clear` is run (if configured), and fix a Settings bug that was introduced from v2.1.0 +2.1.6: + - Fix migration (2.1.2 migration) that causes installations to fail (due to plugin settings not existing for new projects at time of execution) +2.1.7: + - Fix - Update plugin's boot method to not directly reference Settings until DB connection is established +2.1.8: + - Added twig filter to parse and resize/modify images (via regex) using twig filter(s) +2.1.9: + - Improvement to the detection of the original image's mime type (uses less system resources) +2.2.0: + - Added optional permalinks for images to ensure image URLs always yield the same image after cache flushes + - create_permalinks_table.php +2.2.1: + - Fix issue where REMOTE_ADDR server variable is not set when running through CLI +2.2.2: + - Fix MySQL issue where text fields had default values +2.2.3: + - Improvements to Permalinks +2.2.4: + - Fix exception when directory doesn't exist during cache clear +2.2.5: + - Fix regeneration of permalink images that previously defaulted to 404 image \ No newline at end of file diff --git a/plugins/abwebdevelopers/imageresize/vendor/autoload.php b/plugins/abwebdevelopers/imageresize/vendor/autoload.php new file mode 100644 index 000000000..1affaf68f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/LICENSE b/plugins/abwebdevelopers/imageresize/vendor/composer/LICENSE new file mode 100644 index 000000000..f27399a04 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +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. + diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/autoload_classmap.php b/plugins/abwebdevelopers/imageresize/vendor/composer/autoload_classmap.php new file mode 100644 index 000000000..7a91153b0 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/autoload_classmap.php @@ -0,0 +1,9 @@ + $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', +); diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/autoload_namespaces.php b/plugins/abwebdevelopers/imageresize/vendor/composer/autoload_namespaces.php new file mode 100644 index 000000000..b7fc0125d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($vendorDir . '/psr/http-message/src'), + 'Intervention\\Image\\' => array($vendorDir . '/intervention/image/src/Intervention/Image'), + 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), + 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'), +); diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/autoload_real.php b/plugins/abwebdevelopers/imageresize/vendor/composer/autoload_real.php new file mode 100644 index 000000000..2869e9e5e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/autoload_real.php @@ -0,0 +1,70 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit5081b5a1a3d18c299d648f7535618d68::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit5081b5a1a3d18c299d648f7535618d68::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire5081b5a1a3d18c299d648f7535618d68($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequire5081b5a1a3d18c299d648f7535618d68($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/autoload_static.php b/plugins/abwebdevelopers/imageresize/vendor/composer/autoload_static.php new file mode 100644 index 000000000..d782690e2 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/autoload_static.php @@ -0,0 +1,60 @@ + __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'P' => + array ( + 'Psr\\Http\\Message\\' => 17, + ), + 'I' => + array ( + 'Intervention\\Image\\' => 19, + ), + 'G' => + array ( + 'GuzzleHttp\\Psr7\\' => 16, + ), + 'C' => + array ( + 'Composer\\Installers\\' => 20, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Psr\\Http\\Message\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/http-message/src', + ), + 'Intervention\\Image\\' => + array ( + 0 => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image', + ), + 'GuzzleHttp\\Psr7\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', + ), + 'Composer\\Installers\\' => + array ( + 0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers', + ), + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit5081b5a1a3d18c299d648f7535618d68::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit5081b5a1a3d18c299d648f7535618d68::$prefixDirsPsr4; + + }, null, ClassLoader::class); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installed.json b/plugins/abwebdevelopers/imageresize/vendor/composer/installed.json new file mode 100644 index 000000000..4ef3cd4e9 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installed.json @@ -0,0 +1,373 @@ +[ + { + "name": "composer/installers", + "version": "v1.10.0", + "version_normalized": "1.10.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/installers.git", + "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/installers/zipball/1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d", + "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0" + }, + "replace": { + "roundcube/plugin-installer": "*", + "shama/baton": "*" + }, + "require-dev": { + "composer/composer": "1.6.* || ^2.0", + "composer/semver": "^1 || ^3", + "phpstan/phpstan": "^0.12.55", + "phpstan/phpstan-phpunit": "^0.12.16", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.3" + }, + "time": "2021-01-14T11:07:16+00:00", + "type": "composer-plugin", + "extra": { + "class": "Composer\\Installers\\Plugin", + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Composer\\Installers\\": "src/Composer/Installers" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle Robinson Young", + "email": "kyle@dontkry.com", + "homepage": "https://github.com/shama" + } + ], + "description": "A multi-framework Composer library installer", + "homepage": "https://composer.github.io/installers/", + "keywords": [ + "Craft", + "Dolibarr", + "Eliasis", + "Hurad", + "ImageCMS", + "Kanboard", + "Lan Management System", + "MODX Evo", + "MantisBT", + "Mautic", + "Maya", + "OXID", + "Plentymarkets", + "Porto", + "RadPHP", + "SMF", + "Starbug", + "Thelia", + "Whmcs", + "WolfCMS", + "agl", + "aimeos", + "annotatecms", + "attogram", + "bitrix", + "cakephp", + "chef", + "cockpit", + "codeigniter", + "concrete5", + "croogo", + "dokuwiki", + "drupal", + "eZ Platform", + "elgg", + "expressionengine", + "fuelphp", + "grav", + "installer", + "itop", + "joomla", + "known", + "kohana", + "laravel", + "lavalite", + "lithium", + "magento", + "majima", + "mako", + "mediawiki", + "modulework", + "modx", + "moodle", + "osclass", + "phpbb", + "piwik", + "ppi", + "processwire", + "puppet", + "pxcms", + "reindex", + "roundcube", + "shopware", + "silverstripe", + "sydes", + "sylius", + "symfony", + "typo3", + "wordpress", + "yawik", + "zend", + "zikula" + ] + }, + { + "name": "guzzlehttp/psr7", + "version": "1.7.0", + "version_normalized": "1.7.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "time": "2020-09-30T07:37:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "intervention/image", + "version": "2.4.3", + "version_normalized": "2.4.3.0", + "source": { + "type": "git", + "url": "https://github.com/Intervention/image.git", + "reference": "5f5e1c8768d6bb41a7f23706af754b92541de485" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Intervention/image/zipball/5f5e1c8768d6bb41a7f23706af754b92541de485", + "reference": "5f5e1c8768d6bb41a7f23706af754b92541de485", + "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" + }, + "time": "2019-05-31T17:08:36+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + }, + "laravel": { + "providers": [ + "Intervention\\Image\\ImageServiceProvider" + ], + "aliases": { + "Image": "Intervention\\Image\\Facades\\Image" + } + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "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" + }, + "time": "2016-08-06T14:39:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "version_normalized": "3.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "time": "2019-03-08T08:55:37+00:00", + "type": "library", + "installation-source": "dist", + "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." + } +] diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/LICENSE b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/LICENSE new file mode 100644 index 000000000..85f97fc79 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Kyle Robinson Young + +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/plugins/abwebdevelopers/imageresize/vendor/composer/installers/composer.json b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/composer.json new file mode 100644 index 000000000..61c0b7f45 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/composer.json @@ -0,0 +1,119 @@ +{ + "name": "composer/installers", + "type": "composer-plugin", + "license": "MIT", + "description": "A multi-framework Composer library installer", + "keywords": [ + "installer", + "Aimeos", + "AGL", + "AnnotateCms", + "Attogram", + "Bitrix", + "CakePHP", + "Chef", + "Cockpit", + "CodeIgniter", + "concrete5", + "Craft", + "Croogo", + "DokuWiki", + "Dolibarr", + "Drupal", + "Elgg", + "Eliasis", + "ExpressionEngine", + "eZ Platform", + "FuelPHP", + "Grav", + "Hurad", + "ImageCMS", + "iTop", + "Joomla", + "Kanboard", + "Known", + "Kohana", + "Lan Management System", + "Laravel", + "Lavalite", + "Lithium", + "Magento", + "majima", + "Mako", + "MantisBT", + "Mautic", + "Maya", + "MODX", + "MODX Evo", + "MediaWiki", + "OXID", + "osclass", + "MODULEWork", + "Moodle", + "Piwik", + "pxcms", + "phpBB", + "Plentymarkets", + "PPI", + "Puppet", + "Porto", + "ProcessWire", + "RadPHP", + "ReIndex", + "Roundcube", + "shopware", + "SilverStripe", + "SMF", + "Starbug", + "SyDES", + "Sylius", + "symfony", + "Thelia", + "TYPO3", + "WHMCS", + "WolfCMS", + "WordPress", + "YAWIK", + "Zend", + "Zikula" + ], + "homepage": "https://composer.github.io/installers/", + "authors": [ + { + "name": "Kyle Robinson Young", + "email": "kyle@dontkry.com", + "homepage": "https://github.com/shama" + } + ], + "autoload": { + "psr-4": { "Composer\\Installers\\": "src/Composer/Installers" } + }, + "autoload-dev": { + "psr-4": { "Composer\\Installers\\Test\\": "tests/Composer/Installers/Test" } + }, + "extra": { + "class": "Composer\\Installers\\Plugin", + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "replace": { + "shama/baton": "*", + "roundcube/plugin-installer": "*" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0" + }, + "require-dev": { + "composer/composer": "1.6.* || ^2.0", + "composer/semver": "^1 || ^3", + "symfony/phpunit-bridge": "^4.2 || ^5", + "phpstan/phpstan": "^0.12.55", + "symfony/process": "^2.3", + "phpstan/phpstan-phpunit": "^0.12.16" + }, + "scripts": { + "test": "SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 vendor/bin/simple-phpunit", + "phpstan": "vendor/bin/phpstan analyse" + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/phpstan.neon.dist b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/phpstan.neon.dist new file mode 100644 index 000000000..8e3d81e9a --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/phpstan.neon.dist @@ -0,0 +1,10 @@ +parameters: + level: 5 + paths: + - src + - tests + excludes_analyse: + - tests/Composer/Installers/Test/PolyfillTestCase.php + +includes: + - vendor/phpstan/phpstan-phpunit/extension.neon diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AglInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AglInstaller.php new file mode 100644 index 000000000..01b8a4165 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AglInstaller.php @@ -0,0 +1,21 @@ + 'More/{$name}/', + ); + + /** + * Format package name to CamelCase + */ + public function inflectPackageVars($vars) + { + $vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) { + return strtoupper($matches[1]); + }, $vars['name']); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php new file mode 100644 index 000000000..79a0e958f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php @@ -0,0 +1,9 @@ + 'ext/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php new file mode 100644 index 000000000..89d7ad905 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php @@ -0,0 +1,11 @@ + 'addons/modules/{$name}/', + 'component' => 'addons/components/{$name}/', + 'service' => 'addons/services/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php new file mode 100644 index 000000000..22dad1b9a --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php @@ -0,0 +1,49 @@ + 'Modules/{$name}/', + 'theme' => 'Themes/{$name}/' + ); + + /** + * Format package name. + * + * For package type asgard-module, cut off a trailing '-plugin' if present. + * + * For package type asgard-theme, cut off a trailing '-theme' if present. + * + */ + public function inflectPackageVars($vars) + { + if ($vars['type'] === 'asgard-module') { + return $this->inflectPluginVars($vars); + } + + if ($vars['type'] === 'asgard-theme') { + return $this->inflectThemeVars($vars); + } + + return $vars; + } + + protected function inflectPluginVars($vars) + { + $vars['name'] = preg_replace('/-module$/', '', $vars['name']); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } + + protected function inflectThemeVars($vars) + { + $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php new file mode 100644 index 000000000..d62fd8fd1 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php @@ -0,0 +1,9 @@ + 'modules/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php new file mode 100644 index 000000000..70dde907e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php @@ -0,0 +1,137 @@ +composer = $composer; + $this->package = $package; + $this->io = $io; + } + + /** + * Return the install path based on package type. + * + * @param PackageInterface $package + * @param string $frameworkType + * @return string + */ + public function getInstallPath(PackageInterface $package, $frameworkType = '') + { + $type = $this->package->getType(); + + $prettyName = $this->package->getPrettyName(); + if (strpos($prettyName, '/') !== false) { + list($vendor, $name) = explode('/', $prettyName); + } else { + $vendor = ''; + $name = $prettyName; + } + + $availableVars = $this->inflectPackageVars(compact('name', 'vendor', 'type')); + + $extra = $package->getExtra(); + if (!empty($extra['installer-name'])) { + $availableVars['name'] = $extra['installer-name']; + } + + if ($this->composer->getPackage()) { + $extra = $this->composer->getPackage()->getExtra(); + if (!empty($extra['installer-paths'])) { + $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor); + if ($customPath !== false) { + return $this->templatePath($customPath, $availableVars); + } + } + } + + $packageType = substr($type, strlen($frameworkType) + 1); + $locations = $this->getLocations(); + if (!isset($locations[$packageType])) { + throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type)); + } + + return $this->templatePath($locations[$packageType], $availableVars); + } + + /** + * For an installer to override to modify the vars per installer. + * + * @param array $vars This will normally receive array{name: string, vendor: string, type: string} + * @return array + */ + public function inflectPackageVars($vars) + { + return $vars; + } + + /** + * Gets the installer's locations + * + * @return array map of package types => install path + */ + public function getLocations() + { + return $this->locations; + } + + /** + * Replace vars in a path + * + * @param string $path + * @param array $vars + * @return string + */ + protected function templatePath($path, array $vars = array()) + { + if (strpos($path, '{') !== false) { + extract($vars); + preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches); + if (!empty($matches[1])) { + foreach ($matches[1] as $var) { + $path = str_replace('{$' . $var . '}', $$var, $path); + } + } + } + + return $path; + } + + /** + * Search through a passed paths array for a custom install path. + * + * @param array $paths + * @param string $name + * @param string $type + * @param string $vendor = NULL + * @return string|false + */ + protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL) + { + foreach ($paths as $path => $names) { + $names = (array) $names; + if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) { + return $path; + } + } + + return false; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php new file mode 100644 index 000000000..e80cd1e10 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php @@ -0,0 +1,126 @@ +.`. + * - `bitrix-d7-component` — copy the component to directory `bitrix/components//`. + * - `bitrix-d7-template` — copy the template to directory `bitrix/templates/_`. + * + * You can set custom path to directory with Bitrix kernel in `composer.json`: + * + * ```json + * { + * "extra": { + * "bitrix-dir": "s1/bitrix" + * } + * } + * ``` + * + * @author Nik Samokhvalov + * @author Denis Kulichkin + */ +class BitrixInstaller extends BaseInstaller +{ + protected $locations = array( + 'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) + 'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) + 'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) + 'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/', + 'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/', + 'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/', + ); + + /** + * @var array Storage for informations about duplicates at all the time of installation packages. + */ + private static $checkedDuplicates = array(); + + /** + * {@inheritdoc} + */ + public function inflectPackageVars($vars) + { + if ($this->composer->getPackage()) { + $extra = $this->composer->getPackage()->getExtra(); + + if (isset($extra['bitrix-dir'])) { + $vars['bitrix_dir'] = $extra['bitrix-dir']; + } + } + + if (!isset($vars['bitrix_dir'])) { + $vars['bitrix_dir'] = 'bitrix'; + } + + return parent::inflectPackageVars($vars); + } + + /** + * {@inheritdoc} + */ + protected function templatePath($path, array $vars = array()) + { + $templatePath = parent::templatePath($path, $vars); + $this->checkDuplicates($templatePath, $vars); + + return $templatePath; + } + + /** + * Duplicates search packages. + * + * @param string $path + * @param array $vars + */ + protected function checkDuplicates($path, array $vars = array()) + { + $packageType = substr($vars['type'], strlen('bitrix') + 1); + $localDir = explode('/', $vars['bitrix_dir']); + array_pop($localDir); + $localDir[] = 'local'; + $localDir = implode('/', $localDir); + + $oldPath = str_replace( + array('{$bitrix_dir}', '{$name}'), + array($localDir, $vars['name']), + $this->locations[$packageType] + ); + + if (in_array($oldPath, static::$checkedDuplicates)) { + return; + } + + if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) { + + $this->io->writeError(' Duplication of packages:'); + $this->io->writeError(' Package ' . $oldPath . ' will be called instead package ' . $path . ''); + + while (true) { + switch ($this->io->ask(' Delete ' . $oldPath . ' [y,n,?]? ', '?')) { + case 'y': + $fs = new Filesystem(); + $fs->removeDirectory($oldPath); + break 2; + + case 'n': + break 2; + + case '?': + default: + $this->io->writeError(array( + ' y - delete package ' . $oldPath . ' and to continue with the installation', + ' n - don\'t delete and to continue with the installation', + )); + $this->io->writeError(' ? - print help'); + break; + } + } + } + + static::$checkedDuplicates[] = $oldPath; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php new file mode 100644 index 000000000..da3aad2a3 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php @@ -0,0 +1,9 @@ + 'Packages/{$vendor}/{$name}/' + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php new file mode 100644 index 000000000..dda90a4e9 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php @@ -0,0 +1,65 @@ + 'Plugin/{$name}/', + ); + + /** + * Format package name to CamelCase + */ + public function inflectPackageVars($vars) + { + if ($this->matchesCakeVersion('>=', '3.0.0')) { + return $vars; + } + + $nameParts = explode('/', $vars['name']); + foreach ($nameParts as &$value) { + $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value)); + $value = str_replace(array('-', '_'), ' ', $value); + $value = str_replace(' ', '', ucwords($value)); + } + $vars['name'] = implode('/', $nameParts); + + return $vars; + } + + /** + * Change the default plugin location when cakephp >= 3.0 + */ + public function getLocations() + { + if ($this->matchesCakeVersion('>=', '3.0.0')) { + $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/'; + } + return $this->locations; + } + + /** + * Check if CakePHP version matches against a version + * + * @param string $matcher + * @param string $version + * @return bool + */ + protected function matchesCakeVersion($matcher, $version) + { + $repositoryManager = $this->composer->getRepositoryManager(); + if (! $repositoryManager) { + return false; + } + + $repos = $repositoryManager->getLocalRepository(); + if (!$repos) { + return false; + } + + return $repos->findPackage('cakephp/cakephp', new Constraint($matcher, $version)) !== null; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ChefInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ChefInstaller.php new file mode 100644 index 000000000..ab2f9aad8 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ChefInstaller.php @@ -0,0 +1,11 @@ + 'Chef/{$vendor}/{$name}/', + 'role' => 'Chef/roles/{$name}/', + ); +} + diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php new file mode 100644 index 000000000..6673aea94 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php @@ -0,0 +1,9 @@ + 'ext/{$name}/' + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php new file mode 100644 index 000000000..c887815c9 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php @@ -0,0 +1,10 @@ + 'CCF/orbit/{$name}/', + 'theme' => 'CCF/app/themes/{$name}/', + ); +} \ No newline at end of file diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php new file mode 100644 index 000000000..053f3ffd7 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php @@ -0,0 +1,32 @@ + 'cockpit/modules/addons/{$name}/', + ); + + /** + * Format module name. + * + * Strip `module-` prefix from package name. + * + * {@inheritDoc} + */ + public function inflectPackageVars($vars) + { + if ($vars['type'] == 'cockpit-module') { + return $this->inflectModuleVars($vars); + } + + return $vars; + } + + public function inflectModuleVars($vars) + { + $vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name'])); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php new file mode 100644 index 000000000..3b4a4ece1 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php @@ -0,0 +1,11 @@ + 'application/libraries/{$name}/', + 'third-party' => 'application/third_party/{$name}/', + 'module' => 'application/modules/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php new file mode 100644 index 000000000..5c01bafd7 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php @@ -0,0 +1,13 @@ + 'concrete/', + 'block' => 'application/blocks/{$name}/', + 'package' => 'packages/{$name}/', + 'theme' => 'application/themes/{$name}/', + 'update' => 'updates/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php new file mode 100644 index 000000000..d37a77ae2 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php @@ -0,0 +1,35 @@ + 'craft/plugins/{$name}/', + ); + + /** + * Strip `craft-` prefix and/or `-plugin` suffix from package names + * + * @param array $vars + * + * @return array + */ + final public function inflectPackageVars($vars) + { + return $this->inflectPluginVars($vars); + } + + private function inflectPluginVars($vars) + { + $vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']); + $vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php new file mode 100644 index 000000000..d94219d3a --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php @@ -0,0 +1,21 @@ + 'Plugin/{$name}/', + 'theme' => 'View/Themed/{$name}/', + ); + + /** + * Format package name to CamelCase + */ + public function inflectPackageVars($vars) + { + $vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name'])); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php new file mode 100644 index 000000000..f4837a6c1 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php @@ -0,0 +1,10 @@ + 'app/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php new file mode 100644 index 000000000..70788163a --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php @@ -0,0 +1,10 @@ + 'modules/{$vendor}/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php new file mode 100644 index 000000000..cfd638d5f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php @@ -0,0 +1,50 @@ + 'lib/plugins/{$name}/', + 'template' => 'lib/tpl/{$name}/', + ); + + /** + * Format package name. + * + * For package type dokuwiki-plugin, cut off a trailing '-plugin', + * or leading dokuwiki_ if present. + * + * For package type dokuwiki-template, cut off a trailing '-template' if present. + * + */ + public function inflectPackageVars($vars) + { + + if ($vars['type'] === 'dokuwiki-plugin') { + return $this->inflectPluginVars($vars); + } + + if ($vars['type'] === 'dokuwiki-template') { + return $this->inflectTemplateVars($vars); + } + + return $vars; + } + + protected function inflectPluginVars($vars) + { + $vars['name'] = preg_replace('/-plugin$/', '', $vars['name']); + $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']); + + return $vars; + } + + protected function inflectTemplateVars($vars) + { + $vars['name'] = preg_replace('/-template$/', '', $vars['name']); + $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']); + + return $vars; + } + +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php new file mode 100644 index 000000000..21f7e8e80 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php @@ -0,0 +1,16 @@ + + */ +class DolibarrInstaller extends BaseInstaller +{ + //TODO: Add support for scripts and themes + protected $locations = array( + 'module' => 'htdocs/custom/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php new file mode 100644 index 000000000..732823922 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php @@ -0,0 +1,22 @@ + 'core/', + 'module' => 'modules/{$name}/', + 'theme' => 'themes/{$name}/', + 'library' => 'libraries/{$name}/', + 'profile' => 'profiles/{$name}/', + 'database-driver' => 'drivers/lib/Drupal/Driver/Database/{$name}/', + 'drush' => 'drush/{$name}/', + 'custom-theme' => 'themes/custom/{$name}/', + 'custom-module' => 'modules/custom/{$name}/', + 'custom-profile' => 'profiles/custom/{$name}/', + 'drupal-multisite' => 'sites/{$name}/', + 'console' => 'console/{$name}/', + 'console-language' => 'console/language/{$name}/', + 'config' => 'config/sync/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php new file mode 100644 index 000000000..c0bb609f4 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php @@ -0,0 +1,9 @@ + 'mod/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php new file mode 100644 index 000000000..6f3dc97b1 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php @@ -0,0 +1,12 @@ + 'components/{$name}/', + 'module' => 'modules/{$name}/', + 'plugin' => 'plugins/{$name}/', + 'template' => 'templates/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php new file mode 100644 index 000000000..d5321a8ca --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php @@ -0,0 +1,29 @@ + 'system/expressionengine/third_party/{$name}/', + 'theme' => 'themes/third_party/{$name}/', + ); + + private $ee3Locations = array( + 'addon' => 'system/user/addons/{$name}/', + 'theme' => 'themes/user/{$name}/', + ); + + public function getInstallPath(PackageInterface $package, $frameworkType = '') + { + + $version = "{$frameworkType}Locations"; + $this->locations = $this->$version; + + return parent::getInstallPath($package, $frameworkType); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php new file mode 100644 index 000000000..f30ebcc77 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php @@ -0,0 +1,10 @@ + 'web/assets/ezplatform/', + 'assets' => 'web/assets/ezplatform/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php new file mode 100644 index 000000000..6eba2e34f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php @@ -0,0 +1,11 @@ + 'fuel/app/modules/{$name}/', + 'package' => 'fuel/packages/{$name}/', + 'theme' => 'fuel/app/themes/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php new file mode 100644 index 000000000..29d980b30 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php @@ -0,0 +1,9 @@ + 'components/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/GravInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/GravInstaller.php new file mode 100644 index 000000000..dbe63e07e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/GravInstaller.php @@ -0,0 +1,30 @@ + 'user/plugins/{$name}/', + 'theme' => 'user/themes/{$name}/', + ); + + /** + * Format package name + * + * @param array $vars + * + * @return array + */ + public function inflectPackageVars($vars) + { + $restrictedWords = implode('|', array_keys($this->locations)); + + $vars['name'] = strtolower($vars['name']); + $vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui', + '$1', + $vars['name'] + ); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php new file mode 100644 index 000000000..8fe017f0f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php @@ -0,0 +1,25 @@ + 'plugins/{$name}/', + 'theme' => 'plugins/{$name}/', + ); + + /** + * Format package name to CamelCase + */ + public function inflectPackageVars($vars) + { + $nameParts = explode('/', $vars['name']); + foreach ($nameParts as &$value) { + $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value)); + $value = str_replace(array('-', '_'), ' ', $value); + $value = str_replace(' ', '', ucwords($value)); + } + $vars['name'] = implode('/', $nameParts); + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php new file mode 100644 index 000000000..5e2142ea5 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php @@ -0,0 +1,11 @@ + 'templates/{$name}/', + 'module' => 'application/modules/{$name}/', + 'library' => 'application/libraries/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Installer.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Installer.php new file mode 100644 index 000000000..5869c1776 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Installer.php @@ -0,0 +1,294 @@ + 'AimeosInstaller', + 'asgard' => 'AsgardInstaller', + 'attogram' => 'AttogramInstaller', + 'agl' => 'AglInstaller', + 'annotatecms' => 'AnnotateCmsInstaller', + 'bitrix' => 'BitrixInstaller', + 'bonefish' => 'BonefishInstaller', + 'cakephp' => 'CakePHPInstaller', + 'chef' => 'ChefInstaller', + 'civicrm' => 'CiviCrmInstaller', + 'ccframework' => 'ClanCatsFrameworkInstaller', + 'cockpit' => 'CockpitInstaller', + 'codeigniter' => 'CodeIgniterInstaller', + 'concrete5' => 'Concrete5Installer', + 'craft' => 'CraftInstaller', + 'croogo' => 'CroogoInstaller', + 'dframe' => 'DframeInstaller', + 'dokuwiki' => 'DokuWikiInstaller', + 'dolibarr' => 'DolibarrInstaller', + 'decibel' => 'DecibelInstaller', + 'drupal' => 'DrupalInstaller', + 'elgg' => 'ElggInstaller', + 'eliasis' => 'EliasisInstaller', + 'ee3' => 'ExpressionEngineInstaller', + 'ee2' => 'ExpressionEngineInstaller', + 'ezplatform' => 'EzPlatformInstaller', + 'fuel' => 'FuelInstaller', + 'fuelphp' => 'FuelphpInstaller', + 'grav' => 'GravInstaller', + 'hurad' => 'HuradInstaller', + 'imagecms' => 'ImageCMSInstaller', + 'itop' => 'ItopInstaller', + 'joomla' => 'JoomlaInstaller', + 'kanboard' => 'KanboardInstaller', + 'kirby' => 'KirbyInstaller', + 'known' => 'KnownInstaller', + 'kodicms' => 'KodiCMSInstaller', + 'kohana' => 'KohanaInstaller', + 'lms' => 'LanManagementSystemInstaller', + 'laravel' => 'LaravelInstaller', + 'lavalite' => 'LavaLiteInstaller', + 'lithium' => 'LithiumInstaller', + 'magento' => 'MagentoInstaller', + 'majima' => 'MajimaInstaller', + 'mantisbt' => 'MantisBTInstaller', + 'mako' => 'MakoInstaller', + 'maya' => 'MayaInstaller', + 'mautic' => 'MauticInstaller', + 'mediawiki' => 'MediaWikiInstaller', + 'microweber' => 'MicroweberInstaller', + 'modulework' => 'MODULEWorkInstaller', + 'modx' => 'ModxInstaller', + 'modxevo' => 'MODXEvoInstaller', + 'moodle' => 'MoodleInstaller', + 'october' => 'OctoberInstaller', + 'ontowiki' => 'OntoWikiInstaller', + 'oxid' => 'OxidInstaller', + 'osclass' => 'OsclassInstaller', + 'pxcms' => 'PxcmsInstaller', + 'phpbb' => 'PhpBBInstaller', + 'pimcore' => 'PimcoreInstaller', + 'piwik' => 'PiwikInstaller', + 'plentymarkets'=> 'PlentymarketsInstaller', + 'ppi' => 'PPIInstaller', + 'puppet' => 'PuppetInstaller', + 'radphp' => 'RadPHPInstaller', + 'phifty' => 'PhiftyInstaller', + 'porto' => 'PortoInstaller', + 'processwire' => 'ProcessWireInstaller', + 'redaxo' => 'RedaxoInstaller', + 'redaxo5' => 'Redaxo5Installer', + 'reindex' => 'ReIndexInstaller', + 'roundcube' => 'RoundcubeInstaller', + 'shopware' => 'ShopwareInstaller', + 'sitedirect' => 'SiteDirectInstaller', + 'silverstripe' => 'SilverStripeInstaller', + 'smf' => 'SMFInstaller', + 'starbug' => 'StarbugInstaller', + 'sydes' => 'SyDESInstaller', + 'sylius' => 'SyliusInstaller', + 'symfony1' => 'Symfony1Installer', + 'tao' => 'TaoInstaller', + 'thelia' => 'TheliaInstaller', + 'tusk' => 'TuskInstaller', + 'typo3-cms' => 'TYPO3CmsInstaller', + 'typo3-flow' => 'TYPO3FlowInstaller', + 'userfrosting' => 'UserFrostingInstaller', + 'vanilla' => 'VanillaInstaller', + 'whmcs' => 'WHMCSInstaller', + 'wolfcms' => 'WolfCMSInstaller', + 'wordpress' => 'WordPressInstaller', + 'yawik' => 'YawikInstaller', + 'zend' => 'ZendInstaller', + 'zikula' => 'ZikulaInstaller', + 'prestashop' => 'PrestashopInstaller' + ); + + /** + * Installer constructor. + * + * Disables installers specified in main composer extra installer-disable + * list + * + * @param IOInterface $io + * @param Composer $composer + * @param string $type + * @param Filesystem|null $filesystem + * @param BinaryInstaller|null $binaryInstaller + */ + public function __construct( + IOInterface $io, + Composer $composer, + $type = 'library', + Filesystem $filesystem = null, + BinaryInstaller $binaryInstaller = null + ) { + parent::__construct($io, $composer, $type, $filesystem, + $binaryInstaller); + $this->removeDisabledInstallers(); + } + + /** + * {@inheritDoc} + */ + public function getInstallPath(PackageInterface $package) + { + $type = $package->getType(); + $frameworkType = $this->findFrameworkType($type); + + if ($frameworkType === false) { + throw new \InvalidArgumentException( + 'Sorry the package type of this package is not yet supported.' + ); + } + + $class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType]; + $installer = new $class($package, $this->composer, $this->getIO()); + + return $installer->getInstallPath($package, $frameworkType); + } + + public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) + { + $installPath = $this->getPackageBasePath($package); + $io = $this->io; + $outputStatus = function () use ($io, $installPath) { + $io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? 'deleted' : 'not deleted')); + }; + + $promise = parent::uninstall($repo, $package); + + // Composer v2 might return a promise here + if ($promise instanceof PromiseInterface) { + return $promise->then($outputStatus); + } + + // If not, execute the code right away as parent::uninstall executed synchronously (composer v1, or v2 without async) + $outputStatus(); + + return null; + } + + /** + * {@inheritDoc} + */ + public function supports($packageType) + { + $frameworkType = $this->findFrameworkType($packageType); + + if ($frameworkType === false) { + return false; + } + + $locationPattern = $this->getLocationPattern($frameworkType); + + return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1; + } + + /** + * Finds a supported framework type if it exists and returns it + * + * @param string $type + * @return string|false + */ + protected function findFrameworkType($type) + { + krsort($this->supportedTypes); + + foreach ($this->supportedTypes as $key => $val) { + if ($key === substr($type, 0, strlen($key))) { + return substr($type, 0, strlen($key)); + } + } + + return false; + } + + /** + * Get the second part of the regular expression to check for support of a + * package type + * + * @param string $frameworkType + * @return string + */ + protected function getLocationPattern($frameworkType) + { + $pattern = false; + if (!empty($this->supportedTypes[$frameworkType])) { + $frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType]; + /** @var BaseInstaller $framework */ + $framework = new $frameworkClass(null, $this->composer, $this->getIO()); + $locations = array_keys($framework->getLocations()); + $pattern = $locations ? '(' . implode('|', $locations) . ')' : false; + } + + return $pattern ? : '(\w+)'; + } + + /** + * Get I/O object + * + * @return IOInterface + */ + private function getIO() + { + return $this->io; + } + + /** + * Look for installers set to be disabled in composer's extra config and + * remove them from the list of supported installers. + * + * Globals: + * - true, "all", and "*" - disable all installers. + * - false - enable all installers (useful with + * wikimedia/composer-merge-plugin or similar) + * + * @return void + */ + protected function removeDisabledInstallers() + { + $extra = $this->composer->getPackage()->getExtra(); + + if (!isset($extra['installer-disable']) || $extra['installer-disable'] === false) { + // No installers are disabled + return; + } + + // Get installers to disable + $disable = $extra['installer-disable']; + + // Ensure $disabled is an array + if (!is_array($disable)) { + $disable = array($disable); + } + + // Check which installers should be disabled + $all = array(true, "all", "*"); + $intersect = array_intersect($all, $disable); + if (!empty($intersect)) { + // Disable all installers + $this->supportedTypes = array(); + } else { + // Disable specified installers + foreach ($disable as $key => $installer) { + if (is_string($installer) && key_exists($installer, $this->supportedTypes)) { + unset($this->supportedTypes[$installer]); + } + } + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ItopInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ItopInstaller.php new file mode 100644 index 000000000..c6c1b3374 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ItopInstaller.php @@ -0,0 +1,9 @@ + 'extensions/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php new file mode 100644 index 000000000..9ee775965 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php @@ -0,0 +1,15 @@ + 'components/{$name}/', + 'module' => 'modules/{$name}/', + 'template' => 'templates/{$name}/', + 'plugin' => 'plugins/{$name}/', + 'library' => 'libraries/{$name}/', + ); + + // TODO: Add inflector for mod_ and com_ names +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php new file mode 100644 index 000000000..9cb7b8cdb --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php @@ -0,0 +1,18 @@ + 'plugins/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php new file mode 100644 index 000000000..36b2f84a7 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php @@ -0,0 +1,11 @@ + 'site/plugins/{$name}/', + 'field' => 'site/fields/{$name}/', + 'tag' => 'site/tags/{$name}/' + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php new file mode 100644 index 000000000..c5d08c5f9 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php @@ -0,0 +1,11 @@ + 'IdnoPlugins/{$name}/', + 'theme' => 'Themes/{$name}/', + 'console' => 'ConsolePlugins/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php new file mode 100644 index 000000000..7143e232b --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php @@ -0,0 +1,10 @@ + 'cms/plugins/{$name}/', + 'media' => 'cms/media/vendor/{$name}/' + ); +} \ No newline at end of file diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php new file mode 100644 index 000000000..dcd6d2632 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php @@ -0,0 +1,9 @@ + 'modules/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php new file mode 100644 index 000000000..903143a55 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php @@ -0,0 +1,27 @@ + 'plugins/{$name}/', + 'template' => 'templates/{$name}/', + 'document-template' => 'documents/templates/{$name}/', + 'userpanel-module' => 'userpanel/modules/{$name}/', + ); + + /** + * Format package name to CamelCase + */ + public function inflectPackageVars($vars) + { + $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } + +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php new file mode 100644 index 000000000..be4d53a7b --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php @@ -0,0 +1,9 @@ + 'libraries/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php new file mode 100644 index 000000000..412c0b5c0 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php @@ -0,0 +1,10 @@ + 'packages/{$vendor}/{$name}/', + 'theme' => 'public/themes/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php new file mode 100644 index 000000000..47bbd4cab --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php @@ -0,0 +1,10 @@ + 'libraries/{$name}/', + 'source' => 'libraries/_source/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php new file mode 100644 index 000000000..9c2e9fb40 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php @@ -0,0 +1,9 @@ + 'modules/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php new file mode 100644 index 000000000..5a664608d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php @@ -0,0 +1,16 @@ + 'assets/snippets/{$name}/', + 'plugin' => 'assets/plugins/{$name}/', + 'module' => 'assets/modules/{$name}/', + 'template' => 'assets/templates/{$name}/', + 'lib' => 'assets/lib/{$name}/' + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php new file mode 100644 index 000000000..cf18e9478 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php @@ -0,0 +1,11 @@ + 'app/design/frontend/{$name}/', + 'skin' => 'skin/frontend/default/{$name}/', + 'library' => 'lib/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php new file mode 100644 index 000000000..e463756fa --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php @@ -0,0 +1,37 @@ + 'plugins/{$name}/', + ); + + /** + * Transforms the names + * @param array $vars + * @return array + */ + public function inflectPackageVars($vars) + { + return $this->correctPluginName($vars); + } + + /** + * Change hyphenated names to camelcase + * @param array $vars + * @return array + */ + private function correctPluginName($vars) + { + $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) { + return strtoupper($matches[0][1]); + }, $vars['name']); + $vars['name'] = ucfirst($camelCasedName); + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MakoInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MakoInstaller.php new file mode 100644 index 000000000..ca3cfacb4 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MakoInstaller.php @@ -0,0 +1,9 @@ + 'app/packages/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php new file mode 100644 index 000000000..dadb1dbbc --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php @@ -0,0 +1,23 @@ + 'plugins/{$name}/', + ); + + /** + * Format package name to CamelCase + */ + public function inflectPackageVars($vars) + { + $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php new file mode 100644 index 000000000..3e1ce2b2d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php @@ -0,0 +1,25 @@ + 'plugins/{$name}/', + 'theme' => 'themes/{$name}/', + ); + + /** + * Format package name of mautic-plugins to CamelCase + */ + public function inflectPackageVars($vars) + { + if ($vars['type'] == 'mautic-plugin') { + $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) { + return strtoupper($matches[0][1]); + }, ucfirst($vars['name'])); + } + + return $vars; + } + +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php new file mode 100644 index 000000000..30a91676d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php @@ -0,0 +1,33 @@ + 'modules/{$name}/', + ); + + /** + * Format package name. + * + * For package type maya-module, cut off a trailing '-module' if present. + * + */ + public function inflectPackageVars($vars) + { + if ($vars['type'] === 'maya-module') { + return $this->inflectModuleVars($vars); + } + + return $vars; + } + + protected function inflectModuleVars($vars) + { + $vars['name'] = preg_replace('/-module$/', '', $vars['name']); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php new file mode 100644 index 000000000..f5a8957ef --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php @@ -0,0 +1,51 @@ + 'core/', + 'extension' => 'extensions/{$name}/', + 'skin' => 'skins/{$name}/', + ); + + /** + * Format package name. + * + * For package type mediawiki-extension, cut off a trailing '-extension' if present and transform + * to CamelCase keeping existing uppercase chars. + * + * For package type mediawiki-skin, cut off a trailing '-skin' if present. + * + */ + public function inflectPackageVars($vars) + { + + if ($vars['type'] === 'mediawiki-extension') { + return $this->inflectExtensionVars($vars); + } + + if ($vars['type'] === 'mediawiki-skin') { + return $this->inflectSkinVars($vars); + } + + return $vars; + } + + protected function inflectExtensionVars($vars) + { + $vars['name'] = preg_replace('/-extension$/', '', $vars['name']); + $vars['name'] = str_replace('-', ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } + + protected function inflectSkinVars($vars) + { + $vars['name'] = preg_replace('/-skin$/', '', $vars['name']); + + return $vars; + } + +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php new file mode 100644 index 000000000..b7d970392 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php @@ -0,0 +1,119 @@ + 'userfiles/modules/{$install_item_dir}/', + 'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/', + 'template' => 'userfiles/templates/{$install_item_dir}/', + 'element' => 'userfiles/elements/{$install_item_dir}/', + 'vendor' => 'vendor/{$install_item_dir}/', + 'components' => 'components/{$install_item_dir}/' + ); + + /** + * Format package name. + * + * For package type microweber-module, cut off a trailing '-module' if present + * + * For package type microweber-template, cut off a trailing '-template' if present. + * + */ + public function inflectPackageVars($vars) + { + + + if ($this->package->getTargetDir()) { + $vars['install_item_dir'] = $this->package->getTargetDir(); + } else { + $vars['install_item_dir'] = $vars['name']; + if ($vars['type'] === 'microweber-template') { + return $this->inflectTemplateVars($vars); + } + if ($vars['type'] === 'microweber-templates') { + return $this->inflectTemplatesVars($vars); + } + if ($vars['type'] === 'microweber-core') { + return $this->inflectCoreVars($vars); + } + if ($vars['type'] === 'microweber-adapter') { + return $this->inflectCoreVars($vars); + } + if ($vars['type'] === 'microweber-module') { + return $this->inflectModuleVars($vars); + } + if ($vars['type'] === 'microweber-modules') { + return $this->inflectModulesVars($vars); + } + if ($vars['type'] === 'microweber-skin') { + return $this->inflectSkinVars($vars); + } + if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') { + return $this->inflectElementVars($vars); + } + } + + + return $vars; + } + + protected function inflectTemplateVars($vars) + { + $vars['install_item_dir'] = preg_replace('/-template$/', '', $vars['install_item_dir']); + $vars['install_item_dir'] = preg_replace('/template-$/', '', $vars['install_item_dir']); + + return $vars; + } + + protected function inflectTemplatesVars($vars) + { + $vars['install_item_dir'] = preg_replace('/-templates$/', '', $vars['install_item_dir']); + $vars['install_item_dir'] = preg_replace('/templates-$/', '', $vars['install_item_dir']); + + return $vars; + } + + protected function inflectCoreVars($vars) + { + $vars['install_item_dir'] = preg_replace('/-providers$/', '', $vars['install_item_dir']); + $vars['install_item_dir'] = preg_replace('/-provider$/', '', $vars['install_item_dir']); + $vars['install_item_dir'] = preg_replace('/-adapter$/', '', $vars['install_item_dir']); + + return $vars; + } + + protected function inflectModuleVars($vars) + { + $vars['install_item_dir'] = preg_replace('/-module$/', '', $vars['install_item_dir']); + $vars['install_item_dir'] = preg_replace('/module-$/', '', $vars['install_item_dir']); + + return $vars; + } + + protected function inflectModulesVars($vars) + { + $vars['install_item_dir'] = preg_replace('/-modules$/', '', $vars['install_item_dir']); + $vars['install_item_dir'] = preg_replace('/modules-$/', '', $vars['install_item_dir']); + + return $vars; + } + + protected function inflectSkinVars($vars) + { + $vars['install_item_dir'] = preg_replace('/-skin$/', '', $vars['install_item_dir']); + $vars['install_item_dir'] = preg_replace('/skin-$/', '', $vars['install_item_dir']); + + return $vars; + } + + protected function inflectElementVars($vars) + { + $vars['install_item_dir'] = preg_replace('/-elements$/', '', $vars['install_item_dir']); + $vars['install_item_dir'] = preg_replace('/elements-$/', '', $vars['install_item_dir']); + $vars['install_item_dir'] = preg_replace('/-element$/', '', $vars['install_item_dir']); + $vars['install_item_dir'] = preg_replace('/element-$/', '', $vars['install_item_dir']); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php new file mode 100644 index 000000000..0ee140abf --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php @@ -0,0 +1,12 @@ + 'core/packages/{$name}/' + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php new file mode 100644 index 000000000..05317995f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php @@ -0,0 +1,59 @@ + 'mod/{$name}/', + 'admin_report' => 'admin/report/{$name}/', + 'atto' => 'lib/editor/atto/plugins/{$name}/', + 'tool' => 'admin/tool/{$name}/', + 'assignment' => 'mod/assignment/type/{$name}/', + 'assignsubmission' => 'mod/assign/submission/{$name}/', + 'assignfeedback' => 'mod/assign/feedback/{$name}/', + 'auth' => 'auth/{$name}/', + 'availability' => 'availability/condition/{$name}/', + 'block' => 'blocks/{$name}/', + 'booktool' => 'mod/book/tool/{$name}/', + 'cachestore' => 'cache/stores/{$name}/', + 'cachelock' => 'cache/locks/{$name}/', + 'calendartype' => 'calendar/type/{$name}/', + 'fileconverter' => 'files/converter/{$name}/', + 'format' => 'course/format/{$name}/', + 'coursereport' => 'course/report/{$name}/', + 'customcertelement' => 'mod/customcert/element/{$name}/', + 'datafield' => 'mod/data/field/{$name}/', + 'datapreset' => 'mod/data/preset/{$name}/', + 'editor' => 'lib/editor/{$name}/', + 'enrol' => 'enrol/{$name}/', + 'filter' => 'filter/{$name}/', + 'gradeexport' => 'grade/export/{$name}/', + 'gradeimport' => 'grade/import/{$name}/', + 'gradereport' => 'grade/report/{$name}/', + 'gradingform' => 'grade/grading/form/{$name}/', + 'local' => 'local/{$name}/', + 'logstore' => 'admin/tool/log/store/{$name}/', + 'ltisource' => 'mod/lti/source/{$name}/', + 'ltiservice' => 'mod/lti/service/{$name}/', + 'message' => 'message/output/{$name}/', + 'mnetservice' => 'mnet/service/{$name}/', + 'plagiarism' => 'plagiarism/{$name}/', + 'portfolio' => 'portfolio/{$name}/', + 'qbehaviour' => 'question/behaviour/{$name}/', + 'qformat' => 'question/format/{$name}/', + 'qtype' => 'question/type/{$name}/', + 'quizaccess' => 'mod/quiz/accessrule/{$name}/', + 'quiz' => 'mod/quiz/report/{$name}/', + 'report' => 'report/{$name}/', + 'repository' => 'repository/{$name}/', + 'scormreport' => 'mod/scorm/report/{$name}/', + 'search' => 'search/engine/{$name}/', + 'theme' => 'theme/{$name}/', + 'tinymce' => 'lib/editor/tinymce/plugins/{$name}/', + 'profilefield' => 'user/profile/field/{$name}/', + 'webservice' => 'webservice/{$name}/', + 'workshopallocation' => 'mod/workshop/allocation/{$name}/', + 'workshopeval' => 'mod/workshop/eval/{$name}/', + 'workshopform' => 'mod/workshop/form/{$name}/' + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php new file mode 100644 index 000000000..08d5dc4e7 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php @@ -0,0 +1,47 @@ + 'modules/{$name}/', + 'plugin' => 'plugins/{$vendor}/{$name}/', + 'theme' => 'themes/{$name}/' + ); + + /** + * Format package name. + * + * For package type october-plugin, cut off a trailing '-plugin' if present. + * + * For package type october-theme, cut off a trailing '-theme' if present. + * + */ + public function inflectPackageVars($vars) + { + if ($vars['type'] === 'october-plugin') { + return $this->inflectPluginVars($vars); + } + + if ($vars['type'] === 'october-theme') { + return $this->inflectThemeVars($vars); + } + + return $vars; + } + + protected function inflectPluginVars($vars) + { + $vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']); + $vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']); + + return $vars; + } + + protected function inflectThemeVars($vars) + { + $vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php new file mode 100644 index 000000000..5dd3438d9 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php @@ -0,0 +1,24 @@ + 'extensions/{$name}/', + 'theme' => 'extensions/themes/{$name}/', + 'translation' => 'extensions/translations/{$name}/', + ); + + /** + * Format package name to lower case and remove ".ontowiki" suffix + */ + public function inflectPackageVars($vars) + { + $vars['name'] = strtolower($vars['name']); + $vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']); + $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); + $vars['name'] = preg_replace('/-translation$/', '', $vars['name']); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php new file mode 100644 index 000000000..3ca7954c9 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php @@ -0,0 +1,14 @@ + 'oc-content/plugins/{$name}/', + 'theme' => 'oc-content/themes/{$name}/', + 'language' => 'oc-content/languages/{$name}/', + ); + +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php new file mode 100644 index 000000000..1797a22cf --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php @@ -0,0 +1,59 @@ +.+)\/.+/'; + + protected $locations = array( + 'module' => 'modules/{$name}/', + 'theme' => 'application/views/{$name}/', + 'out' => 'out/{$name}/', + ); + + /** + * getInstallPath + * + * @param PackageInterface $package + * @param string $frameworkType + * @return string + */ + public function getInstallPath(PackageInterface $package, $frameworkType = '') + { + $installPath = parent::getInstallPath($package, $frameworkType); + $type = $this->package->getType(); + if ($type === 'oxid-module') { + $this->prepareVendorDirectory($installPath); + } + return $installPath; + } + + /** + * prepareVendorDirectory + * + * Makes sure there is a vendormetadata.php file inside + * the vendor folder if there is a vendor folder. + * + * @param string $installPath + * @return void + */ + protected function prepareVendorDirectory($installPath) + { + $matches = ''; + $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches); + if (!$hasVendorDirectory) { + return; + } + + $vendorDirectory = $matches['vendor']; + $vendorPath = getcwd() . '/modules/' . $vendorDirectory; + if (!file_exists($vendorPath)) { + mkdir($vendorPath, 0755, true); + } + + $vendorMetaDataPath = $vendorPath . '/vendormetadata.php'; + touch($vendorMetaDataPath); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php new file mode 100644 index 000000000..170136f98 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php @@ -0,0 +1,9 @@ + 'modules/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php new file mode 100644 index 000000000..4e59a8a74 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php @@ -0,0 +1,11 @@ + 'bundles/{$name}/', + 'library' => 'libraries/{$name}/', + 'framework' => 'frameworks/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php new file mode 100644 index 000000000..deb2b77a6 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php @@ -0,0 +1,11 @@ + 'ext/{$vendor}/{$name}/', + 'language' => 'language/{$name}/', + 'style' => 'styles/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php new file mode 100644 index 000000000..4781fa6d1 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php @@ -0,0 +1,21 @@ + 'plugins/{$name}/', + ); + + /** + * Format package name to CamelCase + */ + public function inflectPackageVars($vars) + { + $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php new file mode 100644 index 000000000..c17f4572b --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php @@ -0,0 +1,32 @@ + 'plugins/{$name}/', + ); + + /** + * Format package name to CamelCase + * @param array $vars + * + * @return array + */ + public function inflectPackageVars($vars) + { + $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php new file mode 100644 index 000000000..903e55f62 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php @@ -0,0 +1,29 @@ + '{$name}/' + ); + + /** + * Remove hyphen, "plugin" and format to camelcase + * @param array $vars + * + * @return array + */ + public function inflectPackageVars($vars) + { + $vars['name'] = explode("-", $vars['name']); + foreach ($vars['name'] as $key => $name) { + $vars['name'][$key] = ucfirst($vars['name'][$key]); + if (strcasecmp($name, "Plugin") == 0) { + unset($vars['name'][$key]); + } + } + $vars['name'] = implode("",$vars['name']); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Plugin.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Plugin.php new file mode 100644 index 000000000..e60da0e7f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Plugin.php @@ -0,0 +1,27 @@ +installer = new Installer($io, $composer); + $composer->getInstallationManager()->addInstaller($this->installer); + } + + public function deactivate(Composer $composer, IOInterface $io) + { + $composer->getInstallationManager()->removeInstaller($this->installer); + } + + public function uninstall(Composer $composer, IOInterface $io) + { + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PortoInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PortoInstaller.php new file mode 100644 index 000000000..dbf85e635 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PortoInstaller.php @@ -0,0 +1,9 @@ + 'app/Containers/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php new file mode 100644 index 000000000..4c8421e36 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php @@ -0,0 +1,10 @@ + 'modules/{$name}/', + 'theme' => 'themes/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php new file mode 100644 index 000000000..e6834a0ca --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php @@ -0,0 +1,22 @@ + 'site/modules/{$name}/', + ); + + /** + * Format package name to CamelCase + */ + public function inflectPackageVars($vars) + { + $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php new file mode 100644 index 000000000..77cc3dd87 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php @@ -0,0 +1,11 @@ + 'modules/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php new file mode 100644 index 000000000..65510580e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php @@ -0,0 +1,63 @@ + 'app/Modules/{$name}/', + 'theme' => 'themes/{$name}/', + ); + + /** + * Format package name. + * + * @param array $vars + * + * @return array + */ + public function inflectPackageVars($vars) + { + if ($vars['type'] === 'pxcms-module') { + return $this->inflectModuleVars($vars); + } + + if ($vars['type'] === 'pxcms-theme') { + return $this->inflectThemeVars($vars); + } + + return $vars; + } + + /** + * For package type pxcms-module, cut off a trailing '-plugin' if present. + * + * return string + */ + protected function inflectModuleVars($vars) + { + $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy) + $vars['name'] = str_replace('module-', '', $vars['name']); // strip out module- + $vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module + $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s + $vars['name'] = ucwords($vars['name']); // make module name camelcased + + return $vars; + } + + + /** + * For package type pxcms-module, cut off a trailing '-plugin' if present. + * + * return string + */ + protected function inflectThemeVars($vars) + { + $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy) + $vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme- + $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme + $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s + $vars['name'] = ucwords($vars['name']); // make module name camelcased + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php new file mode 100644 index 000000000..0f78b5ca6 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php @@ -0,0 +1,24 @@ + 'src/{$name}/' + ); + + /** + * Format package name to CamelCase + */ + public function inflectPackageVars($vars) + { + $nameParts = explode('/', $vars['name']); + foreach ($nameParts as &$value) { + $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value)); + $value = str_replace(array('-', '_'), ' ', $value); + $value = str_replace(' ', '', ucwords($value)); + } + $vars['name'] = implode('/', $nameParts); + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php new file mode 100644 index 000000000..252c7339f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php @@ -0,0 +1,10 @@ + 'themes/{$name}/', + 'plugin' => 'plugins/{$name}/' + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php new file mode 100644 index 000000000..23a20347e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php @@ -0,0 +1,10 @@ + 'redaxo/src/addons/{$name}/', + 'bestyle-plugin' => 'redaxo/src/addons/be_style/plugins/{$name}/' + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php new file mode 100644 index 000000000..09544576b --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php @@ -0,0 +1,10 @@ + 'redaxo/include/addons/{$name}/', + 'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/' + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php new file mode 100644 index 000000000..d8d795be0 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php @@ -0,0 +1,22 @@ + 'plugins/{$name}/', + ); + + /** + * Lowercase name and changes the name to a underscores + * + * @param array $vars + * @return array + */ + public function inflectPackageVars($vars) + { + $vars['name'] = strtolower(str_replace('-', '_', $vars['name'])); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php new file mode 100644 index 000000000..1acd3b14c --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php @@ -0,0 +1,10 @@ + 'Sources/{$name}/', + 'theme' => 'Themes/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php new file mode 100644 index 000000000..7d20d27a2 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php @@ -0,0 +1,60 @@ + 'engine/Shopware/Plugins/Local/Backend/{$name}/', + 'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/', + 'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/', + 'theme' => 'templates/{$name}/', + 'plugin' => 'custom/plugins/{$name}/', + 'frontend-theme' => 'themes/Frontend/{$name}/', + ); + + /** + * Transforms the names + * @param array $vars + * @return array + */ + public function inflectPackageVars($vars) + { + if ($vars['type'] === 'shopware-theme') { + return $this->correctThemeName($vars); + } + + return $this->correctPluginName($vars); + } + + /** + * Changes the name to a camelcased combination of vendor and name + * @param array $vars + * @return array + */ + private function correctPluginName($vars) + { + $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) { + return strtoupper($matches[0][1]); + }, $vars['name']); + + $vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName); + + return $vars; + } + + /** + * Changes the name to a underscore separated name + * @param array $vars + * @return array + */ + private function correctThemeName($vars) + { + $vars['name'] = str_replace('-', '_', $vars['name']); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php new file mode 100644 index 000000000..81910e9f1 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php @@ -0,0 +1,35 @@ + '{$name}/', + 'theme' => 'themes/{$name}/', + ); + + /** + * Return the install path based on package type. + * + * Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework + * must be installed to 'sapphire' and not 'framework' if the version is <3.0.0 + * + * @param PackageInterface $package + * @param string $frameworkType + * @return string + */ + public function getInstallPath(PackageInterface $package, $frameworkType = '') + { + if ( + $package->getName() == 'silverstripe/framework' + && preg_match('/^\d+\.\d+\.\d+/', $package->getVersion()) + && version_compare($package->getVersion(), '2.999.999') < 0 + ) { + return $this->templatePath($this->locations['module'], array('name' => 'sapphire')); + } + + return parent::getInstallPath($package, $frameworkType); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php new file mode 100644 index 000000000..762d94c68 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php @@ -0,0 +1,25 @@ + 'modules/{$vendor}/{$name}/', + 'plugin' => 'plugins/{$vendor}/{$name}/' + ); + + public function inflectPackageVars($vars) + { + return $this->parseVars($vars); + } + + protected function parseVars($vars) + { + $vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor']; + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php new file mode 100644 index 000000000..a31c9fda0 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php @@ -0,0 +1,12 @@ + 'modules/{$name}/', + 'theme' => 'themes/{$name}/', + 'custom-module' => 'app/modules/{$name}/', + 'custom-theme' => 'app/themes/{$name}/' + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php new file mode 100644 index 000000000..8626a9bc2 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php @@ -0,0 +1,47 @@ + 'app/modules/{$name}/', + 'theme' => 'themes/{$name}/', + ); + + /** + * Format module name. + * + * Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present. + * + * {@inerhitDoc} + */ + public function inflectPackageVars($vars) + { + if ($vars['type'] == 'sydes-module') { + return $this->inflectModuleVars($vars); + } + + if ($vars['type'] === 'sydes-theme') { + return $this->inflectThemeVars($vars); + } + + return $vars; + } + + public function inflectModuleVars($vars) + { + $vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } + + protected function inflectThemeVars($vars) + { + $vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']); + $vars['name'] = strtolower($vars['name']); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php new file mode 100644 index 000000000..4357a35bb --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php @@ -0,0 +1,9 @@ + 'themes/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php new file mode 100644 index 000000000..1675c4f21 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php @@ -0,0 +1,26 @@ + + */ +class Symfony1Installer extends BaseInstaller +{ + protected $locations = array( + 'plugin' => 'plugins/{$name}/', + ); + + /** + * Format package name to CamelCase + */ + public function inflectPackageVars($vars) + { + $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) { + return strtoupper($matches[0][1]); + }, $vars['name']); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php new file mode 100644 index 000000000..b1663e843 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php @@ -0,0 +1,16 @@ + + */ +class TYPO3CmsInstaller extends BaseInstaller +{ + protected $locations = array( + 'extension' => 'typo3conf/ext/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php new file mode 100644 index 000000000..42572f44f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php @@ -0,0 +1,38 @@ + 'Packages/Application/{$name}/', + 'framework' => 'Packages/Framework/{$name}/', + 'plugin' => 'Packages/Plugins/{$name}/', + 'site' => 'Packages/Sites/{$name}/', + 'boilerplate' => 'Packages/Boilerplates/{$name}/', + 'build' => 'Build/{$name}/', + ); + + /** + * Modify the package name to be a TYPO3 Flow style key. + * + * @param array $vars + * @return array + */ + public function inflectPackageVars($vars) + { + $autoload = $this->package->getAutoload(); + if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) { + $namespace = key($autoload['psr-0']); + $vars['name'] = str_replace('\\', '.', $namespace); + } + if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) { + $namespace = key($autoload['psr-4']); + $vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.'); + } + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php new file mode 100644 index 000000000..4f79a45f9 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php @@ -0,0 +1,30 @@ + '{$name}' + ); + + public function inflectPackageVars($vars) + { + $extra = $this->package->getExtra(); + + if (array_key_exists(self::EXTRA_TAO_EXTENSION_NAME, $extra)) { + $vars['name'] = $extra[self::EXTRA_TAO_EXTENSION_NAME]; + return $vars; + } + + $vars['name'] = str_replace('extension-', '', $vars['name']); + $vars['name'] = str_replace('-', ' ', $vars['name']); + $vars['name'] = lcfirst(str_replace(' ', '', ucwords($vars['name']))); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php new file mode 100644 index 000000000..158af5261 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php @@ -0,0 +1,12 @@ + 'local/modules/{$name}/', + 'frontoffice-template' => 'templates/frontOffice/{$name}/', + 'backoffice-template' => 'templates/backOffice/{$name}/', + 'email-template' => 'templates/email/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php new file mode 100644 index 000000000..7c0113b85 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php @@ -0,0 +1,14 @@ + + */ + class TuskInstaller extends BaseInstaller + { + protected $locations = array( + 'task' => '.tusk/tasks/{$name}/', + 'command' => '.tusk/commands/{$name}/', + 'asset' => 'assets/tusk/{$name}/', + ); + } diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php new file mode 100644 index 000000000..fcb414ab7 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php @@ -0,0 +1,9 @@ + 'app/sprinkles/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php new file mode 100644 index 000000000..24ca64512 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php @@ -0,0 +1,10 @@ + 'plugins/{$name}/', + 'theme' => 'themes/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php new file mode 100644 index 000000000..7d90c5e6e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php @@ -0,0 +1,49 @@ + 'src/{$vendor}/{$name}/', + 'theme' => 'themes/{$name}/' + ); + + /** + * Format package name. + * + * For package type vgmcp-bundle, cut off a trailing '-bundle' if present. + * + * For package type vgmcp-theme, cut off a trailing '-theme' if present. + * + */ + public function inflectPackageVars($vars) + { + if ($vars['type'] === 'vgmcp-bundle') { + return $this->inflectPluginVars($vars); + } + + if ($vars['type'] === 'vgmcp-theme') { + return $this->inflectThemeVars($vars); + } + + return $vars; + } + + protected function inflectPluginVars($vars) + { + $vars['name'] = preg_replace('/-bundle$/', '', $vars['name']); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } + + protected function inflectThemeVars($vars) + { + $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php new file mode 100644 index 000000000..b65dbbafd --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php @@ -0,0 +1,21 @@ + 'modules/addons/{$vendor}_{$name}/', + 'fraud' => 'modules/fraud/{$vendor}_{$name}/', + 'gateways' => 'modules/gateways/{$vendor}_{$name}/', + 'notifications' => 'modules/notifications/{$vendor}_{$name}/', + 'registrars' => 'modules/registrars/{$vendor}_{$name}/', + 'reports' => 'modules/reports/{$vendor}_{$name}/', + 'security' => 'modules/security/{$vendor}_{$name}/', + 'servers' => 'modules/servers/{$vendor}_{$name}/', + 'social' => 'modules/social/{$vendor}_{$name}/', + 'support' => 'modules/support/{$vendor}_{$name}/', + 'templates' => 'templates/{$vendor}_{$name}/', + 'includes' => 'includes/{$vendor}_{$name}/' + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php new file mode 100644 index 000000000..cb387881d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php @@ -0,0 +1,9 @@ + 'wolf/plugins/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php new file mode 100644 index 000000000..91c46ad99 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php @@ -0,0 +1,12 @@ + 'wp-content/plugins/{$name}/', + 'theme' => 'wp-content/themes/{$name}/', + 'muplugin' => 'wp-content/mu-plugins/{$name}/', + 'dropin' => 'wp-content/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php new file mode 100644 index 000000000..27f429ff2 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php @@ -0,0 +1,32 @@ + 'module/{$name}/', + ); + + /** + * Format package name to CamelCase + * @param array $vars + * + * @return array + */ + public function inflectPackageVars($vars) + { + $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } +} \ No newline at end of file diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php new file mode 100644 index 000000000..bde9bc8c8 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php @@ -0,0 +1,11 @@ + 'library/{$name}/', + 'extra' => 'extras/library/{$name}/', + 'module' => 'module/{$name}/', + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php new file mode 100644 index 000000000..56cdf5da7 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php @@ -0,0 +1,10 @@ + 'modules/{$vendor}-{$name}/', + 'theme' => 'themes/{$vendor}-{$name}/' + ); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/bootstrap.php b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/bootstrap.php new file mode 100644 index 000000000..0de276ee2 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/composer/installers/src/bootstrap.php @@ -0,0 +1,13 @@ +withPath('foo')->withHost('example.com')` will throw an exception + because the path of a URI with an authority must start with a slash "/" or be empty + - `(new Uri())->withScheme('http')` will return `'http://localhost'` + +### Deprecated + +- `Uri::resolve` in favor of `UriResolver::resolve` +- `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` + +### Fixed + +- `Stream::read` when length parameter <= 0. +- `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory. +- `ServerRequest::getUriFromGlobals` when `Host` header contains port. +- Compatibility of URIs with `file` scheme and empty host. + + +## [1.3.1] - 2016-06-25 + +### Fixed + +- `Uri::__toString` for network path references, e.g. `//example.org`. +- Missing lowercase normalization for host. +- Handling of URI components in case they are `'0'` in a lot of places, + e.g. as a user info password. +- `Uri::withAddedHeader` to correctly merge headers with different case. +- Trimming of header values in `Uri::withAddedHeader`. Header values may + be surrounded by whitespace which should be ignored according to RFC 7230 + Section 3.2.4. This does not apply to header names. +- `Uri::withAddedHeader` with an array of header values. +- `Uri::resolve` when base path has no slash and handling of fragment. +- Handling of encoding in `Uri::with(out)QueryValue` so one can pass the + key/value both in encoded as well as decoded form to those methods. This is + consistent with withPath, withQuery etc. +- `ServerRequest::withoutAttribute` when attribute value is null. + + +## [1.3.0] - 2016-04-13 + +### Added + +- Remaining interfaces needed for full PSR7 compatibility + (ServerRequestInterface, UploadedFileInterface, etc.). +- Support for stream_for from scalars. + +### Changed + +- Can now extend Uri. + +### Fixed +- A bug in validating request methods by making it more permissive. + + +## [1.2.3] - 2016-02-18 + +### Fixed + +- Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote + streams, which can sometimes return fewer bytes than requested with `fread`. +- Handling of gzipped responses with FNAME headers. + + +## [1.2.2] - 2016-01-22 + +### Added + +- Support for URIs without any authority. +- Support for HTTP 451 'Unavailable For Legal Reasons.' +- Support for using '0' as a filename. +- Support for including non-standard ports in Host headers. + + +## [1.2.1] - 2015-11-02 + +### Changes + +- Now supporting negative offsets when seeking to SEEK_END. + + +## [1.2.0] - 2015-08-15 + +### Changed + +- Body as `"0"` is now properly added to a response. +- Now allowing forward seeking in CachingStream. +- Now properly parsing HTTP requests that contain proxy targets in + `parse_request`. +- functions.php is now conditionally required. +- user-info is no longer dropped when resolving URIs. + + +## [1.1.0] - 2015-06-24 + +### Changed + +- URIs can now be relative. +- `multipart/form-data` headers are now overridden case-insensitively. +- URI paths no longer encode the following characters because they are allowed + in URIs: "(", ")", "*", "!", "'" +- A port is no longer added to a URI when the scheme is missing and no port is + present. + + +## 1.0.0 - 2015-05-19 + +Initial release. + +Currently unsupported: + +- `Psr\Http\Message\ServerRequestInterface` +- `Psr\Http\Message\UploadedFileInterface` + + + +[Unreleased]: https://github.com/guzzle/psr7/compare/1.6.0...HEAD +[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0 +[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2 +[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1 +[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0 +[1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2 +[1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1 +[1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0 +[1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1 +[1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0 +[1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3 +[1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2 +[1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1 +[1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0 diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/LICENSE b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/LICENSE new file mode 100644 index 000000000..581d95f92 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling + +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. diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/README.md b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/README.md new file mode 100644 index 000000000..acfabfdcb --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/README.md @@ -0,0 +1,809 @@ +# PSR-7 Message Implementation + +This repository contains a full [PSR-7](http://www.php-fig.org/psr/psr-7/) +message implementation, several stream decorators, and some helpful +functionality like query string parsing. + + +[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7) + + +# Stream implementation + +This package comes with a number of stream implementations and stream +decorators. + + +## AppendStream + +`GuzzleHttp\Psr7\AppendStream` + +Reads from multiple streams, one after the other. + +```php +use GuzzleHttp\Psr7; + +$a = Psr7\Utils::streamFor('abc, '); +$b = Psr7\Utils::streamFor('123.'); +$composed = new Psr7\AppendStream([$a, $b]); + +$composed->addStream(Psr7\Utils::streamFor(' Above all listen to me')); + +echo $composed; // abc, 123. Above all listen to me. +``` + + +## BufferStream + +`GuzzleHttp\Psr7\BufferStream` + +Provides a buffer stream that can be written to fill a buffer, and read +from to remove bytes from the buffer. + +This stream returns a "hwm" metadata value that tells upstream consumers +what the configured high water mark of the stream is, or the maximum +preferred size of the buffer. + +```php +use GuzzleHttp\Psr7; + +// When more than 1024 bytes are in the buffer, it will begin returning +// false to writes. This is an indication that writers should slow down. +$buffer = new Psr7\BufferStream(1024); +``` + + +## CachingStream + +The CachingStream is used to allow seeking over previously read bytes on +non-seekable streams. This can be useful when transferring a non-seekable +entity body fails due to needing to rewind the stream (for example, resulting +from a redirect). Data that is read from the remote stream will be buffered in +a PHP temp stream so that previously read bytes are cached first in memory, +then on disk. + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\Utils::streamFor(fopen('http://www.google.com', 'r')); +$stream = new Psr7\CachingStream($original); + +$stream->read(1024); +echo $stream->tell(); +// 1024 + +$stream->seek(0); +echo $stream->tell(); +// 0 +``` + + +## DroppingStream + +`GuzzleHttp\Psr7\DroppingStream` + +Stream decorator that begins dropping data once the size of the underlying +stream becomes too full. + +```php +use GuzzleHttp\Psr7; + +// Create an empty stream +$stream = Psr7\Utils::streamFor(); + +// Start dropping data when the stream has more than 10 bytes +$dropping = new Psr7\DroppingStream($stream, 10); + +$dropping->write('01234567890123456789'); +echo $stream; // 0123456789 +``` + + +## FnStream + +`GuzzleHttp\Psr7\FnStream` + +Compose stream implementations based on a hash of functions. + +Allows for easy testing and extension of a provided stream without needing +to create a concrete class for a simple extension point. + +```php + +use GuzzleHttp\Psr7; + +$stream = Psr7\Utils::streamFor('hi'); +$fnStream = Psr7\FnStream::decorate($stream, [ + 'rewind' => function () use ($stream) { + echo 'About to rewind - '; + $stream->rewind(); + echo 'rewound!'; + } +]); + +$fnStream->rewind(); +// Outputs: About to rewind - rewound! +``` + + +## InflateStream + +`GuzzleHttp\Psr7\InflateStream` + +Uses PHP's zlib.inflate filter to inflate deflate or gzipped content. + +This stream decorator skips the first 10 bytes of the given stream to remove +the gzip header, converts the provided stream to a PHP stream resource, +then appends the zlib.inflate filter. The stream is then converted back +to a Guzzle stream resource to be used as a Guzzle stream. + + +## LazyOpenStream + +`GuzzleHttp\Psr7\LazyOpenStream` + +Lazily reads or writes to a file that is opened only after an IO operation +take place on the stream. + +```php +use GuzzleHttp\Psr7; + +$stream = new Psr7\LazyOpenStream('/path/to/file', 'r'); +// The file has not yet been opened... + +echo $stream->read(10); +// The file is opened and read from only when needed. +``` + + +## LimitStream + +`GuzzleHttp\Psr7\LimitStream` + +LimitStream can be used to read a subset or slice of an existing stream object. +This can be useful for breaking a large file into smaller pieces to be sent in +chunks (e.g. Amazon S3's multipart upload API). + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\Utils::streamFor(fopen('/tmp/test.txt', 'r+')); +echo $original->getSize(); +// >>> 1048576 + +// Limit the size of the body to 1024 bytes and start reading from byte 2048 +$stream = new Psr7\LimitStream($original, 1024, 2048); +echo $stream->getSize(); +// >>> 1024 +echo $stream->tell(); +// >>> 0 +``` + + +## MultipartStream + +`GuzzleHttp\Psr7\MultipartStream` + +Stream that when read returns bytes for a streaming multipart or +multipart/form-data stream. + + +## NoSeekStream + +`GuzzleHttp\Psr7\NoSeekStream` + +NoSeekStream wraps a stream and does not allow seeking. + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\Utils::streamFor('foo'); +$noSeek = new Psr7\NoSeekStream($original); + +echo $noSeek->read(3); +// foo +var_export($noSeek->isSeekable()); +// false +$noSeek->seek(0); +var_export($noSeek->read(3)); +// NULL +``` + + +## PumpStream + +`GuzzleHttp\Psr7\PumpStream` + +Provides a read only stream that pumps data from a PHP callable. + +When invoking the provided callable, the PumpStream will pass the amount of +data requested to read to the callable. The callable can choose to ignore +this value and return fewer or more bytes than requested. Any extra data +returned by the provided callable is buffered internally until drained using +the read() function of the PumpStream. The provided callable MUST return +false when there is no more data to read. + + +## Implementing stream decorators + +Creating a stream decorator is very easy thanks to the +`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that +implement `Psr\Http\Message\StreamInterface` by proxying to an underlying +stream. Just `use` the `StreamDecoratorTrait` and implement your custom +methods. + +For example, let's say we wanted to call a specific function each time the last +byte is read from a stream. This could be implemented by overriding the +`read()` method. + +```php +use Psr\Http\Message\StreamInterface; +use GuzzleHttp\Psr7\StreamDecoratorTrait; + +class EofCallbackStream implements StreamInterface +{ + use StreamDecoratorTrait; + + private $callback; + + public function __construct(StreamInterface $stream, callable $cb) + { + $this->stream = $stream; + $this->callback = $cb; + } + + public function read($length) + { + $result = $this->stream->read($length); + + // Invoke the callback when EOF is hit. + if ($this->eof()) { + call_user_func($this->callback); + } + + return $result; + } +} +``` + +This decorator could be added to any existing stream and used like so: + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\Utils::streamFor('foo'); + +$eofStream = new EofCallbackStream($original, function () { + echo 'EOF!'; +}); + +$eofStream->read(2); +$eofStream->read(1); +// echoes "EOF!" +$eofStream->seek(0); +$eofStream->read(3); +// echoes "EOF!" +``` + + +## PHP StreamWrapper + +You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a +PSR-7 stream as a PHP stream resource. + +Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP +stream from a PSR-7 stream. + +```php +use GuzzleHttp\Psr7\StreamWrapper; + +$stream = GuzzleHttp\Psr7\Utils::streamFor('hello!'); +$resource = StreamWrapper::getResource($stream); +echo fread($resource, 6); // outputs hello! +``` + + +# Static API + +There are various static methods available under the `GuzzleHttp\Psr7` namespace. + + +## `GuzzleHttp\Psr7\Message::toString` + +`public static function toString(MessageInterface $message): string` + +Returns the string representation of an HTTP message. + +```php +$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com'); +echo GuzzleHttp\Psr7\Message::toString($request); +``` + + +## `GuzzleHttp\Psr7\Message::bodySummary` + +`public static function bodySummary(MessageInterface $message, int $truncateAt = 120): string|null` + +Get a short summary of the message body. + +Will return `null` if the response is not printable. + + +## `GuzzleHttp\Psr7\Message::rewindBody` + +`public static function rewindBody(MessageInterface $message): void` + +Attempts to rewind a message body and throws an exception on failure. + +The body of the message will only be rewound if a call to `tell()` +returns a value other than `0`. + + +## `GuzzleHttp\Psr7\Message::parseMessage` + +`public static function parseMessage(string $message): array` + +Parses an HTTP message into an associative array. + +The array contains the "start-line" key containing the start line of +the message, "headers" key containing an associative array of header +array values, and a "body" key containing the body of the message. + + +## `GuzzleHttp\Psr7\Message::parseRequestUri` + +`public static function parseRequestUri(string $path, array $headers): string` + +Constructs a URI for an HTTP request message. + + +## `GuzzleHttp\Psr7\Message::parseRequest` + +`public static function parseRequest(string $message): Request` + +Parses a request message string into a request object. + + +## `GuzzleHttp\Psr7\Message::parseResponse` + +`public static function parseResponse(string $message): Response` + +Parses a response message string into a response object. + + +## `GuzzleHttp\Psr7\Header::parse` + +`public static function parse(string|array $header): array` + +Parse an array of header values containing ";" separated data into an +array of associative arrays representing the header key value pair data +of the header. When a parameter does not contain a value, but just +contains a key, this function will inject a key with a '' string value. + + +## `GuzzleHttp\Psr7\Header::normalize` + +`public static function normalize(string|array $header): array` + +Converts an array of header values that may contain comma separated +headers into an array of headers with no comma separated values. + + +## `GuzzleHttp\Psr7\Query::parse` + +`public static function parse(string $str, int|bool $urlEncoding = true): array` + +Parse a query string into an associative array. + +If multiple values are found for the same key, the value of that key +value pair will become an array. This function does not parse nested +PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2` +will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`. + + +## `GuzzleHttp\Psr7\Query::build` + +`public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986): string` + +Build a query string from an array of key value pairs. + +This function can use the return value of `parse()` to build a query +string. This function does not modify the provided keys when an array is +encountered (like `http_build_query()` would). + + +## `GuzzleHttp\Psr7\Utils::caselessRemove` + +`public static function caselessRemove(iterable $keys, $keys, array $data): array` + +Remove the items given by the keys, case insensitively from the data. + + +## `GuzzleHttp\Psr7\Utils::copyToStream` + +`public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void` + +Copy the contents of a stream into another stream until the given number +of bytes have been read. + + +## `GuzzleHttp\Psr7\Utils::copyToString` + +`public static function copyToString(StreamInterface $stream, int $maxLen = -1): string` + +Copy the contents of a stream into a string until the given number of +bytes have been read. + + +## `GuzzleHttp\Psr7\Utils::hash` + +`public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string` + +Calculate a hash of a stream. + +This method reads the entire stream to calculate a rolling hash, based on +PHP's `hash_init` functions. + + +## `GuzzleHttp\Psr7\Utils::modifyRequest` + +`public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface` + +Clone and modify a request with the given changes. + +This method is useful for reducing the number of clones needed to mutate +a message. + +- method: (string) Changes the HTTP method. +- set_headers: (array) Sets the given headers. +- remove_headers: (array) Remove the given headers. +- body: (mixed) Sets the given body. +- uri: (UriInterface) Set the URI. +- query: (string) Set the query string value of the URI. +- version: (string) Set the protocol version. + + +## `GuzzleHttp\Psr7\Utils::readLine` + +`public static function readLine(StreamInterface $stream, int $maxLength = null): string` + +Read a line from the stream up to the maximum allowed buffer length. + + +## `GuzzleHttp\Psr7\Utils::streamFor` + +`public static function streamFor(resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource = '', array $options = []): StreamInterface` + +Create a new stream based on the input type. + +Options is an associative array that can contain the following keys: + +- metadata: Array of custom metadata. +- size: Size of the stream. + +This method accepts the following `$resource` types: + +- `Psr\Http\Message\StreamInterface`: Returns the value as-is. +- `string`: Creates a stream object that uses the given string as the contents. +- `resource`: Creates a stream object that wraps the given PHP stream resource. +- `Iterator`: If the provided value implements `Iterator`, then a read-only + stream object will be created that wraps the given iterable. Each time the + stream is read from, data from the iterator will fill a buffer and will be + continuously called until the buffer is equal to the requested read size. + Subsequent read calls will first read from the buffer and then call `next` + on the underlying iterator until it is exhausted. +- `object` with `__toString()`: If the object has the `__toString()` method, + the object will be cast to a string and then a stream will be returned that + uses the string value. +- `NULL`: When `null` is passed, an empty stream object is returned. +- `callable` When a callable is passed, a read-only stream object will be + created that invokes the given callable. The callable is invoked with the + number of suggested bytes to read. The callable can return any number of + bytes, but MUST return `false` when there is no more data to return. The + stream object that wraps the callable will invoke the callable until the + number of requested bytes are available. Any additional bytes will be + buffered and used in subsequent reads. + +```php +$stream = GuzzleHttp\Psr7\Utils::streamFor('foo'); +$stream = GuzzleHttp\Psr7\Utils::streamFor(fopen('/path/to/file', 'r')); + +$generator = function ($bytes) { + for ($i = 0; $i < $bytes; $i++) { + yield ' '; + } +} + +$stream = GuzzleHttp\Psr7\Utils::streamFor($generator(100)); +``` + + +## `GuzzleHttp\Psr7\Utils::tryFopen` + +`public static function tryFopen(string $filename, string $mode): resource` + +Safely opens a PHP stream resource using a filename. + +When fopen fails, PHP normally raises a warning. This function adds an +error handler that checks for errors and throws an exception instead. + + +## `GuzzleHttp\Psr7\Utils::uriFor` + +`public static function uriFor(string|UriInterface $uri): UriInterface` + +Returns a UriInterface for the given value. + +This function accepts a string or UriInterface and returns a +UriInterface for the given value. If the value is already a +UriInterface, it is returned as-is. + + +## `GuzzleHttp\Psr7\MimeType::fromFilename` + +`public static function fromFilename(string $filename): string|null` + +Determines the mimetype of a file by looking at its extension. + + +## `GuzzleHttp\Psr7\MimeType::fromExtension` + +`public static function fromExtension(string $extension): string|null` + +Maps a file extensions to a mimetype. + + +## Upgrading from Function API + +The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience: + +| Original Function | Replacement Method | +|----------------|----------------| +| `str` | `Message::toString` | +| `uri_for` | `Utils::uriFor` | +| `stream_for` | `Utils::streamFor` | +| `parse_header` | `Header::parse` | +| `normalize_header` | `Header::normalize` | +| `modify_request` | `Utils::modifyRequest` | +| `rewind_body` | `Message::rewindBody` | +| `try_fopen` | `Utils::tryFopen` | +| `copy_to_string` | `Utils::copyToString` | +| `copy_to_stream` | `Utils::copyToStream` | +| `hash` | `Utils::hash` | +| `readline` | `Utils::readLine` | +| `parse_request` | `Message::parseRequest` | +| `parse_response` | `Message::parseResponse` | +| `parse_query` | `Query::parse` | +| `build_query` | `Query::build` | +| `mimetype_from_filename` | `MimeType::fromFilename` | +| `mimetype_from_extension` | `MimeType::fromExtension` | +| `_parse_message` | `Message::parseMessage` | +| `_parse_request_uri` | `Message::parseRequestUri` | +| `get_message_body_summary` | `Message::bodySummary` | +| `_caseless_remove` | `Utils::caselessRemove` | + + +# Additional URI Methods + +Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class, +this library also provides additional functionality when working with URIs as static methods. + +## URI Types + +An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. +An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, +the base URI. Relative references can be divided into several forms according to +[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): + +- network-path references, e.g. `//example.com/path` +- absolute-path references, e.g. `/path` +- relative-path references, e.g. `subpath` + +The following methods can be used to identify the type of the URI. + +### `GuzzleHttp\Psr7\Uri::isAbsolute` + +`public static function isAbsolute(UriInterface $uri): bool` + +Whether the URI is absolute, i.e. it has a scheme. + +### `GuzzleHttp\Psr7\Uri::isNetworkPathReference` + +`public static function isNetworkPathReference(UriInterface $uri): bool` + +Whether the URI is a network-path reference. A relative reference that begins with two slash characters is +termed an network-path reference. + +### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference` + +`public static function isAbsolutePathReference(UriInterface $uri): bool` + +Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is +termed an absolute-path reference. + +### `GuzzleHttp\Psr7\Uri::isRelativePathReference` + +`public static function isRelativePathReference(UriInterface $uri): bool` + +Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is +termed a relative-path reference. + +### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` + +`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool` + +Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its +fragment component, identical to the base URI. When no base URI is given, only an empty URI reference +(apart from its fragment) is considered a same-document reference. + +## URI Components + +Additional methods to work with URI components. + +### `GuzzleHttp\Psr7\Uri::isDefaultPort` + +`public static function isDefaultPort(UriInterface $uri): bool` + +Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null +or the standard port. This method can be used independently of the implementation. + +### `GuzzleHttp\Psr7\Uri::composeComponents` + +`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` + +Composes a URI reference string from its various components according to +[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called +manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. + +### `GuzzleHttp\Psr7\Uri::fromParts` + +`public static function fromParts(array $parts): UriInterface` + +Creates a URI from a hash of [`parse_url`](http://php.net/manual/en/function.parse-url.php) components. + + +### `GuzzleHttp\Psr7\Uri::withQueryValue` + +`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` + +Creates a new URI with a specific query string value. Any existing query string values that exactly match the +provided key are removed and replaced with the given key value pair. A value of null will set the query string +key without a value, e.g. "key" instead of "key=value". + +### `GuzzleHttp\Psr7\Uri::withQueryValues` + +`public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface` + +Creates a new URI with multiple query string values. It has the same behavior as `withQueryValue()` but for an +associative array of key => value. + +### `GuzzleHttp\Psr7\Uri::withoutQueryValue` + +`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` + +Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the +provided key are removed. + +## Reference Resolution + +`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according +to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers +do when resolving a link in a website based on the current request URI. + +### `GuzzleHttp\Psr7\UriResolver::resolve` + +`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface` + +Converts the relative URI into a new URI that is resolved against the base URI. + +### `GuzzleHttp\Psr7\UriResolver::removeDotSegments` + +`public static function removeDotSegments(string $path): string` + +Removes dot segments from a path and returns the new path according to +[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). + +### `GuzzleHttp\Psr7\UriResolver::relativize` + +`public static function relativize(UriInterface $base, UriInterface $target): UriInterface` + +Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve(): + +```php +(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) +``` + +One use-case is to use the current request URI as base URI and then generate relative links in your documents +to reduce the document size or offer self-contained downloadable document archives. + +```php +$base = new Uri('http://example.com/a/b/'); +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. +echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. +``` + +## Normalization and Comparison + +`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to +[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). + +### `GuzzleHttp\Psr7\UriNormalizer::normalize` + +`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface` + +Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. +This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask +of normalizations to apply. The following normalizations are available: + +- `UriNormalizer::PRESERVING_NORMALIZATIONS` + + Default normalizations which only include the ones that preserve semantics. + +- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING` + + All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. + + Example: `http://example.org/a%c2%b1b` → `http://example.org/a%C2%B1b` + +- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS` + + Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of + ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should + not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved + characters by URI normalizers. + + Example: `http://example.org/%7Eusern%61me/` → `http://example.org/~username/` + +- `UriNormalizer::CONVERT_EMPTY_PATH` + + Converts the empty path to "/" for http and https URIs. + + Example: `http://example.org` → `http://example.org/` + +- `UriNormalizer::REMOVE_DEFAULT_HOST` + + Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host + "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to + RFC 3986. + + Example: `file://localhost/myfile` → `file:///myfile` + +- `UriNormalizer::REMOVE_DEFAULT_PORT` + + Removes the default port of the given URI scheme from the URI. + + Example: `http://example.org:80/` → `http://example.org/` + +- `UriNormalizer::REMOVE_DOT_SEGMENTS` + + Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would + change the semantics of the URI reference. + + Example: `http://example.org/../a/b/../c/./d.html` → `http://example.org/a/c/d.html` + +- `UriNormalizer::REMOVE_DUPLICATE_SLASHES` + + Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes + and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization + may change the semantics. Encoded slashes (%2F) are not removed. + + Example: `http://example.org//foo///bar.html` → `http://example.org/foo/bar.html` + +- `UriNormalizer::SORT_QUERY_PARAMETERS` + + Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be + significant (this is not defined by the standard). So this normalization is not safe and may change the semantics + of the URI. + + Example: `?lang=en&article=fred` → `?article=fred&lang=en` + +### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent` + +`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool` + +Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given +`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. +This of course assumes they will be resolved against the same base URI. If this is not the case, determination of +equivalence or difference of relative references does not mean anything. diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/composer.json b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/composer.json new file mode 100644 index 000000000..58dcb07e4 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/composer.json @@ -0,0 +1,49 @@ +{ + "name": "guzzlehttp/psr7", + "type": "library", + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"], + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10", + "ext-zlib": "*" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": ["src/functions_include.php"] + }, + "autoload-dev": { + "psr-4": { + "GuzzleHttp\\Tests\\Psr7\\": "tests/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/AppendStream.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/AppendStream.php new file mode 100644 index 000000000..86e7a23ba --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/AppendStream.php @@ -0,0 +1,244 @@ +addStream($stream); + } + } + + public function __toString() + { + try { + $this->rewind(); + return $this->getContents(); + } catch (\Exception $e) { + return ''; + } + } + + /** + * Add a stream to the AppendStream + * + * @param StreamInterface $stream Stream to append. Must be readable. + * + * @throws \InvalidArgumentException if the stream is not readable + */ + public function addStream(StreamInterface $stream) + { + if (!$stream->isReadable()) { + throw new \InvalidArgumentException('Each stream must be readable'); + } + + // The stream is only seekable if all streams are seekable + if (!$stream->isSeekable()) { + $this->seekable = false; + } + + $this->streams[] = $stream; + } + + public function getContents() + { + return Utils::copyToString($this); + } + + /** + * Closes each attached stream. + * + * {@inheritdoc} + */ + public function close() + { + $this->pos = $this->current = 0; + $this->seekable = true; + + foreach ($this->streams as $stream) { + $stream->close(); + } + + $this->streams = []; + } + + /** + * Detaches each attached stream. + * + * Returns null as it's not clear which underlying stream resource to return. + * + * {@inheritdoc} + */ + public function detach() + { + $this->pos = $this->current = 0; + $this->seekable = true; + + foreach ($this->streams as $stream) { + $stream->detach(); + } + + $this->streams = []; + + return null; + } + + public function tell() + { + return $this->pos; + } + + /** + * Tries to calculate the size by adding the size of each stream. + * + * If any of the streams do not return a valid number, then the size of the + * append stream cannot be determined and null is returned. + * + * {@inheritdoc} + */ + public function getSize() + { + $size = 0; + + foreach ($this->streams as $stream) { + $s = $stream->getSize(); + if ($s === null) { + return null; + } + $size += $s; + } + + return $size; + } + + public function eof() + { + return !$this->streams || + ($this->current >= count($this->streams) - 1 && + $this->streams[$this->current]->eof()); + } + + public function rewind() + { + $this->seek(0); + } + + /** + * Attempts to seek to the given position. Only supports SEEK_SET. + * + * {@inheritdoc} + */ + public function seek($offset, $whence = SEEK_SET) + { + if (!$this->seekable) { + throw new \RuntimeException('This AppendStream is not seekable'); + } elseif ($whence !== SEEK_SET) { + throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); + } + + $this->pos = $this->current = 0; + + // Rewind each stream + foreach ($this->streams as $i => $stream) { + try { + $stream->rewind(); + } catch (\Exception $e) { + throw new \RuntimeException('Unable to seek stream ' + . $i . ' of the AppendStream', 0, $e); + } + } + + // Seek to the actual position by reading from each stream + while ($this->pos < $offset && !$this->eof()) { + $result = $this->read(min(8096, $offset - $this->pos)); + if ($result === '') { + break; + } + } + } + + /** + * Reads from all of the appended streams until the length is met or EOF. + * + * {@inheritdoc} + */ + public function read($length) + { + $buffer = ''; + $total = count($this->streams) - 1; + $remaining = $length; + $progressToNext = false; + + while ($remaining > 0) { + + // Progress to the next stream if needed. + if ($progressToNext || $this->streams[$this->current]->eof()) { + $progressToNext = false; + if ($this->current === $total) { + break; + } + $this->current++; + } + + $result = $this->streams[$this->current]->read($remaining); + + // Using a loose comparison here to match on '', false, and null + if ($result == null) { + $progressToNext = true; + continue; + } + + $buffer .= $result; + $remaining = $length - strlen($buffer); + } + + $this->pos += strlen($buffer); + + return $buffer; + } + + public function isReadable() + { + return true; + } + + public function isWritable() + { + return false; + } + + public function isSeekable() + { + return $this->seekable; + } + + public function write($string) + { + throw new \RuntimeException('Cannot write to an AppendStream'); + } + + public function getMetadata($key = null) + { + return $key ? null : []; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/BufferStream.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/BufferStream.php new file mode 100644 index 000000000..627e4a5f1 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/BufferStream.php @@ -0,0 +1,140 @@ +hwm = $hwm; + } + + public function __toString() + { + return $this->getContents(); + } + + public function getContents() + { + $buffer = $this->buffer; + $this->buffer = ''; + + return $buffer; + } + + public function close() + { + $this->buffer = ''; + } + + public function detach() + { + $this->close(); + + return null; + } + + public function getSize() + { + return strlen($this->buffer); + } + + public function isReadable() + { + return true; + } + + public function isWritable() + { + return true; + } + + public function isSeekable() + { + return false; + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + throw new \RuntimeException('Cannot seek a BufferStream'); + } + + public function eof() + { + return strlen($this->buffer) === 0; + } + + public function tell() + { + throw new \RuntimeException('Cannot determine the position of a BufferStream'); + } + + /** + * Reads data from the buffer. + */ + public function read($length) + { + $currentLength = strlen($this->buffer); + + if ($length >= $currentLength) { + // No need to slice the buffer because we don't have enough data. + $result = $this->buffer; + $this->buffer = ''; + } else { + // Slice up the result to provide a subset of the buffer. + $result = substr($this->buffer, 0, $length); + $this->buffer = substr($this->buffer, $length); + } + + return $result; + } + + /** + * Writes data to the buffer. + */ + public function write($string) + { + $this->buffer .= $string; + + // TODO: What should happen here? + if (strlen($this->buffer) >= $this->hwm) { + return false; + } + + return strlen($string); + } + + public function getMetadata($key = null) + { + if ($key == 'hwm') { + return $this->hwm; + } + + return $key ? null : []; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/CachingStream.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/CachingStream.php new file mode 100644 index 000000000..244d2a063 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/CachingStream.php @@ -0,0 +1,139 @@ +remoteStream = $stream; + $this->stream = $target ?: new Stream(fopen('php://temp', 'r+')); + } + + public function getSize() + { + return max($this->stream->getSize(), $this->remoteStream->getSize()); + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + if ($whence == SEEK_SET) { + $byte = $offset; + } elseif ($whence == SEEK_CUR) { + $byte = $offset + $this->tell(); + } elseif ($whence == SEEK_END) { + $size = $this->remoteStream->getSize(); + if ($size === null) { + $size = $this->cacheEntireStream(); + } + $byte = $size + $offset; + } else { + throw new \InvalidArgumentException('Invalid whence'); + } + + $diff = $byte - $this->stream->getSize(); + + if ($diff > 0) { + // Read the remoteStream until we have read in at least the amount + // of bytes requested, or we reach the end of the file. + while ($diff > 0 && !$this->remoteStream->eof()) { + $this->read($diff); + $diff = $byte - $this->stream->getSize(); + } + } else { + // We can just do a normal seek since we've already seen this byte. + $this->stream->seek($byte); + } + } + + public function read($length) + { + // Perform a regular read on any previously read data from the buffer + $data = $this->stream->read($length); + $remaining = $length - strlen($data); + + // More data was requested so read from the remote stream + if ($remaining) { + // If data was written to the buffer in a position that would have + // been filled from the remote stream, then we must skip bytes on + // the remote stream to emulate overwriting bytes from that + // position. This mimics the behavior of other PHP stream wrappers. + $remoteData = $this->remoteStream->read( + $remaining + $this->skipReadBytes + ); + + if ($this->skipReadBytes) { + $len = strlen($remoteData); + $remoteData = substr($remoteData, $this->skipReadBytes); + $this->skipReadBytes = max(0, $this->skipReadBytes - $len); + } + + $data .= $remoteData; + $this->stream->write($remoteData); + } + + return $data; + } + + public function write($string) + { + // When appending to the end of the currently read stream, you'll want + // to skip bytes from being read from the remote stream to emulate + // other stream wrappers. Basically replacing bytes of data of a fixed + // length. + $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell(); + if ($overflow > 0) { + $this->skipReadBytes += $overflow; + } + + return $this->stream->write($string); + } + + public function eof() + { + return $this->stream->eof() && $this->remoteStream->eof(); + } + + /** + * Close both the remote stream and buffer stream + */ + public function close() + { + $this->remoteStream->close() && $this->stream->close(); + } + + private function cacheEntireStream() + { + $target = new FnStream(['write' => 'strlen']); + Utils::copyToStream($this, $target); + + return $this->tell(); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/DroppingStream.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/DroppingStream.php new file mode 100644 index 000000000..e125642d3 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/DroppingStream.php @@ -0,0 +1,43 @@ +stream = $stream; + $this->maxLength = $maxLength; + } + + public function write($string) + { + $diff = $this->maxLength - $this->stream->getSize(); + + // Begin returning 0 when the underlying stream is too large. + if ($diff <= 0) { + return 0; + } + + // Write the stream or a subset of the stream if needed. + if (strlen($string) < $diff) { + return $this->stream->write($string); + } + + return $this->stream->write(substr($string, 0, $diff)); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/FnStream.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/FnStream.php new file mode 100644 index 000000000..407577a37 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/FnStream.php @@ -0,0 +1,160 @@ +methods = $methods; + + // Create the functions on the class + foreach ($methods as $name => $fn) { + $this->{'_fn_' . $name} = $fn; + } + } + + /** + * Lazily determine which methods are not implemented. + * + * @throws \BadMethodCallException + */ + public function __get($name) + { + throw new \BadMethodCallException(str_replace('_fn_', '', $name) + . '() is not implemented in the FnStream'); + } + + /** + * The close method is called on the underlying stream only if possible. + */ + public function __destruct() + { + if (isset($this->_fn_close)) { + call_user_func($this->_fn_close); + } + } + + /** + * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. + * @throws \LogicException + */ + public function __wakeup() + { + throw new \LogicException('FnStream should never be unserialized'); + } + + /** + * Adds custom functionality to an underlying stream by intercepting + * specific method calls. + * + * @param StreamInterface $stream Stream to decorate + * @param array $methods Hash of method name to a closure + * + * @return FnStream + */ + public static function decorate(StreamInterface $stream, array $methods) + { + // If any of the required methods were not provided, then simply + // proxy to the decorated stream. + foreach (array_diff(self::$slots, array_keys($methods)) as $diff) { + $methods[$diff] = [$stream, $diff]; + } + + return new self($methods); + } + + public function __toString() + { + return call_user_func($this->_fn___toString); + } + + public function close() + { + return call_user_func($this->_fn_close); + } + + public function detach() + { + return call_user_func($this->_fn_detach); + } + + public function getSize() + { + return call_user_func($this->_fn_getSize); + } + + public function tell() + { + return call_user_func($this->_fn_tell); + } + + public function eof() + { + return call_user_func($this->_fn_eof); + } + + public function isSeekable() + { + return call_user_func($this->_fn_isSeekable); + } + + public function rewind() + { + call_user_func($this->_fn_rewind); + } + + public function seek($offset, $whence = SEEK_SET) + { + call_user_func($this->_fn_seek, $offset, $whence); + } + + public function isWritable() + { + return call_user_func($this->_fn_isWritable); + } + + public function write($string) + { + return call_user_func($this->_fn_write, $string); + } + + public function isReadable() + { + return call_user_func($this->_fn_isReadable); + } + + public function read($length) + { + return call_user_func($this->_fn_read, $length); + } + + public function getContents() + { + return call_user_func($this->_fn_getContents); + } + + public function getMetadata($key = null) + { + return call_user_func($this->_fn_getMetadata, $key); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Header.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Header.php new file mode 100644 index 000000000..865d74214 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Header.php @@ -0,0 +1,71 @@ +]+>|[^=]+/', $kvp, $matches)) { + $m = $matches[0]; + if (isset($m[1])) { + $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); + } else { + $part[] = trim($m[0], $trimmed); + } + } + } + if ($part) { + $params[] = $part; + } + } + + return $params; + } + + /** + * Converts an array of header values that may contain comma separated + * headers into an array of headers with no comma separated values. + * + * @param string|array $header Header to normalize. + * + * @return array Returns the normalized header field values. + */ + public static function normalize($header) + { + if (!is_array($header)) { + return array_map('trim', explode(',', $header)); + } + + $result = []; + foreach ($header as $value) { + foreach ((array) $value as $v) { + if (strpos($v, ',') === false) { + $result[] = $v; + continue; + } + foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) { + $result[] = trim($vv); + } + } + } + + return $result; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/InflateStream.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/InflateStream.php new file mode 100644 index 000000000..c98b96f25 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/InflateStream.php @@ -0,0 +1,53 @@ +read(10); + $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); + // Skip the header, that is 10 + length of filename + 1 (nil) bytes + $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength); + $resource = StreamWrapper::getResource($stream); + stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); + $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); + } + + /** + * @param StreamInterface $stream + * @param $header + * @return int + */ + private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) + { + $filename_header_length = 0; + + if (substr(bin2hex($header), 6, 2) === '08') { + // we have a filename, read until nil + $filename_header_length = 1; + while ($stream->read(1) !== chr(0)) { + $filename_header_length++; + } + } + + return $filename_header_length; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/LazyOpenStream.php new file mode 100644 index 000000000..13c7af5c8 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/LazyOpenStream.php @@ -0,0 +1,40 @@ +filename = $filename; + $this->mode = $mode; + } + + /** + * Creates the underlying stream lazily when required. + * + * @return StreamInterface + */ + protected function createStream() + { + return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode)); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/LimitStream.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/LimitStream.php new file mode 100644 index 000000000..bef9161ea --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/LimitStream.php @@ -0,0 +1,156 @@ +stream = $stream; + $this->setLimit($limit); + $this->setOffset($offset); + } + + public function eof() + { + // Always return true if the underlying stream is EOF + if ($this->stream->eof()) { + return true; + } + + // No limit and the underlying stream is not at EOF + if ($this->limit == -1) { + return false; + } + + return $this->stream->tell() >= $this->offset + $this->limit; + } + + /** + * Returns the size of the limited subset of data + * {@inheritdoc} + */ + public function getSize() + { + if (null === ($length = $this->stream->getSize())) { + return null; + } elseif ($this->limit == -1) { + return $length - $this->offset; + } else { + return min($this->limit, $length - $this->offset); + } + } + + /** + * Allow for a bounded seek on the read limited stream + * {@inheritdoc} + */ + public function seek($offset, $whence = SEEK_SET) + { + if ($whence !== SEEK_SET || $offset < 0) { + throw new \RuntimeException(sprintf( + 'Cannot seek to offset %s with whence %s', + $offset, + $whence + )); + } + + $offset += $this->offset; + + if ($this->limit !== -1) { + if ($offset > $this->offset + $this->limit) { + $offset = $this->offset + $this->limit; + } + } + + $this->stream->seek($offset); + } + + /** + * Give a relative tell() + * {@inheritdoc} + */ + public function tell() + { + return $this->stream->tell() - $this->offset; + } + + /** + * Set the offset to start limiting from + * + * @param int $offset Offset to seek to and begin byte limiting from + * + * @throws \RuntimeException if the stream cannot be seeked. + */ + public function setOffset($offset) + { + $current = $this->stream->tell(); + + if ($current !== $offset) { + // If the stream cannot seek to the offset position, then read to it + if ($this->stream->isSeekable()) { + $this->stream->seek($offset); + } elseif ($current > $offset) { + throw new \RuntimeException("Could not seek to stream offset $offset"); + } else { + $this->stream->read($offset - $current); + } + } + + $this->offset = $offset; + } + + /** + * Set the limit of bytes that the decorator allows to be read from the + * stream. + * + * @param int $limit Number of bytes to allow to be read from the stream. + * Use -1 for no limit. + */ + public function setLimit($limit) + { + $this->limit = $limit; + } + + public function read($length) + { + if ($this->limit == -1) { + return $this->stream->read($length); + } + + // Check if the current position is less than the total allowed + // bytes + original offset + $remaining = ($this->offset + $this->limit) - $this->stream->tell(); + if ($remaining > 0) { + // Only return the amount of requested data, ensuring that the byte + // limit is not exceeded + return $this->stream->read(min($remaining, $length)); + } + + return ''; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Message.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Message.php new file mode 100644 index 000000000..516d1cb84 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Message.php @@ -0,0 +1,252 @@ +getMethod() . ' ' + . $message->getRequestTarget()) + . ' HTTP/' . $message->getProtocolVersion(); + if (!$message->hasHeader('host')) { + $msg .= "\r\nHost: " . $message->getUri()->getHost(); + } + } elseif ($message instanceof ResponseInterface) { + $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' + . $message->getStatusCode() . ' ' + . $message->getReasonPhrase(); + } else { + throw new \InvalidArgumentException('Unknown message type'); + } + + foreach ($message->getHeaders() as $name => $values) { + if (strtolower($name) === 'set-cookie') { + foreach ($values as $value) { + $msg .= "\r\n{$name}: " . $value; + } + } else { + $msg .= "\r\n{$name}: " . implode(', ', $values); + } + } + + return "{$msg}\r\n\r\n" . $message->getBody(); + } + + /** + * Get a short summary of the message body. + * + * Will return `null` if the response is not printable. + * + * @param MessageInterface $message The message to get the body summary + * @param int $truncateAt The maximum allowed size of the summary + * + * @return string|null + */ + public static function bodySummary(MessageInterface $message, $truncateAt = 120) + { + $body = $message->getBody(); + + if (!$body->isSeekable() || !$body->isReadable()) { + return null; + } + + $size = $body->getSize(); + + if ($size === 0) { + return null; + } + + $summary = $body->read($truncateAt); + $body->rewind(); + + if ($size > $truncateAt) { + $summary .= ' (truncated...)'; + } + + // Matches any printable character, including unicode characters: + // letters, marks, numbers, punctuation, spacing, and separators. + if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) { + return null; + } + + return $summary; + } + + /** + * Attempts to rewind a message body and throws an exception on failure. + * + * The body of the message will only be rewound if a call to `tell()` + * returns a value other than `0`. + * + * @param MessageInterface $message Message to rewind + * + * @throws \RuntimeException + */ + public static function rewindBody(MessageInterface $message) + { + $body = $message->getBody(); + + if ($body->tell()) { + $body->rewind(); + } + } + + /** + * Parses an HTTP message into an associative array. + * + * The array contains the "start-line" key containing the start line of + * the message, "headers" key containing an associative array of header + * array values, and a "body" key containing the body of the message. + * + * @param string $message HTTP request or response to parse. + * + * @return array + */ + public static function parseMessage($message) + { + if (!$message) { + throw new \InvalidArgumentException('Invalid message'); + } + + $message = ltrim($message, "\r\n"); + + $messageParts = preg_split("/\r?\n\r?\n/", $message, 2); + + if ($messageParts === false || count($messageParts) !== 2) { + throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); + } + + list($rawHeaders, $body) = $messageParts; + $rawHeaders .= "\r\n"; // Put back the delimiter we split previously + $headerParts = preg_split("/\r?\n/", $rawHeaders, 2); + + if ($headerParts === false || count($headerParts) !== 2) { + throw new \InvalidArgumentException('Invalid message: Missing status line'); + } + + list($startLine, $rawHeaders) = $headerParts; + + if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { + // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 + $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders); + } + + /** @var array[] $headerLines */ + $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER); + + // If these aren't the same, then one line didn't match and there's an invalid header. + if ($count !== substr_count($rawHeaders, "\n")) { + // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4 + if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { + throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); + } + + throw new \InvalidArgumentException('Invalid header syntax'); + } + + $headers = []; + + foreach ($headerLines as $headerLine) { + $headers[$headerLine[1]][] = $headerLine[2]; + } + + return [ + 'start-line' => $startLine, + 'headers' => $headers, + 'body' => $body, + ]; + } + + /** + * Constructs a URI for an HTTP request message. + * + * @param string $path Path from the start-line + * @param array $headers Array of headers (each value an array). + * + * @return string + */ + public static function parseRequestUri($path, array $headers) + { + $hostKey = array_filter(array_keys($headers), function ($k) { + return strtolower($k) === 'host'; + }); + + // If no host is found, then a full URI cannot be constructed. + if (!$hostKey) { + return $path; + } + + $host = $headers[reset($hostKey)][0]; + $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; + + return $scheme . '://' . $host . '/' . ltrim($path, '/'); + } + + /** + * Parses a request message string into a request object. + * + * @param string $message Request message string. + * + * @return Request + */ + public static function parseRequest($message) + { + $data = self::parseMessage($message); + $matches = []; + if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) { + throw new \InvalidArgumentException('Invalid request string'); + } + $parts = explode(' ', $data['start-line'], 3); + $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1'; + + $request = new Request( + $parts[0], + $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1], + $data['headers'], + $data['body'], + $version + ); + + return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); + } + + /** + * Parses a response message string into a response object. + * + * @param string $message Response message string. + * + * @return Response + */ + public static function parseResponse($message) + { + $data = self::parseMessage($message); + // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space + // between status-code and reason-phrase is required. But browsers accept + // responses without space and reason as well. + if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { + throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); + } + $parts = explode(' ', $data['start-line'], 3); + + return new Response( + (int) $parts[1], + $data['headers'], + $data['body'], + explode('/', $parts[0])[1], + isset($parts[2]) ? $parts[2] : null + ); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/MessageTrait.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/MessageTrait.php new file mode 100644 index 000000000..99203bb43 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/MessageTrait.php @@ -0,0 +1,214 @@ + array of values */ + private $headers = []; + + /** @var array Map of lowercase header name => original name at registration */ + private $headerNames = []; + + /** @var string */ + private $protocol = '1.1'; + + /** @var StreamInterface|null */ + private $stream; + + public function getProtocolVersion() + { + return $this->protocol; + } + + public function withProtocolVersion($version) + { + if ($this->protocol === $version) { + return $this; + } + + $new = clone $this; + $new->protocol = $version; + return $new; + } + + public function getHeaders() + { + return $this->headers; + } + + public function hasHeader($header) + { + return isset($this->headerNames[strtolower($header)]); + } + + public function getHeader($header) + { + $header = strtolower($header); + + if (!isset($this->headerNames[$header])) { + return []; + } + + $header = $this->headerNames[$header]; + + return $this->headers[$header]; + } + + public function getHeaderLine($header) + { + return implode(', ', $this->getHeader($header)); + } + + public function withHeader($header, $value) + { + $this->assertHeader($header); + $value = $this->normalizeHeaderValue($value); + $normalized = strtolower($header); + + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + unset($new->headers[$new->headerNames[$normalized]]); + } + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + + return $new; + } + + public function withAddedHeader($header, $value) + { + $this->assertHeader($header); + $value = $this->normalizeHeaderValue($value); + $normalized = strtolower($header); + + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + $header = $this->headerNames[$normalized]; + $new->headers[$header] = array_merge($this->headers[$header], $value); + } else { + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + } + + return $new; + } + + public function withoutHeader($header) + { + $normalized = strtolower($header); + + if (!isset($this->headerNames[$normalized])) { + return $this; + } + + $header = $this->headerNames[$normalized]; + + $new = clone $this; + unset($new->headers[$header], $new->headerNames[$normalized]); + + return $new; + } + + public function getBody() + { + if (!$this->stream) { + $this->stream = Utils::streamFor(''); + } + + return $this->stream; + } + + public function withBody(StreamInterface $body) + { + if ($body === $this->stream) { + return $this; + } + + $new = clone $this; + $new->stream = $body; + return $new; + } + + private function setHeaders(array $headers) + { + $this->headerNames = $this->headers = []; + foreach ($headers as $header => $value) { + if (is_int($header)) { + // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec + // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass. + $header = (string) $header; + } + $this->assertHeader($header); + $value = $this->normalizeHeaderValue($value); + $normalized = strtolower($header); + if (isset($this->headerNames[$normalized])) { + $header = $this->headerNames[$normalized]; + $this->headers[$header] = array_merge($this->headers[$header], $value); + } else { + $this->headerNames[$normalized] = $header; + $this->headers[$header] = $value; + } + } + } + + private function normalizeHeaderValue($value) + { + if (!is_array($value)) { + return $this->trimHeaderValues([$value]); + } + + if (count($value) === 0) { + throw new \InvalidArgumentException('Header value can not be an empty array.'); + } + + return $this->trimHeaderValues($value); + } + + /** + * Trims whitespace from the header values. + * + * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. + * + * header-field = field-name ":" OWS field-value OWS + * OWS = *( SP / HTAB ) + * + * @param string[] $values Header values + * + * @return string[] Trimmed header values + * + * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 + */ + private function trimHeaderValues(array $values) + { + return array_map(function ($value) { + if (!is_scalar($value) && null !== $value) { + throw new \InvalidArgumentException(sprintf( + 'Header value must be scalar or null but %s provided.', + is_object($value) ? get_class($value) : gettype($value) + )); + } + + return trim((string) $value, " \t"); + }, array_values($values)); + } + + private function assertHeader($header) + { + if (!is_string($header)) { + throw new \InvalidArgumentException(sprintf( + 'Header name must be a string but %s provided.', + is_object($header) ? get_class($header) : gettype($header) + )); + } + + if ($header === '') { + throw new \InvalidArgumentException('Header name can not be empty.'); + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/MimeType.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/MimeType.php new file mode 100644 index 000000000..205c7b1fa --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/MimeType.php @@ -0,0 +1,140 @@ + 'video/3gpp', + '7z' => 'application/x-7z-compressed', + 'aac' => 'audio/x-aac', + 'ai' => 'application/postscript', + 'aif' => 'audio/x-aiff', + 'asc' => 'text/plain', + 'asf' => 'video/x-ms-asf', + 'atom' => 'application/atom+xml', + 'avi' => 'video/x-msvideo', + 'bmp' => 'image/bmp', + 'bz2' => 'application/x-bzip2', + 'cer' => 'application/pkix-cert', + 'crl' => 'application/pkix-crl', + 'crt' => 'application/x-x509-ca-cert', + 'css' => 'text/css', + 'csv' => 'text/csv', + 'cu' => 'application/cu-seeme', + 'deb' => 'application/x-debian-package', + 'doc' => 'application/msword', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dvi' => 'application/x-dvi', + 'eot' => 'application/vnd.ms-fontobject', + 'eps' => 'application/postscript', + 'epub' => 'application/epub+zip', + 'etx' => 'text/x-setext', + 'flac' => 'audio/flac', + 'flv' => 'video/x-flv', + 'gif' => 'image/gif', + 'gz' => 'application/gzip', + 'htm' => 'text/html', + 'html' => 'text/html', + 'ico' => 'image/x-icon', + 'ics' => 'text/calendar', + 'ini' => 'text/plain', + 'iso' => 'application/x-iso9660-image', + 'jar' => 'application/java-archive', + 'jpe' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'js' => 'text/javascript', + 'json' => 'application/json', + 'latex' => 'application/x-latex', + 'log' => 'text/plain', + 'm4a' => 'audio/mp4', + 'm4v' => 'video/mp4', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mov' => 'video/quicktime', + 'mkv' => 'video/x-matroska', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mp4a' => 'audio/mp4', + 'mp4v' => 'video/mp4', + 'mpe' => 'video/mpeg', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpg4' => 'video/mp4', + 'oga' => 'audio/ogg', + 'ogg' => 'audio/ogg', + 'ogv' => 'video/ogg', + 'ogx' => 'application/ogg', + 'pbm' => 'image/x-portable-bitmap', + 'pdf' => 'application/pdf', + 'pgm' => 'image/x-portable-graymap', + 'png' => 'image/png', + 'pnm' => 'image/x-portable-anymap', + 'ppm' => 'image/x-portable-pixmap', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'ps' => 'application/postscript', + 'qt' => 'video/quicktime', + 'rar' => 'application/x-rar-compressed', + 'ras' => 'image/x-cmu-raster', + 'rss' => 'application/rss+xml', + 'rtf' => 'application/rtf', + 'sgm' => 'text/sgml', + 'sgml' => 'text/sgml', + 'svg' => 'image/svg+xml', + 'swf' => 'application/x-shockwave-flash', + 'tar' => 'application/x-tar', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'torrent' => 'application/x-bittorrent', + 'ttf' => 'application/x-font-ttf', + 'txt' => 'text/plain', + 'wav' => 'audio/x-wav', + 'webm' => 'video/webm', + 'webp' => 'image/webp', + 'wma' => 'audio/x-ms-wma', + 'wmv' => 'video/x-ms-wmv', + 'woff' => 'application/x-font-woff', + 'wsdl' => 'application/wsdl+xml', + 'xbm' => 'image/x-xbitmap', + 'xls' => 'application/vnd.ms-excel', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xml' => 'application/xml', + 'xpm' => 'image/x-xpixmap', + 'xwd' => 'image/x-xwindowdump', + 'yaml' => 'text/yaml', + 'yml' => 'text/yaml', + 'zip' => 'application/zip', + ]; + + $extension = strtolower($extension); + + return isset($mimetypes[$extension]) + ? $mimetypes[$extension] + : null; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/MultipartStream.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/MultipartStream.php new file mode 100644 index 000000000..0cbfea35d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -0,0 +1,154 @@ +boundary = $boundary ?: sha1(uniqid('', true)); + $this->stream = $this->createStream($elements); + } + + /** + * Get the boundary + * + * @return string + */ + public function getBoundary() + { + return $this->boundary; + } + + public function isWritable() + { + return false; + } + + /** + * Get the headers needed before transferring the content of a POST file + */ + private function getHeaders(array $headers) + { + $str = ''; + foreach ($headers as $key => $value) { + $str .= "{$key}: {$value}\r\n"; + } + + return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n"; + } + + /** + * Create the aggregate stream that will be used to upload the POST data + */ + protected function createStream(array $elements) + { + $stream = new AppendStream(); + + foreach ($elements as $element) { + $this->addElement($stream, $element); + } + + // Add the trailing boundary with CRLF + $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n")); + + return $stream; + } + + private function addElement(AppendStream $stream, array $element) + { + foreach (['contents', 'name'] as $key) { + if (!array_key_exists($key, $element)) { + throw new \InvalidArgumentException("A '{$key}' key is required"); + } + } + + $element['contents'] = Utils::streamFor($element['contents']); + + if (empty($element['filename'])) { + $uri = $element['contents']->getMetadata('uri'); + if (substr($uri, 0, 6) !== 'php://') { + $element['filename'] = $uri; + } + } + + list($body, $headers) = $this->createElement( + $element['name'], + $element['contents'], + isset($element['filename']) ? $element['filename'] : null, + isset($element['headers']) ? $element['headers'] : [] + ); + + $stream->addStream(Utils::streamFor($this->getHeaders($headers))); + $stream->addStream($body); + $stream->addStream(Utils::streamFor("\r\n")); + } + + /** + * @return array + */ + private function createElement($name, StreamInterface $stream, $filename, array $headers) + { + // Set a default content-disposition header if one was no provided + $disposition = $this->getHeader($headers, 'content-disposition'); + if (!$disposition) { + $headers['Content-Disposition'] = ($filename === '0' || $filename) + ? sprintf('form-data; name="%s"; filename="%s"', + $name, + basename($filename)) + : "form-data; name=\"{$name}\""; + } + + // Set a default content-length header if one was no provided + $length = $this->getHeader($headers, 'content-length'); + if (!$length) { + if ($length = $stream->getSize()) { + $headers['Content-Length'] = (string) $length; + } + } + + // Set a default Content-Type if one was not supplied + $type = $this->getHeader($headers, 'content-type'); + if (!$type && ($filename === '0' || $filename)) { + if ($type = MimeType::fromFilename($filename)) { + $headers['Content-Type'] = $type; + } + } + + return [$stream, $headers]; + } + + private function getHeader(array $headers, $key) + { + $lowercaseHeader = strtolower($key); + foreach ($headers as $k => $v) { + if (strtolower($k) === $lowercaseHeader) { + return $v; + } + } + + return null; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/NoSeekStream.php new file mode 100644 index 000000000..4b04b4c0a --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/NoSeekStream.php @@ -0,0 +1,23 @@ +source = $source; + $this->size = isset($options['size']) ? $options['size'] : null; + $this->metadata = isset($options['metadata']) ? $options['metadata'] : []; + $this->buffer = new BufferStream(); + } + + public function __toString() + { + try { + return Utils::copyToString($this); + } catch (\Exception $e) { + return ''; + } + } + + public function close() + { + $this->detach(); + } + + public function detach() + { + $this->tellPos = false; + $this->source = null; + + return null; + } + + public function getSize() + { + return $this->size; + } + + public function tell() + { + return $this->tellPos; + } + + public function eof() + { + return !$this->source; + } + + public function isSeekable() + { + return false; + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + throw new \RuntimeException('Cannot seek a PumpStream'); + } + + public function isWritable() + { + return false; + } + + public function write($string) + { + throw new \RuntimeException('Cannot write to a PumpStream'); + } + + public function isReadable() + { + return true; + } + + public function read($length) + { + $data = $this->buffer->read($length); + $readLen = strlen($data); + $this->tellPos += $readLen; + $remaining = $length - $readLen; + + if ($remaining) { + $this->pump($remaining); + $data .= $this->buffer->read($remaining); + $this->tellPos += strlen($data) - $readLen; + } + + return $data; + } + + public function getContents() + { + $result = ''; + while (!$this->eof()) { + $result .= $this->read(1000000); + } + + return $result; + } + + public function getMetadata($key = null) + { + if (!$key) { + return $this->metadata; + } + + return isset($this->metadata[$key]) ? $this->metadata[$key] : null; + } + + private function pump($length) + { + if ($this->source) { + do { + $data = call_user_func($this->source, $length); + if ($data === false || $data === null) { + $this->source = null; + return; + } + $this->buffer->write($data); + $length -= strlen($data); + } while ($length > 0); + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Query.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Query.php new file mode 100644 index 000000000..99e093050 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Query.php @@ -0,0 +1,108 @@ + '1', 'foo[b]' => '2'])`. + * + * @param string $str Query string to parse + * @param int|bool $urlEncoding How the query string is encoded + * + * @return array + */ + public static function parse($str, $urlEncoding = true) + { + $result = []; + + if ($str === '') { + return $result; + } + + if ($urlEncoding === true) { + $decoder = function ($value) { + return rawurldecode(str_replace('+', ' ', $value)); + }; + } elseif ($urlEncoding === PHP_QUERY_RFC3986) { + $decoder = 'rawurldecode'; + } elseif ($urlEncoding === PHP_QUERY_RFC1738) { + $decoder = 'urldecode'; + } else { + $decoder = function ($str) { return $str; }; + } + + foreach (explode('&', $str) as $kvp) { + $parts = explode('=', $kvp, 2); + $key = $decoder($parts[0]); + $value = isset($parts[1]) ? $decoder($parts[1]) : null; + if (!isset($result[$key])) { + $result[$key] = $value; + } else { + if (!is_array($result[$key])) { + $result[$key] = [$result[$key]]; + } + $result[$key][] = $value; + } + } + + return $result; + } + + /** + * Build a query string from an array of key value pairs. + * + * This function can use the return value of `parse()` to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like `http_build_query()` would). + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + * @return string + */ + public static function build(array $params, $encoding = PHP_QUERY_RFC3986) + { + if (!$params) { + return ''; + } + + if ($encoding === false) { + $encoder = function ($str) { return $str; }; + } elseif ($encoding === PHP_QUERY_RFC3986) { + $encoder = 'rawurlencode'; + } elseif ($encoding === PHP_QUERY_RFC1738) { + $encoder = 'urlencode'; + } else { + throw new \InvalidArgumentException('Invalid type'); + } + + $qs = ''; + foreach ($params as $k => $v) { + $k = $encoder($k); + if (!is_array($v)) { + $qs .= $k; + if ($v !== null) { + $qs .= '=' . $encoder($v); + } + $qs .= '&'; + } else { + foreach ($v as $vv) { + $qs .= $k; + if ($vv !== null) { + $qs .= '=' . $encoder($vv); + } + $qs .= '&'; + } + } + } + + return $qs ? (string) substr($qs, 0, -1) : ''; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Request.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Request.php new file mode 100644 index 000000000..89fbb1e62 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Request.php @@ -0,0 +1,152 @@ +assertMethod($method); + if (!($uri instanceof UriInterface)) { + $uri = new Uri($uri); + } + + $this->method = strtoupper($method); + $this->uri = $uri; + $this->setHeaders($headers); + $this->protocol = $version; + + if (!isset($this->headerNames['host'])) { + $this->updateHostFromUri(); + } + + if ($body !== '' && $body !== null) { + $this->stream = Utils::streamFor($body); + } + } + + public function getRequestTarget() + { + if ($this->requestTarget !== null) { + return $this->requestTarget; + } + + $target = $this->uri->getPath(); + if ($target == '') { + $target = '/'; + } + if ($this->uri->getQuery() != '') { + $target .= '?' . $this->uri->getQuery(); + } + + return $target; + } + + public function withRequestTarget($requestTarget) + { + if (preg_match('#\s#', $requestTarget)) { + throw new InvalidArgumentException( + 'Invalid request target provided; cannot contain whitespace' + ); + } + + $new = clone $this; + $new->requestTarget = $requestTarget; + return $new; + } + + public function getMethod() + { + return $this->method; + } + + public function withMethod($method) + { + $this->assertMethod($method); + $new = clone $this; + $new->method = strtoupper($method); + return $new; + } + + public function getUri() + { + return $this->uri; + } + + public function withUri(UriInterface $uri, $preserveHost = false) + { + if ($uri === $this->uri) { + return $this; + } + + $new = clone $this; + $new->uri = $uri; + + if (!$preserveHost || !isset($this->headerNames['host'])) { + $new->updateHostFromUri(); + } + + return $new; + } + + private function updateHostFromUri() + { + $host = $this->uri->getHost(); + + if ($host == '') { + return; + } + + if (($port = $this->uri->getPort()) !== null) { + $host .= ':' . $port; + } + + if (isset($this->headerNames['host'])) { + $header = $this->headerNames['host']; + } else { + $header = 'Host'; + $this->headerNames['host'] = 'Host'; + } + // Ensure Host is the first header. + // See: http://tools.ietf.org/html/rfc7230#section-5.4 + $this->headers = [$header => [$host]] + $this->headers; + } + + private function assertMethod($method) + { + if (!is_string($method) || $method === '') { + throw new \InvalidArgumentException('Method must be a non-empty string.'); + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Response.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Response.php new file mode 100644 index 000000000..36b85fb78 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Response.php @@ -0,0 +1,155 @@ + 'Continue', + 101 => 'Switching Protocols', + 102 => 'Processing', + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + 207 => 'Multi-status', + 208 => 'Already Reported', + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 306 => 'Switch Proxy', + 307 => 'Temporary Redirect', + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Time-out', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Large', + 415 => 'Unsupported Media Type', + 416 => 'Requested range not satisfiable', + 417 => 'Expectation Failed', + 418 => 'I\'m a teapot', + 422 => 'Unprocessable Entity', + 423 => 'Locked', + 424 => 'Failed Dependency', + 425 => 'Unordered Collection', + 426 => 'Upgrade Required', + 428 => 'Precondition Required', + 429 => 'Too Many Requests', + 431 => 'Request Header Fields Too Large', + 451 => 'Unavailable For Legal Reasons', + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Time-out', + 505 => 'HTTP Version not supported', + 506 => 'Variant Also Negotiates', + 507 => 'Insufficient Storage', + 508 => 'Loop Detected', + 511 => 'Network Authentication Required', + ]; + + /** @var string */ + private $reasonPhrase = ''; + + /** @var int */ + private $statusCode = 200; + + /** + * @param int $status Status code + * @param array $headers Response headers + * @param string|null|resource|StreamInterface $body Response body + * @param string $version Protocol version + * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) + */ + public function __construct( + $status = 200, + array $headers = [], + $body = null, + $version = '1.1', + $reason = null + ) { + $this->assertStatusCodeIsInteger($status); + $status = (int) $status; + $this->assertStatusCodeRange($status); + + $this->statusCode = $status; + + if ($body !== '' && $body !== null) { + $this->stream = Utils::streamFor($body); + } + + $this->setHeaders($headers); + if ($reason == '' && isset(self::$phrases[$this->statusCode])) { + $this->reasonPhrase = self::$phrases[$this->statusCode]; + } else { + $this->reasonPhrase = (string) $reason; + } + + $this->protocol = $version; + } + + public function getStatusCode() + { + return $this->statusCode; + } + + public function getReasonPhrase() + { + return $this->reasonPhrase; + } + + public function withStatus($code, $reasonPhrase = '') + { + $this->assertStatusCodeIsInteger($code); + $code = (int) $code; + $this->assertStatusCodeRange($code); + + $new = clone $this; + $new->statusCode = $code; + if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) { + $reasonPhrase = self::$phrases[$new->statusCode]; + } + $new->reasonPhrase = (string) $reasonPhrase; + return $new; + } + + private function assertStatusCodeIsInteger($statusCode) + { + if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) { + throw new \InvalidArgumentException('Status code must be an integer value.'); + } + } + + private function assertStatusCodeRange($statusCode) + { + if ($statusCode < 100 || $statusCode >= 600) { + throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.'); + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Rfc7230.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Rfc7230.php new file mode 100644 index 000000000..505e4742b --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Rfc7230.php @@ -0,0 +1,18 @@ +@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; + const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/ServerRequest.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/ServerRequest.php new file mode 100644 index 000000000..72c5566cf --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -0,0 +1,378 @@ +serverParams = $serverParams; + + parent::__construct($method, $uri, $headers, $body, $version); + } + + /** + * Return an UploadedFile instance array. + * + * @param array $files A array which respect $_FILES structure + * + * @return array + * + * @throws InvalidArgumentException for unrecognized values + */ + public static function normalizeFiles(array $files) + { + $normalized = []; + + foreach ($files as $key => $value) { + if ($value instanceof UploadedFileInterface) { + $normalized[$key] = $value; + } elseif (is_array($value) && isset($value['tmp_name'])) { + $normalized[$key] = self::createUploadedFileFromSpec($value); + } elseif (is_array($value)) { + $normalized[$key] = self::normalizeFiles($value); + continue; + } else { + throw new InvalidArgumentException('Invalid value in files specification'); + } + } + + return $normalized; + } + + /** + * Create and return an UploadedFile instance from a $_FILES specification. + * + * If the specification represents an array of values, this method will + * delegate to normalizeNestedFileSpec() and return that return value. + * + * @param array $value $_FILES struct + * @return array|UploadedFileInterface + */ + private static function createUploadedFileFromSpec(array $value) + { + if (is_array($value['tmp_name'])) { + return self::normalizeNestedFileSpec($value); + } + + return new UploadedFile( + $value['tmp_name'], + (int) $value['size'], + (int) $value['error'], + $value['name'], + $value['type'] + ); + } + + /** + * Normalize an array of file specifications. + * + * Loops through all nested files and returns a normalized array of + * UploadedFileInterface instances. + * + * @param array $files + * @return UploadedFileInterface[] + */ + private static function normalizeNestedFileSpec(array $files = []) + { + $normalizedFiles = []; + + foreach (array_keys($files['tmp_name']) as $key) { + $spec = [ + 'tmp_name' => $files['tmp_name'][$key], + 'size' => $files['size'][$key], + 'error' => $files['error'][$key], + 'name' => $files['name'][$key], + 'type' => $files['type'][$key], + ]; + $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); + } + + return $normalizedFiles; + } + + /** + * Return a ServerRequest populated with superglobals: + * $_GET + * $_POST + * $_COOKIE + * $_FILES + * $_SERVER + * + * @return ServerRequestInterface + */ + public static function fromGlobals() + { + $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; + $headers = getallheaders(); + $uri = self::getUriFromGlobals(); + $body = new CachingStream(new LazyOpenStream('php://input', 'r+')); + $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; + + $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); + + return $serverRequest + ->withCookieParams($_COOKIE) + ->withQueryParams($_GET) + ->withParsedBody($_POST) + ->withUploadedFiles(self::normalizeFiles($_FILES)); + } + + private static function extractHostAndPortFromAuthority($authority) + { + $uri = 'http://'.$authority; + $parts = parse_url($uri); + if (false === $parts) { + return [null, null]; + } + + $host = isset($parts['host']) ? $parts['host'] : null; + $port = isset($parts['port']) ? $parts['port'] : null; + + return [$host, $port]; + } + + /** + * Get a Uri populated with values from $_SERVER. + * + * @return UriInterface + */ + public static function getUriFromGlobals() + { + $uri = new Uri(''); + + $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); + + $hasPort = false; + if (isset($_SERVER['HTTP_HOST'])) { + list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); + if ($host !== null) { + $uri = $uri->withHost($host); + } + + if ($port !== null) { + $hasPort = true; + $uri = $uri->withPort($port); + } + } elseif (isset($_SERVER['SERVER_NAME'])) { + $uri = $uri->withHost($_SERVER['SERVER_NAME']); + } elseif (isset($_SERVER['SERVER_ADDR'])) { + $uri = $uri->withHost($_SERVER['SERVER_ADDR']); + } + + if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { + $uri = $uri->withPort($_SERVER['SERVER_PORT']); + } + + $hasQuery = false; + if (isset($_SERVER['REQUEST_URI'])) { + $requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2); + $uri = $uri->withPath($requestUriParts[0]); + if (isset($requestUriParts[1])) { + $hasQuery = true; + $uri = $uri->withQuery($requestUriParts[1]); + } + } + + if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { + $uri = $uri->withQuery($_SERVER['QUERY_STRING']); + } + + return $uri; + } + + + /** + * {@inheritdoc} + */ + public function getServerParams() + { + return $this->serverParams; + } + + /** + * {@inheritdoc} + */ + public function getUploadedFiles() + { + return $this->uploadedFiles; + } + + /** + * {@inheritdoc} + */ + public function withUploadedFiles(array $uploadedFiles) + { + $new = clone $this; + $new->uploadedFiles = $uploadedFiles; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getCookieParams() + { + return $this->cookieParams; + } + + /** + * {@inheritdoc} + */ + public function withCookieParams(array $cookies) + { + $new = clone $this; + $new->cookieParams = $cookies; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getQueryParams() + { + return $this->queryParams; + } + + /** + * {@inheritdoc} + */ + public function withQueryParams(array $query) + { + $new = clone $this; + $new->queryParams = $query; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getParsedBody() + { + return $this->parsedBody; + } + + /** + * {@inheritdoc} + */ + public function withParsedBody($data) + { + $new = clone $this; + $new->parsedBody = $data; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * {@inheritdoc} + */ + public function getAttribute($attribute, $default = null) + { + if (false === array_key_exists($attribute, $this->attributes)) { + return $default; + } + + return $this->attributes[$attribute]; + } + + /** + * {@inheritdoc} + */ + public function withAttribute($attribute, $value) + { + $new = clone $this; + $new->attributes[$attribute] = $value; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function withoutAttribute($attribute) + { + if (false === array_key_exists($attribute, $this->attributes)) { + return $this; + } + + $new = clone $this; + unset($new->attributes[$attribute]); + + return $new; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Stream.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Stream.php new file mode 100644 index 000000000..3865d6d6a --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Stream.php @@ -0,0 +1,270 @@ +size = $options['size']; + } + + $this->customMetadata = isset($options['metadata']) + ? $options['metadata'] + : []; + + $this->stream = $stream; + $meta = stream_get_meta_data($this->stream); + $this->seekable = $meta['seekable']; + $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']); + $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']); + $this->uri = $this->getMetadata('uri'); + } + + /** + * Closes the stream when the destructed + */ + public function __destruct() + { + $this->close(); + } + + public function __toString() + { + try { + if ($this->isSeekable()) { + $this->seek(0); + } + return $this->getContents(); + } catch (\Exception $e) { + return ''; + } + } + + public function getContents() + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + $contents = stream_get_contents($this->stream); + + if ($contents === false) { + throw new \RuntimeException('Unable to read stream contents'); + } + + return $contents; + } + + public function close() + { + if (isset($this->stream)) { + if (is_resource($this->stream)) { + fclose($this->stream); + } + $this->detach(); + } + } + + public function detach() + { + if (!isset($this->stream)) { + return null; + } + + $result = $this->stream; + unset($this->stream); + $this->size = $this->uri = null; + $this->readable = $this->writable = $this->seekable = false; + + return $result; + } + + public function getSize() + { + if ($this->size !== null) { + return $this->size; + } + + if (!isset($this->stream)) { + return null; + } + + // Clear the stat cache if the stream has a URI + if ($this->uri) { + clearstatcache(true, $this->uri); + } + + $stats = fstat($this->stream); + if (isset($stats['size'])) { + $this->size = $stats['size']; + return $this->size; + } + + return null; + } + + public function isReadable() + { + return $this->readable; + } + + public function isWritable() + { + return $this->writable; + } + + public function isSeekable() + { + return $this->seekable; + } + + public function eof() + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + return feof($this->stream); + } + + public function tell() + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + $result = ftell($this->stream); + + if ($result === false) { + throw new \RuntimeException('Unable to determine stream position'); + } + + return $result; + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + $whence = (int) $whence; + + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->seekable) { + throw new \RuntimeException('Stream is not seekable'); + } + if (fseek($this->stream, $offset, $whence) === -1) { + throw new \RuntimeException('Unable to seek to stream position ' + . $offset . ' with whence ' . var_export($whence, true)); + } + } + + public function read($length) + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->readable) { + throw new \RuntimeException('Cannot read from non-readable stream'); + } + if ($length < 0) { + throw new \RuntimeException('Length parameter cannot be negative'); + } + + if (0 === $length) { + return ''; + } + + $string = fread($this->stream, $length); + if (false === $string) { + throw new \RuntimeException('Unable to read from stream'); + } + + return $string; + } + + public function write($string) + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->writable) { + throw new \RuntimeException('Cannot write to a non-writable stream'); + } + + // We can't know the size after writing anything + $this->size = null; + $result = fwrite($this->stream, $string); + + if ($result === false) { + throw new \RuntimeException('Unable to write to stream'); + } + + return $result; + } + + public function getMetadata($key = null) + { + if (!isset($this->stream)) { + return $key ? null : []; + } elseif (!$key) { + return $this->customMetadata + stream_get_meta_data($this->stream); + } elseif (isset($this->customMetadata[$key])) { + return $this->customMetadata[$key]; + } + + $meta = stream_get_meta_data($this->stream); + + return isset($meta[$key]) ? $meta[$key] : null; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php new file mode 100644 index 000000000..093023b1c --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php @@ -0,0 +1,151 @@ +stream = $stream; + } + + /** + * Magic method used to create a new stream if streams are not added in + * the constructor of a decorator (e.g., LazyOpenStream). + * + * @param string $name Name of the property (allows "stream" only). + * + * @return StreamInterface + */ + public function __get($name) + { + if ($name == 'stream') { + $this->stream = $this->createStream(); + return $this->stream; + } + + throw new \UnexpectedValueException("$name not found on class"); + } + + public function __toString() + { + try { + if ($this->isSeekable()) { + $this->seek(0); + } + return $this->getContents(); + } catch (\Exception $e) { + // Really, PHP? https://bugs.php.net/bug.php?id=53648 + trigger_error('StreamDecorator::__toString exception: ' + . (string) $e, E_USER_ERROR); + return ''; + } + } + + public function getContents() + { + return Utils::copyToString($this); + } + + /** + * Allow decorators to implement custom methods + * + * @param string $method Missing method name + * @param array $args Method arguments + * + * @return mixed + */ + public function __call($method, array $args) + { + $result = call_user_func_array([$this->stream, $method], $args); + + // Always return the wrapped object if the result is a return $this + return $result === $this->stream ? $this : $result; + } + + public function close() + { + $this->stream->close(); + } + + public function getMetadata($key = null) + { + return $this->stream->getMetadata($key); + } + + public function detach() + { + return $this->stream->detach(); + } + + public function getSize() + { + return $this->stream->getSize(); + } + + public function eof() + { + return $this->stream->eof(); + } + + public function tell() + { + return $this->stream->tell(); + } + + public function isReadable() + { + return $this->stream->isReadable(); + } + + public function isWritable() + { + return $this->stream->isWritable(); + } + + public function isSeekable() + { + return $this->stream->isSeekable(); + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + $this->stream->seek($offset, $whence); + } + + public function read($length) + { + return $this->stream->read($length); + } + + public function write($string) + { + return $this->stream->write($string); + } + + /** + * Implement in subclasses to dynamically create streams when requested. + * + * @return StreamInterface + * + * @throws \BadMethodCallException + */ + protected function createStream() + { + throw new \BadMethodCallException('Not implemented'); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/StreamWrapper.php new file mode 100644 index 000000000..eac653539 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/StreamWrapper.php @@ -0,0 +1,163 @@ +isReadable()) { + $mode = $stream->isWritable() ? 'r+' : 'r'; + } elseif ($stream->isWritable()) { + $mode = 'w'; + } else { + throw new \InvalidArgumentException('The stream must be readable, ' + . 'writable, or both.'); + } + + return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream)); + } + + /** + * Creates a stream context that can be used to open a stream as a php stream resource. + * + * @param StreamInterface $stream + * + * @return resource + */ + public static function createStreamContext(StreamInterface $stream) + { + return stream_context_create([ + 'guzzle' => ['stream' => $stream] + ]); + } + + /** + * Registers the stream wrapper if needed + */ + public static function register() + { + if (!in_array('guzzle', stream_get_wrappers())) { + stream_wrapper_register('guzzle', __CLASS__); + } + } + + public function stream_open($path, $mode, $options, &$opened_path) + { + $options = stream_context_get_options($this->context); + + if (!isset($options['guzzle']['stream'])) { + return false; + } + + $this->mode = $mode; + $this->stream = $options['guzzle']['stream']; + + return true; + } + + public function stream_read($count) + { + return $this->stream->read($count); + } + + public function stream_write($data) + { + return (int) $this->stream->write($data); + } + + public function stream_tell() + { + return $this->stream->tell(); + } + + public function stream_eof() + { + return $this->stream->eof(); + } + + public function stream_seek($offset, $whence) + { + $this->stream->seek($offset, $whence); + + return true; + } + + public function stream_cast($cast_as) + { + $stream = clone($this->stream); + + return $stream->detach(); + } + + public function stream_stat() + { + static $modeMap = [ + 'r' => 33060, + 'rb' => 33060, + 'r+' => 33206, + 'w' => 33188, + 'wb' => 33188 + ]; + + return [ + 'dev' => 0, + 'ino' => 0, + 'mode' => $modeMap[$this->mode], + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => $this->stream->getSize() ?: 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0 + ]; + } + + public function url_stat($path, $flags) + { + return [ + 'dev' => 0, + 'ino' => 0, + 'mode' => 0, + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0 + ]; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/UploadedFile.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/UploadedFile.php new file mode 100644 index 000000000..a0ea59e09 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/UploadedFile.php @@ -0,0 +1,325 @@ +setError($errorStatus); + $this->setSize($size); + $this->setClientFilename($clientFilename); + $this->setClientMediaType($clientMediaType); + + if ($this->isOk()) { + $this->setStreamOrFile($streamOrFile); + } + } + + /** + * Depending on the value set file or stream variable + * + * @param mixed $streamOrFile + * + * @throws InvalidArgumentException + */ + private function setStreamOrFile($streamOrFile) + { + if (is_string($streamOrFile)) { + $this->file = $streamOrFile; + } elseif (is_resource($streamOrFile)) { + $this->stream = new Stream($streamOrFile); + } elseif ($streamOrFile instanceof StreamInterface) { + $this->stream = $streamOrFile; + } else { + throw new InvalidArgumentException( + 'Invalid stream or file provided for UploadedFile' + ); + } + } + + /** + * @param int $error + * + * @throws InvalidArgumentException + */ + private function setError($error) + { + if (false === is_int($error)) { + throw new InvalidArgumentException( + 'Upload file error status must be an integer' + ); + } + + if (false === in_array($error, UploadedFile::$errors)) { + throw new InvalidArgumentException( + 'Invalid error status for UploadedFile' + ); + } + + $this->error = $error; + } + + /** + * @param int $size + * + * @throws InvalidArgumentException + */ + private function setSize($size) + { + if (false === is_int($size)) { + throw new InvalidArgumentException( + 'Upload file size must be an integer' + ); + } + + $this->size = $size; + } + + /** + * @param mixed $param + * @return boolean + */ + private function isStringOrNull($param) + { + return in_array(gettype($param), ['string', 'NULL']); + } + + /** + * @param mixed $param + * @return boolean + */ + private function isStringNotEmpty($param) + { + return is_string($param) && false === empty($param); + } + + /** + * @param string|null $clientFilename + * + * @throws InvalidArgumentException + */ + private function setClientFilename($clientFilename) + { + if (false === $this->isStringOrNull($clientFilename)) { + throw new InvalidArgumentException( + 'Upload file client filename must be a string or null' + ); + } + + $this->clientFilename = $clientFilename; + } + + /** + * @param string|null $clientMediaType + * + * @throws InvalidArgumentException + */ + private function setClientMediaType($clientMediaType) + { + if (false === $this->isStringOrNull($clientMediaType)) { + throw new InvalidArgumentException( + 'Upload file client media type must be a string or null' + ); + } + + $this->clientMediaType = $clientMediaType; + } + + /** + * Return true if there is no upload error + * + * @return boolean + */ + private function isOk() + { + return $this->error === UPLOAD_ERR_OK; + } + + /** + * @return boolean + */ + public function isMoved() + { + return $this->moved; + } + + /** + * @throws RuntimeException if is moved or not ok + */ + private function validateActive() + { + if (false === $this->isOk()) { + throw new RuntimeException('Cannot retrieve stream due to upload error'); + } + + if ($this->isMoved()) { + throw new RuntimeException('Cannot retrieve stream after it has already been moved'); + } + } + + /** + * {@inheritdoc} + * + * @throws RuntimeException if the upload was not successful. + */ + public function getStream() + { + $this->validateActive(); + + if ($this->stream instanceof StreamInterface) { + return $this->stream; + } + + return new LazyOpenStream($this->file, 'r+'); + } + + /** + * {@inheritdoc} + * + * @see http://php.net/is_uploaded_file + * @see http://php.net/move_uploaded_file + * + * @param string $targetPath Path to which to move the uploaded file. + * + * @throws RuntimeException if the upload was not successful. + * @throws InvalidArgumentException if the $path specified is invalid. + * @throws RuntimeException on any error during the move operation, or on + * the second or subsequent call to the method. + */ + public function moveTo($targetPath) + { + $this->validateActive(); + + if (false === $this->isStringNotEmpty($targetPath)) { + throw new InvalidArgumentException( + 'Invalid path provided for move operation; must be a non-empty string' + ); + } + + if ($this->file) { + $this->moved = php_sapi_name() == 'cli' + ? rename($this->file, $targetPath) + : move_uploaded_file($this->file, $targetPath); + } else { + Utils::copyToStream( + $this->getStream(), + new LazyOpenStream($targetPath, 'w') + ); + + $this->moved = true; + } + + if (false === $this->moved) { + throw new RuntimeException( + sprintf('Uploaded file could not be moved to %s', $targetPath) + ); + } + } + + /** + * {@inheritdoc} + * + * @return int|null The file size in bytes or null if unknown. + */ + public function getSize() + { + return $this->size; + } + + /** + * {@inheritdoc} + * + * @see http://php.net/manual/en/features.file-upload.errors.php + * @return int One of PHP's UPLOAD_ERR_XXX constants. + */ + public function getError() + { + return $this->error; + } + + /** + * {@inheritdoc} + * + * @return string|null The filename sent by the client or null if none + * was provided. + */ + public function getClientFilename() + { + return $this->clientFilename; + } + + /** + * {@inheritdoc} + */ + public function getClientMediaType() + { + return $this->clientMediaType; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Uri.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Uri.php new file mode 100644 index 000000000..a0d73917e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Uri.php @@ -0,0 +1,761 @@ + 80, + 'https' => 443, + 'ftp' => 21, + 'gopher' => 70, + 'nntp' => 119, + 'news' => 119, + 'telnet' => 23, + 'tn3270' => 23, + 'imap' => 143, + 'pop' => 110, + 'ldap' => 389, + ]; + + private static $charUnreserved = 'a-zA-Z0-9_\-\.~'; + private static $charSubDelims = '!\$&\'\(\)\*\+,;='; + private static $replaceQuery = ['=' => '%3D', '&' => '%26']; + + /** @var string Uri scheme. */ + private $scheme = ''; + + /** @var string Uri user info. */ + private $userInfo = ''; + + /** @var string Uri host. */ + private $host = ''; + + /** @var int|null Uri port. */ + private $port; + + /** @var string Uri path. */ + private $path = ''; + + /** @var string Uri query string. */ + private $query = ''; + + /** @var string Uri fragment. */ + private $fragment = ''; + + /** + * @param string $uri URI to parse + */ + public function __construct($uri = '') + { + // weak type check to also accept null until we can add scalar type hints + if ($uri != '') { + $parts = parse_url($uri); + if ($parts === false) { + throw new \InvalidArgumentException("Unable to parse URI: $uri"); + } + $this->applyParts($parts); + } + } + + public function __toString() + { + return self::composeComponents( + $this->scheme, + $this->getAuthority(), + $this->path, + $this->query, + $this->fragment + ); + } + + /** + * Composes a URI reference string from its various components. + * + * Usually this method does not need to be called manually but instead is used indirectly via + * `Psr\Http\Message\UriInterface::__toString`. + * + * PSR-7 UriInterface treats an empty component the same as a missing component as + * getQuery(), getFragment() etc. always return a string. This explains the slight + * difference to RFC 3986 Section 5.3. + * + * Another adjustment is that the authority separator is added even when the authority is missing/empty + * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with + * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But + * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to + * that format). + * + * @param string $scheme + * @param string $authority + * @param string $path + * @param string $query + * @param string $fragment + * + * @return string + * + * @link https://tools.ietf.org/html/rfc3986#section-5.3 + */ + public static function composeComponents($scheme, $authority, $path, $query, $fragment) + { + $uri = ''; + + // weak type checks to also accept null until we can add scalar type hints + if ($scheme != '') { + $uri .= $scheme . ':'; + } + + if ($authority != ''|| $scheme === 'file') { + $uri .= '//' . $authority; + } + + $uri .= $path; + + if ($query != '') { + $uri .= '?' . $query; + } + + if ($fragment != '') { + $uri .= '#' . $fragment; + } + + return $uri; + } + + /** + * Whether the URI has the default port of the current scheme. + * + * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used + * independently of the implementation. + * + * @param UriInterface $uri + * + * @return bool + */ + public static function isDefaultPort(UriInterface $uri) + { + return $uri->getPort() === null + || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]); + } + + /** + * Whether the URI is absolute, i.e. it has a scheme. + * + * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true + * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative + * to another URI, the base URI. Relative references can be divided into several forms: + * - network-path references, e.g. '//example.com/path' + * - absolute-path references, e.g. '/path' + * - relative-path references, e.g. 'subpath' + * + * @param UriInterface $uri + * + * @return bool + * @see Uri::isNetworkPathReference + * @see Uri::isAbsolutePathReference + * @see Uri::isRelativePathReference + * @link https://tools.ietf.org/html/rfc3986#section-4 + */ + public static function isAbsolute(UriInterface $uri) + { + return $uri->getScheme() !== ''; + } + + /** + * Whether the URI is a network-path reference. + * + * A relative reference that begins with two slash characters is termed an network-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isNetworkPathReference(UriInterface $uri) + { + return $uri->getScheme() === '' && $uri->getAuthority() !== ''; + } + + /** + * Whether the URI is a absolute-path reference. + * + * A relative reference that begins with a single slash character is termed an absolute-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isAbsolutePathReference(UriInterface $uri) + { + return $uri->getScheme() === '' + && $uri->getAuthority() === '' + && isset($uri->getPath()[0]) + && $uri->getPath()[0] === '/'; + } + + /** + * Whether the URI is a relative-path reference. + * + * A relative reference that does not begin with a slash character is termed a relative-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isRelativePathReference(UriInterface $uri) + { + return $uri->getScheme() === '' + && $uri->getAuthority() === '' + && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); + } + + /** + * Whether the URI is a same-document reference. + * + * A same-document reference refers to a URI that is, aside from its fragment + * component, identical to the base URI. When no base URI is given, only an empty + * URI reference (apart from its fragment) is considered a same-document reference. + * + * @param UriInterface $uri The URI to check + * @param UriInterface|null $base An optional base URI to compare against + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.4 + */ + public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) + { + if ($base !== null) { + $uri = UriResolver::resolve($base, $uri); + + return ($uri->getScheme() === $base->getScheme()) + && ($uri->getAuthority() === $base->getAuthority()) + && ($uri->getPath() === $base->getPath()) + && ($uri->getQuery() === $base->getQuery()); + } + + return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; + } + + /** + * Removes dot segments from a path and returns the new path. + * + * @param string $path + * + * @return string + * + * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead. + * @see UriResolver::removeDotSegments + */ + public static function removeDotSegments($path) + { + return UriResolver::removeDotSegments($path); + } + + /** + * Converts the relative URI into a new URI that is resolved against the base URI. + * + * @param UriInterface $base Base URI + * @param string|UriInterface $rel Relative URI + * + * @return UriInterface + * + * @deprecated since version 1.4. Use UriResolver::resolve instead. + * @see UriResolver::resolve + */ + public static function resolve(UriInterface $base, $rel) + { + if (!($rel instanceof UriInterface)) { + $rel = new self($rel); + } + + return UriResolver::resolve($base, $rel); + } + + /** + * Creates a new URI with a specific query string value removed. + * + * Any existing query string values that exactly match the provided key are + * removed. + * + * @param UriInterface $uri URI to use as a base. + * @param string $key Query string key to remove. + * + * @return UriInterface + */ + public static function withoutQueryValue(UriInterface $uri, $key) + { + $result = self::getFilteredQueryString($uri, [$key]); + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a new URI with a specific query string value. + * + * Any existing query string values that exactly match the provided key are + * removed and replaced with the given key value pair. + * + * A value of null will set the query string key without a value, e.g. "key" + * instead of "key=value". + * + * @param UriInterface $uri URI to use as a base. + * @param string $key Key to set. + * @param string|null $value Value to set + * + * @return UriInterface + */ + public static function withQueryValue(UriInterface $uri, $key, $value) + { + $result = self::getFilteredQueryString($uri, [$key]); + + $result[] = self::generateQueryString($key, $value); + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a new URI with multiple specific query string values. + * + * It has the same behavior as withQueryValue() but for an associative array of key => value. + * + * @param UriInterface $uri URI to use as a base. + * @param array $keyValueArray Associative array of key and values + * + * @return UriInterface + */ + public static function withQueryValues(UriInterface $uri, array $keyValueArray) + { + $result = self::getFilteredQueryString($uri, array_keys($keyValueArray)); + + foreach ($keyValueArray as $key => $value) { + $result[] = self::generateQueryString($key, $value); + } + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a URI from a hash of `parse_url` components. + * + * @param array $parts + * + * @return UriInterface + * @link http://php.net/manual/en/function.parse-url.php + * + * @throws \InvalidArgumentException If the components do not form a valid URI. + */ + public static function fromParts(array $parts) + { + $uri = new self(); + $uri->applyParts($parts); + $uri->validateState(); + + return $uri; + } + + public function getScheme() + { + return $this->scheme; + } + + public function getAuthority() + { + $authority = $this->host; + if ($this->userInfo !== '') { + $authority = $this->userInfo . '@' . $authority; + } + + if ($this->port !== null) { + $authority .= ':' . $this->port; + } + + return $authority; + } + + public function getUserInfo() + { + return $this->userInfo; + } + + public function getHost() + { + return $this->host; + } + + public function getPort() + { + return $this->port; + } + + public function getPath() + { + return $this->path; + } + + public function getQuery() + { + return $this->query; + } + + public function getFragment() + { + return $this->fragment; + } + + public function withScheme($scheme) + { + $scheme = $this->filterScheme($scheme); + + if ($this->scheme === $scheme) { + return $this; + } + + $new = clone $this; + $new->scheme = $scheme; + $new->removeDefaultPort(); + $new->validateState(); + + return $new; + } + + public function withUserInfo($user, $password = null) + { + $info = $this->filterUserInfoComponent($user); + if ($password !== null) { + $info .= ':' . $this->filterUserInfoComponent($password); + } + + if ($this->userInfo === $info) { + return $this; + } + + $new = clone $this; + $new->userInfo = $info; + $new->validateState(); + + return $new; + } + + public function withHost($host) + { + $host = $this->filterHost($host); + + if ($this->host === $host) { + return $this; + } + + $new = clone $this; + $new->host = $host; + $new->validateState(); + + return $new; + } + + public function withPort($port) + { + $port = $this->filterPort($port); + + if ($this->port === $port) { + return $this; + } + + $new = clone $this; + $new->port = $port; + $new->removeDefaultPort(); + $new->validateState(); + + return $new; + } + + public function withPath($path) + { + $path = $this->filterPath($path); + + if ($this->path === $path) { + return $this; + } + + $new = clone $this; + $new->path = $path; + $new->validateState(); + + return $new; + } + + public function withQuery($query) + { + $query = $this->filterQueryAndFragment($query); + + if ($this->query === $query) { + return $this; + } + + $new = clone $this; + $new->query = $query; + + return $new; + } + + public function withFragment($fragment) + { + $fragment = $this->filterQueryAndFragment($fragment); + + if ($this->fragment === $fragment) { + return $this; + } + + $new = clone $this; + $new->fragment = $fragment; + + return $new; + } + + /** + * Apply parse_url parts to a URI. + * + * @param array $parts Array of parse_url parts to apply. + */ + private function applyParts(array $parts) + { + $this->scheme = isset($parts['scheme']) + ? $this->filterScheme($parts['scheme']) + : ''; + $this->userInfo = isset($parts['user']) + ? $this->filterUserInfoComponent($parts['user']) + : ''; + $this->host = isset($parts['host']) + ? $this->filterHost($parts['host']) + : ''; + $this->port = isset($parts['port']) + ? $this->filterPort($parts['port']) + : null; + $this->path = isset($parts['path']) + ? $this->filterPath($parts['path']) + : ''; + $this->query = isset($parts['query']) + ? $this->filterQueryAndFragment($parts['query']) + : ''; + $this->fragment = isset($parts['fragment']) + ? $this->filterQueryAndFragment($parts['fragment']) + : ''; + if (isset($parts['pass'])) { + $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']); + } + + $this->removeDefaultPort(); + } + + /** + * @param string $scheme + * + * @return string + * + * @throws \InvalidArgumentException If the scheme is invalid. + */ + private function filterScheme($scheme) + { + if (!is_string($scheme)) { + throw new \InvalidArgumentException('Scheme must be a string'); + } + + return strtolower($scheme); + } + + /** + * @param string $component + * + * @return string + * + * @throws \InvalidArgumentException If the user info is invalid. + */ + private function filterUserInfoComponent($component) + { + if (!is_string($component)) { + throw new \InvalidArgumentException('User info must be a string'); + } + + return preg_replace_callback( + '/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $component + ); + } + + /** + * @param string $host + * + * @return string + * + * @throws \InvalidArgumentException If the host is invalid. + */ + private function filterHost($host) + { + if (!is_string($host)) { + throw new \InvalidArgumentException('Host must be a string'); + } + + return strtolower($host); + } + + /** + * @param int|null $port + * + * @return int|null + * + * @throws \InvalidArgumentException If the port is invalid. + */ + private function filterPort($port) + { + if ($port === null) { + return null; + } + + $port = (int) $port; + if (0 > $port || 0xffff < $port) { + throw new \InvalidArgumentException( + sprintf('Invalid port: %d. Must be between 0 and 65535', $port) + ); + } + + return $port; + } + + /** + * @param UriInterface $uri + * @param array $keys + * + * @return array + */ + private static function getFilteredQueryString(UriInterface $uri, array $keys) + { + $current = $uri->getQuery(); + + if ($current === '') { + return []; + } + + $decodedKeys = array_map('rawurldecode', $keys); + + return array_filter(explode('&', $current), function ($part) use ($decodedKeys) { + return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true); + }); + } + + /** + * @param string $key + * @param string|null $value + * + * @return string + */ + private static function generateQueryString($key, $value) + { + // Query string separators ("=", "&") within the key or value need to be encoded + // (while preventing double-encoding) before setting the query string. All other + // chars that need percent-encoding will be encoded by withQuery(). + $queryString = strtr($key, self::$replaceQuery); + + if ($value !== null) { + $queryString .= '=' . strtr($value, self::$replaceQuery); + } + + return $queryString; + } + + private function removeDefaultPort() + { + if ($this->port !== null && self::isDefaultPort($this)) { + $this->port = null; + } + } + + /** + * Filters the path of a URI + * + * @param string $path + * + * @return string + * + * @throws \InvalidArgumentException If the path is invalid. + */ + private function filterPath($path) + { + if (!is_string($path)) { + throw new \InvalidArgumentException('Path must be a string'); + } + + return preg_replace_callback( + '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $path + ); + } + + /** + * Filters the query string or fragment of a URI. + * + * @param string $str + * + * @return string + * + * @throws \InvalidArgumentException If the query or fragment is invalid. + */ + private function filterQueryAndFragment($str) + { + if (!is_string($str)) { + throw new \InvalidArgumentException('Query and fragment must be a string'); + } + + return preg_replace_callback( + '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $str + ); + } + + private function rawurlencodeMatchZero(array $match) + { + return rawurlencode($match[0]); + } + + private function validateState() + { + if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { + $this->host = self::HTTP_DEFAULT_HOST; + } + + if ($this->getAuthority() === '') { + if (0 === strpos($this->path, '//')) { + throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"'); + } + if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { + throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon'); + } + } elseif (isset($this->path[0]) && $this->path[0] !== '/') { + @trigger_error( + 'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' . + 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', + E_USER_DEPRECATED + ); + $this->path = '/'. $this->path; + //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/UriNormalizer.php new file mode 100644 index 000000000..2b9174a5e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/UriNormalizer.php @@ -0,0 +1,217 @@ +getPath() === '' && + ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') + ) { + $uri = $uri->withPath('/'); + } + + if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { + $uri = $uri->withHost(''); + } + + if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { + $uri = $uri->withPort(null); + } + + if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { + $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); + } + + if ($flags & self::REMOVE_DUPLICATE_SLASHES) { + $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath())); + } + + if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { + $queryKeyValues = explode('&', $uri->getQuery()); + sort($queryKeyValues); + $uri = $uri->withQuery(implode('&', $queryKeyValues)); + } + + return $uri; + } + + /** + * Whether two URIs can be considered equivalent. + * + * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also + * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be + * resolved against the same base URI. If this is not the case, determination of equivalence or difference of + * relative references does not mean anything. + * + * @param UriInterface $uri1 An URI to compare + * @param UriInterface $uri2 An URI to compare + * @param int $normalizations A bitmask of normalizations to apply, see constants + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-6.1 + */ + public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) + { + return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); + } + + private static function capitalizePercentEncoding(UriInterface $uri) + { + $regex = '/(?:%[A-Fa-f0-9]{2})++/'; + + $callback = function (array $match) { + return strtoupper($match[0]); + }; + + return + $uri->withPath( + preg_replace_callback($regex, $callback, $uri->getPath()) + )->withQuery( + preg_replace_callback($regex, $callback, $uri->getQuery()) + ); + } + + private static function decodeUnreservedCharacters(UriInterface $uri) + { + $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; + + $callback = function (array $match) { + return rawurldecode($match[0]); + }; + + return + $uri->withPath( + preg_replace_callback($regex, $callback, $uri->getPath()) + )->withQuery( + preg_replace_callback($regex, $callback, $uri->getQuery()) + ); + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/UriResolver.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/UriResolver.php new file mode 100644 index 000000000..26cecd53a --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/UriResolver.php @@ -0,0 +1,220 @@ +getScheme() != '') { + return $rel->withPath(self::removeDotSegments($rel->getPath())); + } + + if ($rel->getAuthority() != '') { + $targetAuthority = $rel->getAuthority(); + $targetPath = self::removeDotSegments($rel->getPath()); + $targetQuery = $rel->getQuery(); + } else { + $targetAuthority = $base->getAuthority(); + if ($rel->getPath() === '') { + $targetPath = $base->getPath(); + $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); + } else { + if ($rel->getPath()[0] === '/') { + $targetPath = $rel->getPath(); + } else { + if ($targetAuthority != '' && $base->getPath() === '') { + $targetPath = '/' . $rel->getPath(); + } else { + $lastSlashPos = strrpos($base->getPath(), '/'); + if ($lastSlashPos === false) { + $targetPath = $rel->getPath(); + } else { + $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); + } + } + } + $targetPath = self::removeDotSegments($targetPath); + $targetQuery = $rel->getQuery(); + } + } + + return new Uri(Uri::composeComponents( + $base->getScheme(), + $targetAuthority, + $targetPath, + $targetQuery, + $rel->getFragment() + )); + } + + /** + * Returns the target URI as a relative reference from the base URI. + * + * This method is the counterpart to resolve(): + * + * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) + * + * One use-case is to use the current request URI as base URI and then generate relative links in your documents + * to reduce the document size or offer self-contained downloadable document archives. + * + * $base = new Uri('http://example.com/a/b/'); + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. + * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. + * + * This method also accepts a target that is already relative and will try to relativize it further. Only a + * relative-path reference will be returned as-is. + * + * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well + * + * @param UriInterface $base Base URI + * @param UriInterface $target Target URI + * + * @return UriInterface The relative URI reference + */ + public static function relativize(UriInterface $base, UriInterface $target) + { + if ($target->getScheme() !== '' && + ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') + ) { + return $target; + } + + if (Uri::isRelativePathReference($target)) { + // As the target is already highly relative we return it as-is. It would be possible to resolve + // the target with `$target = self::resolve($base, $target);` and then try make it more relative + // by removing a duplicate query. But let's not do that automatically. + return $target; + } + + if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { + return $target->withScheme(''); + } + + // We must remove the path before removing the authority because if the path starts with two slashes, the URI + // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also + // invalid. + $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); + + if ($base->getPath() !== $target->getPath()) { + return $emptyPathUri->withPath(self::getRelativePath($base, $target)); + } + + if ($base->getQuery() === $target->getQuery()) { + // Only the target fragment is left. And it must be returned even if base and target fragment are the same. + return $emptyPathUri->withQuery(''); + } + + // If the base URI has a query but the target has none, we cannot return an empty path reference as it would + // inherit the base query component when resolving. + if ($target->getQuery() === '') { + $segments = explode('/', $target->getPath()); + $lastSegment = end($segments); + + return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); + } + + return $emptyPathUri; + } + + private static function getRelativePath(UriInterface $base, UriInterface $target) + { + $sourceSegments = explode('/', $base->getPath()); + $targetSegments = explode('/', $target->getPath()); + array_pop($sourceSegments); + $targetLastSegment = array_pop($targetSegments); + foreach ($sourceSegments as $i => $segment) { + if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { + unset($sourceSegments[$i], $targetSegments[$i]); + } else { + break; + } + } + $targetSegments[] = $targetLastSegment; + $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); + + // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". + // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used + // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. + if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) { + $relativePath = "./$relativePath"; + } elseif ('/' === $relativePath[0]) { + if ($base->getAuthority() != '' && $base->getPath() === '') { + // In this case an extra slash is added by resolve() automatically. So we must not add one here. + $relativePath = ".$relativePath"; + } else { + $relativePath = "./$relativePath"; + } + } + + return $relativePath; + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Utils.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Utils.php new file mode 100644 index 000000000..86960dde2 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/Utils.php @@ -0,0 +1,398 @@ + $keys + * + * @return array + */ + public static function caselessRemove($keys, array $data) + { + $result = []; + + foreach ($keys as &$key) { + $key = strtolower($key); + } + + foreach ($data as $k => $v) { + if (!in_array(strtolower($k), $keys)) { + $result[$k] = $v; + } + } + + return $result; + } + + /** + * Copy the contents of a stream into another stream until the given number + * of bytes have been read. + * + * @param StreamInterface $source Stream to read from + * @param StreamInterface $dest Stream to write to + * @param int $maxLen Maximum number of bytes to read. Pass -1 + * to read the entire stream. + * + * @throws \RuntimeException on error. + */ + public static function copyToStream(StreamInterface $source, StreamInterface $dest, $maxLen = -1) + { + $bufferSize = 8192; + + if ($maxLen === -1) { + while (!$source->eof()) { + if (!$dest->write($source->read($bufferSize))) { + break; + } + } + } else { + $remaining = $maxLen; + while ($remaining > 0 && !$source->eof()) { + $buf = $source->read(min($bufferSize, $remaining)); + $len = strlen($buf); + if (!$len) { + break; + } + $remaining -= $len; + $dest->write($buf); + } + } + } + + /** + * Copy the contents of a stream into a string until the given number of + * bytes have been read. + * + * @param StreamInterface $stream Stream to read + * @param int $maxLen Maximum number of bytes to read. Pass -1 + * to read the entire stream. + * @return string + * + * @throws \RuntimeException on error. + */ + public static function copyToString(StreamInterface $stream, $maxLen = -1) + { + $buffer = ''; + + if ($maxLen === -1) { + while (!$stream->eof()) { + $buf = $stream->read(1048576); + // Using a loose equality here to match on '' and false. + if ($buf == null) { + break; + } + $buffer .= $buf; + } + return $buffer; + } + + $len = 0; + while (!$stream->eof() && $len < $maxLen) { + $buf = $stream->read($maxLen - $len); + // Using a loose equality here to match on '' and false. + if ($buf == null) { + break; + } + $buffer .= $buf; + $len = strlen($buffer); + } + + return $buffer; + } + + /** + * Calculate a hash of a stream. + * + * This method reads the entire stream to calculate a rolling hash, based + * on PHP's `hash_init` functions. + * + * @param StreamInterface $stream Stream to calculate the hash for + * @param string $algo Hash algorithm (e.g. md5, crc32, etc) + * @param bool $rawOutput Whether or not to use raw output + * + * @return string Returns the hash of the stream + * + * @throws \RuntimeException on error. + */ + public static function hash(StreamInterface $stream, $algo, $rawOutput = false) + { + $pos = $stream->tell(); + + if ($pos > 0) { + $stream->rewind(); + } + + $ctx = hash_init($algo); + while (!$stream->eof()) { + hash_update($ctx, $stream->read(1048576)); + } + + $out = hash_final($ctx, (bool) $rawOutput); + $stream->seek($pos); + + return $out; + } + + /** + * Clone and modify a request with the given changes. + * + * This method is useful for reducing the number of clones needed to mutate + * a message. + * + * The changes can be one of: + * - method: (string) Changes the HTTP method. + * - set_headers: (array) Sets the given headers. + * - remove_headers: (array) Remove the given headers. + * - body: (mixed) Sets the given body. + * - uri: (UriInterface) Set the URI. + * - query: (string) Set the query string value of the URI. + * - version: (string) Set the protocol version. + * + * @param RequestInterface $request Request to clone and modify. + * @param array $changes Changes to apply. + * + * @return RequestInterface + */ + public static function modifyRequest(RequestInterface $request, array $changes) + { + if (!$changes) { + return $request; + } + + $headers = $request->getHeaders(); + + if (!isset($changes['uri'])) { + $uri = $request->getUri(); + } else { + // Remove the host header if one is on the URI + if ($host = $changes['uri']->getHost()) { + $changes['set_headers']['Host'] = $host; + + if ($port = $changes['uri']->getPort()) { + $standardPorts = ['http' => 80, 'https' => 443]; + $scheme = $changes['uri']->getScheme(); + if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { + $changes['set_headers']['Host'] .= ':'.$port; + } + } + } + $uri = $changes['uri']; + } + + if (!empty($changes['remove_headers'])) { + $headers = self::caselessRemove($changes['remove_headers'], $headers); + } + + if (!empty($changes['set_headers'])) { + $headers = self::caselessRemove(array_keys($changes['set_headers']), $headers); + $headers = $changes['set_headers'] + $headers; + } + + if (isset($changes['query'])) { + $uri = $uri->withQuery($changes['query']); + } + + if ($request instanceof ServerRequestInterface) { + return (new ServerRequest( + isset($changes['method']) ? $changes['method'] : $request->getMethod(), + $uri, + $headers, + isset($changes['body']) ? $changes['body'] : $request->getBody(), + isset($changes['version']) + ? $changes['version'] + : $request->getProtocolVersion(), + $request->getServerParams() + )) + ->withParsedBody($request->getParsedBody()) + ->withQueryParams($request->getQueryParams()) + ->withCookieParams($request->getCookieParams()) + ->withUploadedFiles($request->getUploadedFiles()); + } + + return new Request( + isset($changes['method']) ? $changes['method'] : $request->getMethod(), + $uri, + $headers, + isset($changes['body']) ? $changes['body'] : $request->getBody(), + isset($changes['version']) + ? $changes['version'] + : $request->getProtocolVersion() + ); + } + + /** + * Read a line from the stream up to the maximum allowed buffer length. + * + * @param StreamInterface $stream Stream to read from + * @param int|null $maxLength Maximum buffer length + * + * @return string + */ + public static function readLine(StreamInterface $stream, $maxLength = null) + { + $buffer = ''; + $size = 0; + + while (!$stream->eof()) { + // Using a loose equality here to match on '' and false. + if (null == ($byte = $stream->read(1))) { + return $buffer; + } + $buffer .= $byte; + // Break when a new line is found or the max length - 1 is reached + if ($byte === "\n" || ++$size === $maxLength - 1) { + break; + } + } + + return $buffer; + } + + /** + * Create a new stream based on the input type. + * + * Options is an associative array that can contain the following keys: + * - metadata: Array of custom metadata. + * - size: Size of the stream. + * + * This method accepts the following `$resource` types: + * - `Psr\Http\Message\StreamInterface`: Returns the value as-is. + * - `string`: Creates a stream object that uses the given string as the contents. + * - `resource`: Creates a stream object that wraps the given PHP stream resource. + * - `Iterator`: If the provided value implements `Iterator`, then a read-only + * stream object will be created that wraps the given iterable. Each time the + * stream is read from, data from the iterator will fill a buffer and will be + * continuously called until the buffer is equal to the requested read size. + * Subsequent read calls will first read from the buffer and then call `next` + * on the underlying iterator until it is exhausted. + * - `object` with `__toString()`: If the object has the `__toString()` method, + * the object will be cast to a string and then a stream will be returned that + * uses the string value. + * - `NULL`: When `null` is passed, an empty stream object is returned. + * - `callable` When a callable is passed, a read-only stream object will be + * created that invokes the given callable. The callable is invoked with the + * number of suggested bytes to read. The callable can return any number of + * bytes, but MUST return `false` when there is no more data to return. The + * stream object that wraps the callable will invoke the callable until the + * number of requested bytes are available. Any additional bytes will be + * buffered and used in subsequent reads. + * + * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data + * @param array $options Additional options + * + * @return StreamInterface + * + * @throws \InvalidArgumentException if the $resource arg is not valid. + */ + public static function streamFor($resource = '', array $options = []) + { + if (is_scalar($resource)) { + $stream = fopen('php://temp', 'r+'); + if ($resource !== '') { + fwrite($stream, $resource); + fseek($stream, 0); + } + return new Stream($stream, $options); + } + + switch (gettype($resource)) { + case 'resource': + return new Stream($resource, $options); + case 'object': + if ($resource instanceof StreamInterface) { + return $resource; + } elseif ($resource instanceof \Iterator) { + return new PumpStream(function () use ($resource) { + if (!$resource->valid()) { + return false; + } + $result = $resource->current(); + $resource->next(); + return $result; + }, $options); + } elseif (method_exists($resource, '__toString')) { + return Utils::streamFor((string) $resource, $options); + } + break; + case 'NULL': + return new Stream(fopen('php://temp', 'r+'), $options); + } + + if (is_callable($resource)) { + return new PumpStream($resource, $options); + } + + throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource)); + } + + /** + * Safely opens a PHP stream resource using a filename. + * + * When fopen fails, PHP normally raises a warning. This function adds an + * error handler that checks for errors and throws an exception instead. + * + * @param string $filename File to open + * @param string $mode Mode used to open the file + * + * @return resource + * + * @throws \RuntimeException if the file cannot be opened + */ + public static function tryFopen($filename, $mode) + { + $ex = null; + set_error_handler(function () use ($filename, $mode, &$ex) { + $ex = new \RuntimeException(sprintf( + 'Unable to open %s using mode %s: %s', + $filename, + $mode, + func_get_args()[1] + )); + }); + + $handle = fopen($filename, $mode); + restore_error_handler(); + + if ($ex) { + /** @var $ex \RuntimeException */ + throw $ex; + } + + return $handle; + } + + /** + * Returns a UriInterface for the given value. + * + * This function accepts a string or UriInterface and returns a + * UriInterface for the given value. If the value is already a + * UriInterface, it is returned as-is. + * + * @param string|UriInterface $uri + * + * @return UriInterface + * + * @throws \InvalidArgumentException + */ + public static function uriFor($uri) + { + if ($uri instanceof UriInterface) { + return $uri; + } + + if (is_string($uri)) { + return new Uri($uri); + } + + throw new \InvalidArgumentException('URI must be a string or UriInterface'); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/functions.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/functions.php new file mode 100644 index 000000000..e4cc13619 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/functions.php @@ -0,0 +1,417 @@ + '1', 'foo[b]' => '2'])`. + * + * @param string $str Query string to parse + * @param int|bool $urlEncoding How the query string is encoded + * + * @return array + * + * @deprecated parse_query will be removed in guzzlehttp/psr7:2.0. Use Query::parse instead. + */ +function parse_query($str, $urlEncoding = true) +{ + return Query::parse($str, $urlEncoding); +} + +/** + * Build a query string from an array of key value pairs. + * + * This function can use the return value of `parse_query()` to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like `http_build_query()` would). + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + * @return string + * + * @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead. + */ +function build_query(array $params, $encoding = PHP_QUERY_RFC3986) +{ + return Query::build($params, $encoding); +} + +/** + * Determines the mimetype of a file by looking at its extension. + * + * @param string $filename + * + * @return string|null + * + * @deprecated mimetype_from_filename will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromFilename instead. + */ +function mimetype_from_filename($filename) +{ + return MimeType::fromFilename($filename); +} + +/** + * Maps a file extensions to a mimetype. + * + * @param $extension string The file extension. + * + * @return string|null + * + * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types + * @deprecated mimetype_from_extension will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromExtension instead. + */ +function mimetype_from_extension($extension) +{ + return MimeType::fromExtension($extension); +} + +/** + * Parses an HTTP message into an associative array. + * + * The array contains the "start-line" key containing the start line of + * the message, "headers" key containing an associative array of header + * array values, and a "body" key containing the body of the message. + * + * @param string $message HTTP request or response to parse. + * + * @return array + * + * @internal + * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead. + */ +function _parse_message($message) +{ + return Message::parseMessage($message); +} + +/** + * Constructs a URI for an HTTP request message. + * + * @param string $path Path from the start-line + * @param array $headers Array of headers (each value an array). + * + * @return string + * + * @internal + * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead. + */ +function _parse_request_uri($path, array $headers) +{ + return Message::parseRequestUri($path, $headers); +} + +/** + * Get a short summary of the message body. + * + * Will return `null` if the response is not printable. + * + * @param MessageInterface $message The message to get the body summary + * @param int $truncateAt The maximum allowed size of the summary + * + * @return string|null + * + * @deprecated get_message_body_summary will be removed in guzzlehttp/psr7:2.0. Use Message::bodySummary instead. + */ +function get_message_body_summary(MessageInterface $message, $truncateAt = 120) +{ + return Message::bodySummary($message, $truncateAt); +} + +/** + * Remove the items given by the keys, case insensitively from the data. + * + * @param iterable $keys + * + * @return array + * + * @internal + * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead. + */ +function _caseless_remove($keys, array $data) +{ + return Utils::caselessRemove($keys, $data); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/functions_include.php b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/functions_include.php new file mode 100644 index 000000000..96a4a83a0 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/guzzlehttp/psr7/src/functions_include.php @@ -0,0 +1,6 @@ +=5.4.0", + "ext-fileinfo": "*", + "guzzlehttp/psr7": "~1.1" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.7", + "mockery/mockery": "~0.9.2" + }, + "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" + }, + "autoload": { + "psr-4": { + "Intervention\\Image\\": "src/Intervention/Image" + } + }, + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + }, + "laravel": { + "providers": [ + "Intervention\\Image\\ImageServiceProvider" + ], + "aliases": { + "Image": "Intervention\\Image\\Facades\\Image" + } + } + }, + "minimum-stability": "stable" +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/provides.json b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/provides.json new file mode 100644 index 000000000..a8cd1b6a5 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/provides.json @@ -0,0 +1,11 @@ +{ + "providers": [ + "Intervention\\Image\\ImageServiceProvider" + ], + "aliases": [ + { + "alias": "Image", + "facade": "Intervention\\Image\\Facades\\Image" + } + ] +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractColor.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractColor.php new file mode 100644 index 000000000..c9846c6ae --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractColor.php @@ -0,0 +1,229 @@ +parse($value); + } + + /** + * Parses given value as color + * + * @param mixed $value + * @return \Intervention\Image\AbstractColor + */ + public function parse($value) + { + switch (true) { + + case is_string($value): + $this->initFromString($value); + break; + + case is_int($value): + $this->initFromInteger($value); + break; + + case is_array($value): + $this->initFromArray($value); + break; + + case is_object($value): + $this->initFromObject($value); + break; + + case is_null($value): + $this->initFromArray([255, 255, 255, 0]); + break; + + default: + throw new NotReadableException( + "Color format ({$value}) cannot be read." + ); + } + + return $this; + } + + /** + * Formats current color instance into given format + * + * @param string $type + * @return mixed + */ + public function format($type) + { + switch (strtolower($type)) { + + case 'rgba': + return $this->getRgba(); + + case 'hex': + return $this->getHex('#'); + + case 'int': + case 'integer': + return $this->getInt(); + + case 'array': + return $this->getArray(); + + case 'obj': + case 'object': + return $this; + + default: + throw new NotSupportedException( + "Color format ({$type}) is not supported." + ); + } + } + + /** + * Reads RGBA values from string into array + * + * @param string $value + * @return array + */ + protected function rgbaFromString($value) + { + $result = false; + + // parse color string in hexidecimal format like #cccccc or cccccc or ccc + $hexPattern = '/^#?([a-f0-9]{1,2})([a-f0-9]{1,2})([a-f0-9]{1,2})$/i'; + + // parse color string in format rgb(140, 140, 140) + $rgbPattern = '/^rgb ?\(([0-9]{1,3}), ?([0-9]{1,3}), ?([0-9]{1,3})\)$/i'; + + // parse color string in format rgba(255, 0, 0, 0.5) + $rgbaPattern = '/^rgba ?\(([0-9]{1,3}), ?([0-9]{1,3}), ?([0-9]{1,3}), ?([0-9.]{1,4})\)$/i'; + + if (preg_match($hexPattern, $value, $matches)) { + $result = []; + $result[0] = strlen($matches[1]) == '1' ? hexdec($matches[1].$matches[1]) : hexdec($matches[1]); + $result[1] = strlen($matches[2]) == '1' ? hexdec($matches[2].$matches[2]) : hexdec($matches[2]); + $result[2] = strlen($matches[3]) == '1' ? hexdec($matches[3].$matches[3]) : hexdec($matches[3]); + $result[3] = 1; + } elseif (preg_match($rgbPattern, $value, $matches)) { + $result = []; + $result[0] = ($matches[1] >= 0 && $matches[1] <= 255) ? intval($matches[1]) : 0; + $result[1] = ($matches[2] >= 0 && $matches[2] <= 255) ? intval($matches[2]) : 0; + $result[2] = ($matches[3] >= 0 && $matches[3] <= 255) ? intval($matches[3]) : 0; + $result[3] = 1; + } elseif (preg_match($rgbaPattern, $value, $matches)) { + $result = []; + $result[0] = ($matches[1] >= 0 && $matches[1] <= 255) ? intval($matches[1]) : 0; + $result[1] = ($matches[2] >= 0 && $matches[2] <= 255) ? intval($matches[2]) : 0; + $result[2] = ($matches[3] >= 0 && $matches[3] <= 255) ? intval($matches[3]) : 0; + $result[3] = ($matches[4] >= 0 && $matches[4] <= 1) ? $matches[4] : 0; + } else { + throw new NotReadableException( + "Unable to read color ({$value})." + ); + } + + return $result; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php new file mode 100644 index 000000000..de770c328 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php @@ -0,0 +1,359 @@ +data = $data; + } + + /** + * Init from given URL + * + * @param string $url + * @return \Intervention\Image\Image + */ + public function initFromUrl($url) + { + + $options = [ + 'http' => [ + 'method'=>"GET", + 'header'=>"Accept-language: en\r\n". + "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1216.0 Safari/537.2\r\n" + ] + ]; + + $context = stream_context_create($options); + + + if ($data = @file_get_contents($url, false, $context)) { + return $this->initFromBinary($data); + } + + throw new NotReadableException( + "Unable to init from given url (".$url.")." + ); + } + + /** + * Init from given stream + * + * @param StreamInterface|resource $stream + * @return \Intervention\Image\Image + */ + public function initFromStream($stream) + { + if (!$stream instanceof StreamInterface) { + $stream = new Stream($stream); + } + + try { + $offset = $stream->tell(); + } catch (\RuntimeException $e) { + $offset = 0; + } + + $shouldAndCanSeek = $offset !== 0 && $stream->isSeekable(); + + if ($shouldAndCanSeek) { + $stream->rewind(); + } + + try { + $data = $stream->getContents(); + } catch (\RuntimeException $e) { + $data = null; + } + + if ($shouldAndCanSeek) { + $stream->seek($offset); + } + + if ($data) { + return $this->initFromBinary($data); + } + + throw new NotReadableException( + "Unable to init from given stream" + ); + } + + /** + * Determines if current source data is GD resource + * + * @return boolean + */ + public function isGdResource() + { + if (is_resource($this->data)) { + return (get_resource_type($this->data) == 'gd'); + } + + return false; + } + + /** + * Determines if current source data is Imagick object + * + * @return boolean + */ + public function isImagick() + { + return is_a($this->data, 'Imagick'); + } + + /** + * Determines if current source data is Intervention\Image\Image object + * + * @return boolean + */ + public function isInterventionImage() + { + return is_a($this->data, '\Intervention\Image\Image'); + } + + /** + * Determines if current data is SplFileInfo object + * + * @return boolean + */ + public function isSplFileInfo() + { + return is_a($this->data, 'SplFileInfo'); + } + + /** + * Determines if current data is Symfony UploadedFile component + * + * @return boolean + */ + public function isSymfonyUpload() + { + return is_a($this->data, 'Symfony\Component\HttpFoundation\File\UploadedFile'); + } + + /** + * Determines if current source data is file path + * + * @return boolean + */ + public function isFilePath() + { + if (is_string($this->data)) { + try { + return is_file($this->data); + } catch (\Exception $e) { + return false; + } + } + + return false; + } + + /** + * Determines if current source data is url + * + * @return boolean + */ + public function isUrl() + { + return (bool) filter_var($this->data, FILTER_VALIDATE_URL); + } + + /** + * Determines if current source data is a stream resource + * + * @return boolean + */ + public function isStream() + { + if ($this->data instanceof StreamInterface) return true; + if (!is_resource($this->data)) return false; + if (get_resource_type($this->data) !== 'stream') return false; + + return true; + } + + /** + * Determines if current source data is binary data + * + * @return boolean + */ + public function isBinary() + { + if (is_string($this->data)) { + $mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $this->data); + return (substr($mime, 0, 4) != 'text' && $mime != 'application/x-empty'); + } + + return false; + } + + /** + * Determines if current source data is data-url + * + * @return boolean + */ + public function isDataUrl() + { + $data = $this->decodeDataUrl($this->data); + + return is_null($data) ? false : true; + } + + /** + * Determines if current source data is base64 encoded + * + * @return boolean + */ + public function isBase64() + { + if (!is_string($this->data)) { + return false; + } + + return base64_encode(base64_decode($this->data)) === str_replace(["\n", "\r"], '', $this->data); + } + + /** + * Initiates new Image from Intervention\Image\Image + * + * @param Image $object + * @return \Intervention\Image\Image + */ + public function initFromInterventionImage($object) + { + return $object; + } + + /** + * Parses and decodes binary image data from data-url + * + * @param string $data_url + * @return string + */ + private function decodeDataUrl($data_url) + { + if (!is_string($data_url)) { + return null; + } + + $pattern = "/^data:(?:image\/[a-zA-Z\-\.]+)(?:charset=\".+\")?;base64,(?P.+)$/"; + preg_match($pattern, $data_url, $matches); + + if (is_array($matches) && array_key_exists('data', $matches)) { + return base64_decode($matches['data']); + } + + return null; + } + + /** + * Initiates new image from mixed data + * + * @param mixed $data + * @return \Intervention\Image\Image + */ + public function init($data) + { + $this->data = $data; + + switch (true) { + + case $this->isGdResource(): + return $this->initFromGdResource($this->data); + + case $this->isImagick(): + return $this->initFromImagick($this->data); + + case $this->isInterventionImage(): + return $this->initFromInterventionImage($this->data); + + case $this->isSplFileInfo(): + return $this->initFromPath($this->data->getRealPath()); + + case $this->isBinary(): + return $this->initFromBinary($this->data); + + case $this->isUrl(): + return $this->initFromUrl($this->data); + + case $this->isStream(): + return $this->initFromStream($this->data); + + case $this->isDataUrl(): + return $this->initFromBinary($this->decodeDataUrl($this->data)); + + case $this->isFilePath(): + return $this->initFromPath($this->data); + + // isBase64 has to be after isFilePath to prevent false positives + case $this->isBase64(): + return $this->initFromBinary(base64_decode($this->data)); + + default: + throw new NotReadableException("Image source not readable"); + } + } + + /** + * Decoder object transforms to string source data + * + * @return string + */ + public function __toString() + { + return (string) $this->data; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractDriver.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractDriver.php new file mode 100644 index 000000000..d2356ae80 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractDriver.php @@ -0,0 +1,136 @@ +decoder->init($data); + } + + /** + * Encodes given image + * + * @param Image $image + * @param string $format + * @param int $quality + * @return \Intervention\Image\Image + */ + public function encode($image, $format, $quality) + { + return $this->encoder->process($image, $format, $quality); + } + + /** + * Executes named command on given image + * + * @param Image $image + * @param string $name + * @param array $arguments + * @return \Intervention\Image\Commands\AbstractCommand + */ + public function executeCommand($image, $name, $arguments) + { + $commandName = $this->getCommandClassName($name); + $command = new $commandName($arguments); + $command->execute($image); + + return $command; + } + + /** + * Returns classname of given command name + * + * @param string $name + * @return string + */ + private function getCommandClassName($name) + { + $name = mb_convert_case($name[0], MB_CASE_UPPER, 'utf-8') . mb_substr($name, 1, mb_strlen($name)); + + $drivername = $this->getDriverName(); + $classnameLocal = sprintf('\Intervention\Image\%s\Commands\%sCommand', $drivername, ucfirst($name)); + $classnameGlobal = sprintf('\Intervention\Image\Commands\%sCommand', ucfirst($name)); + + if (class_exists($classnameLocal)) { + return $classnameLocal; + } elseif (class_exists($classnameGlobal)) { + return $classnameGlobal; + } + + throw new NotSupportedException( + "Command ({$name}) is not available for driver ({$drivername})." + ); + } + + /** + * Returns name of current driver instance + * + * @return string + */ + public function getDriverName() + { + $reflect = new \ReflectionClass($this); + $namespace = $reflect->getNamespaceName(); + + return substr(strrchr($namespace, "\\"), 1); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractEncoder.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractEncoder.php new file mode 100644 index 000000000..d3e59eaa4 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractEncoder.php @@ -0,0 +1,244 @@ +setImage($image); + $this->setFormat($format); + $this->setQuality($quality); + + switch (strtolower($this->format)) { + + case 'data-url': + $this->result = $this->processDataUrl(); + break; + + case 'gif': + case 'image/gif': + $this->result = $this->processGif(); + break; + + case 'png': + case 'image/png': + case 'image/x-png': + $this->result = $this->processPng(); + break; + + case 'jpg': + case 'jpeg': + case 'image/jpg': + case 'image/jpeg': + case 'image/pjpeg': + $this->result = $this->processJpeg(); + break; + + case 'tif': + case 'tiff': + case 'image/tiff': + case 'image/tif': + case 'image/x-tif': + case 'image/x-tiff': + $this->result = $this->processTiff(); + break; + + case 'bmp': + case 'bmp': + case 'ms-bmp': + case 'x-bitmap': + case 'x-bmp': + case 'x-ms-bmp': + case 'x-win-bitmap': + case 'x-windows-bmp': + case 'x-xbitmap': + case 'image/ms-bmp': + case 'image/x-bitmap': + case 'image/x-bmp': + case 'image/x-ms-bmp': + case 'image/x-win-bitmap': + case 'image/x-windows-bmp': + case 'image/x-xbitmap': + $this->result = $this->processBmp(); + break; + + case 'ico': + case 'image/x-ico': + case 'image/x-icon': + case 'image/vnd.microsoft.icon': + $this->result = $this->processIco(); + break; + + case 'psd': + case 'image/vnd.adobe.photoshop': + $this->result = $this->processPsd(); + break; + + case 'webp': + case 'image/webp': + case 'image/x-webp': + $this->result = $this->processWebp(); + break; + + default: + throw new NotSupportedException( + "Encoding format ({$format}) is not supported." + ); + } + + $this->setImage(null); + + return $image->setEncoded($this->result); + } + + /** + * Processes and returns encoded image as data-url string + * + * @return string + */ + protected function processDataUrl() + { + $mime = $this->image->mime ? $this->image->mime : 'image/png'; + + return sprintf('data:%s;base64,%s', + $mime, + base64_encode($this->process($this->image, $mime, $this->quality)) + ); + } + + /** + * Sets image to process + * + * @param Image $image + */ + protected function setImage($image) + { + $this->image = $image; + } + + /** + * Determines output format + * + * @param string $format + */ + protected function setFormat($format = null) + { + if ($format == '' && $this->image instanceof Image) { + $format = $this->image->mime; + } + + $this->format = $format ? $format : 'jpg'; + + return $this; + } + + /** + * Determines output quality + * + * @param int $quality + */ + protected function setQuality($quality) + { + $quality = is_null($quality) ? 90 : $quality; + $quality = $quality === 0 ? 1 : $quality; + + if ($quality < 0 || $quality > 100) { + throw new InvalidArgumentException( + 'Quality must range from 0 to 100.' + ); + } + + $this->quality = intval($quality); + + return $this; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractFont.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractFont.php new file mode 100644 index 000000000..0b9b97998 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractFont.php @@ -0,0 +1,267 @@ +text = $text; + } + + /** + * Set text to be written + * + * @param String $text + * @return void + */ + public function text($text) + { + $this->text = $text; + + return $this; + } + + /** + * Get text to be written + * + * @return String + */ + public function getText() + { + return $this->text; + } + + /** + * Set font size in pixels + * + * @param int $size + * @return void + */ + public function size($size) + { + $this->size = $size; + + return $this; + } + + /** + * Get font size in pixels + * + * @return int + */ + public function getSize() + { + return $this->size; + } + + /** + * Set color of text to be written + * + * @param mixed $color + * @return void + */ + public function color($color) + { + $this->color = $color; + + return $this; + } + + /** + * Get color of text + * + * @return mixed + */ + public function getColor() + { + return $this->color; + } + + /** + * Set rotation angle of text + * + * @param int $angle + * @return void + */ + public function angle($angle) + { + $this->angle = $angle; + + return $this; + } + + /** + * Get rotation angle of text + * + * @return int + */ + public function getAngle() + { + return $this->angle; + } + + /** + * Set horizontal text alignment + * + * @param string $align + * @return void + */ + public function align($align) + { + $this->align = $align; + + return $this; + } + + /** + * Get horizontal text alignment + * + * @return string + */ + public function getAlign() + { + return $this->align; + } + + /** + * Set vertical text alignment + * + * @param string $valign + * @return void + */ + public function valign($valign) + { + $this->valign = $valign; + + return $this; + } + + /** + * Get vertical text alignment + * + * @return string + */ + public function getValign() + { + return $this->valign; + } + + /** + * Set path to font file + * + * @param string $file + * @return void + */ + public function file($file) + { + $this->file = $file; + + return $this; + } + + /** + * Get path to font file + * + * @return string + */ + public function getFile() + { + return $this->file; + } + + /** + * Checks if current font has access to an applicable font file + * + * @return boolean + */ + protected function hasApplicableFontFile() + { + if (is_string($this->file)) { + return file_exists($this->file); + } + + return false; + } + + /** + * Counts lines of text to be written + * + * @return int + */ + public function countLines() + { + return count(explode(PHP_EOL, $this->text)); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractShape.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractShape.php new file mode 100644 index 000000000..cd4a9f1c6 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/AbstractShape.php @@ -0,0 +1,71 @@ +background = $color; + } + + /** + * Set border width and color of current shape + * + * @param int $width + * @param string $color + * @return void + */ + public function border($width, $color = null) + { + $this->border_width = is_numeric($width) ? intval($width) : 0; + $this->border_color = is_null($color) ? '#000000' : $color; + } + + /** + * Determines if current shape has border + * + * @return boolean + */ + public function hasBorder() + { + return ($this->border_width >= 1); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/AbstractCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/AbstractCommand.php new file mode 100644 index 000000000..e31078ceb --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/AbstractCommand.php @@ -0,0 +1,81 @@ +arguments = $arguments; + } + + /** + * Creates new argument instance from given argument key + * + * @param int $key + * @return \Intervention\Image\Commands\Argument + */ + public function argument($key) + { + return new Argument($this, $key); + } + + /** + * Returns output data of current command + * + * @return mixed + */ + public function getOutput() + { + return $this->output ? $this->output : null; + } + + /** + * Determines if current instance has output data + * + * @return boolean + */ + public function hasOutput() + { + return ! is_null($this->output); + } + + /** + * Sets output data of current command + * + * @param mixed $value + */ + public function setOutput($value) + { + $this->output = $value; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/Argument.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/Argument.php new file mode 100644 index 000000000..9538199f6 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/Argument.php @@ -0,0 +1,225 @@ +command = $command; + $this->key = $key; + } + + /** + * Returns name of current arguments command + * + * @return string + */ + public function getCommandName() + { + preg_match("/\\\\([\w]+)Command$/", get_class($this->command), $matches); + return isset($matches[1]) ? lcfirst($matches[1]).'()' : 'Method'; + } + + /** + * Returns value of current argument + * + * @param mixed $default + * @return mixed + */ + public function value($default = null) + { + $arguments = $this->command->arguments; + + if (is_array($arguments)) { + return isset($arguments[$this->key]) ? $arguments[$this->key] : $default; + } + + return $default; + } + + /** + * Defines current argument as required + * + * @return \Intervention\Image\Commands\Argument + */ + public function required() + { + if ( ! array_key_exists($this->key, $this->command->arguments)) { + throw new InvalidArgumentException( + sprintf("Missing argument %d for %s", $this->key + 1, $this->getCommandName()) + ); + } + + return $this; + } + + /** + * Determines that current argument must be of given type + * + * @return \Intervention\Image\Commands\Argument + */ + public function type($type) + { + $valid = true; + $value = $this->value(); + + if ($value === null) { + return $this; + } + + switch (strtolower($type)) { + case 'bool': + case 'boolean': + $valid = \is_bool($value); + $message = '%s accepts only boolean values as argument %d.'; + break; + case 'int': + case 'integer': + $valid = \is_int($value); + $message = '%s accepts only integer values as argument %d.'; + break; + case 'num': + case 'numeric': + $valid = is_numeric($value); + $message = '%s accepts only numeric values as argument %d.'; + break; + case 'str': + case 'string': + $valid = \is_string($value); + $message = '%s accepts only string values as argument %d.'; + break; + case 'array': + $valid = \is_array($value); + $message = '%s accepts only array as argument %d.'; + break; + case 'closure': + $valid = is_a($value, '\Closure'); + $message = '%s accepts only Closure as argument %d.'; + break; + case 'digit': + $valid = $this->isDigit($value); + $message = '%s accepts only integer values as argument %d.'; + break; + } + + if (! $valid) { + $commandName = $this->getCommandName(); + $argument = $this->key + 1; + + if (isset($message)) { + $message = sprintf($message, $commandName, $argument); + } else { + $message = sprintf('Missing argument for %d.', $argument); + } + + throw new InvalidArgumentException( + $message + ); + } + + return $this; + } + + /** + * Determines that current argument value must be numeric between given values + * + * @return \Intervention\Image\Commands\Argument + */ + public function between($x, $y) + { + $value = $this->type('numeric')->value(); + + if (is_null($value)) { + return $this; + } + + $alpha = min($x, $y); + $omega = max($x, $y); + + if ($value < $alpha || $value > $omega) { + throw new InvalidArgumentException( + sprintf('Argument %d must be between %s and %s.', $this->key, $x, $y) + ); + } + + return $this; + } + + /** + * Determines that current argument must be over a minimum value + * + * @return \Intervention\Image\Commands\Argument + */ + public function min($value) + { + $v = $this->type('numeric')->value(); + + if (is_null($v)) { + return $this; + } + + if ($v < $value) { + throw new InvalidArgumentException( + sprintf('Argument %d must be at least %s.', $this->key, $value) + ); + } + + return $this; + } + + /** + * Determines that current argument must be under a maxiumum value + * + * @return \Intervention\Image\Commands\Argument + */ + public function max($value) + { + $v = $this->type('numeric')->value(); + + if (is_null($v)) { + return $this; + } + + if ($v > $value) { + throw new InvalidArgumentException( + sprintf('Argument %d may not be greater than %s.', $this->key, $value) + ); + } + + return $this; + } + + /** + * Checks if value is "PHP" integer (120 but also 120.0) + * + * @param mixed $value + * @return boolean + */ + private function isDigit($value) + { + return is_numeric($value) ? intval($value) == $value : false; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/ChecksumCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/ChecksumCommand.php new file mode 100644 index 000000000..9acc40308 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/ChecksumCommand.php @@ -0,0 +1,29 @@ +getSize(); + + for ($x=0; $x <= ($size->width-1); $x++) { + for ($y=0; $y <= ($size->height-1); $y++) { + $colors[] = $image->pickColor($x, $y, 'array'); + } + } + + $this->setOutput(md5(serialize($colors))); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/CircleCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/CircleCommand.php new file mode 100644 index 000000000..c627818e3 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/CircleCommand.php @@ -0,0 +1,35 @@ +argument(0)->type('numeric')->required()->value(); + $x = $this->argument(1)->type('numeric')->required()->value(); + $y = $this->argument(2)->type('numeric')->required()->value(); + $callback = $this->argument(3)->type('closure')->value(); + + $circle_classname = sprintf('\Intervention\Image\%s\Shapes\CircleShape', + $image->getDriver()->getDriverName()); + + $circle = new $circle_classname($diameter); + + if ($callback instanceof Closure) { + $callback($circle); + } + + $circle->applyToImage($image, $x, $y); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/EllipseCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/EllipseCommand.php new file mode 100644 index 000000000..4637e0205 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/EllipseCommand.php @@ -0,0 +1,36 @@ +argument(0)->type('numeric')->required()->value(); + $height = $this->argument(1)->type('numeric')->required()->value(); + $x = $this->argument(2)->type('numeric')->required()->value(); + $y = $this->argument(3)->type('numeric')->required()->value(); + $callback = $this->argument(4)->type('closure')->value(); + + $ellipse_classname = sprintf('\Intervention\Image\%s\Shapes\EllipseShape', + $image->getDriver()->getDriverName()); + + $ellipse = new $ellipse_classname($width, $height); + + if ($callback instanceof Closure) { + $callback($ellipse); + } + + $ellipse->applyToImage($image, $x, $y); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/ExifCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/ExifCommand.php new file mode 100644 index 000000000..7103f2fd3 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/ExifCommand.php @@ -0,0 +1,51 @@ +argument(0)->value(); + + // try to read exif data from image file + try { + $data = @exif_read_data($image->dirname . '/' . $image->basename); + + if (!is_null($key) && is_array($data)) { + $data = array_key_exists($key, $data) ? $data[$key] : false; + } + + } catch (\Exception $e) { + throw new NotReadableException( + sprintf( + "Cannot read the Exif data from the filename (%s) provided ", + $image->dirname . '/' . $image->basename + ), + $e->getCode(), + $e + ); + } + + $this->setOutput($data); + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/IptcCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/IptcCommand.php new file mode 100644 index 000000000..ae953d200 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/IptcCommand.php @@ -0,0 +1,66 @@ +argument(0)->value(); + + $info = []; + @getimagesize($image->dirname .'/'. $image->basename, $info); + + $data = []; + + if (array_key_exists('APP13', $info)) { + $iptc = iptcparse($info['APP13']); + + if (is_array($iptc)) { + $data['DocumentTitle'] = isset($iptc["2#005"][0]) ? $iptc["2#005"][0] : null; + $data['Urgency'] = isset($iptc["2#010"][0]) ? $iptc["2#010"][0] : null; + $data['Category'] = isset($iptc["2#015"][0]) ? $iptc["2#015"][0] : null; + $data['Subcategories'] = isset($iptc["2#020"][0]) ? $iptc["2#020"][0] : null; + $data['Keywords'] = isset($iptc["2#025"][0]) ? $iptc["2#025"] : null; + $data['SpecialInstructions'] = isset($iptc["2#040"][0]) ? $iptc["2#040"][0] : null; + $data['CreationDate'] = isset($iptc["2#055"][0]) ? $iptc["2#055"][0] : null; + $data['CreationTime'] = isset($iptc["2#060"][0]) ? $iptc["2#060"][0] : null; + $data['AuthorByline'] = isset($iptc["2#080"][0]) ? $iptc["2#080"][0] : null; + $data['AuthorTitle'] = isset($iptc["2#085"][0]) ? $iptc["2#085"][0] : null; + $data['City'] = isset($iptc["2#090"][0]) ? $iptc["2#090"][0] : null; + $data['SubLocation'] = isset($iptc["2#092"][0]) ? $iptc["2#092"][0] : null; + $data['State'] = isset($iptc["2#095"][0]) ? $iptc["2#095"][0] : null; + $data['Country'] = isset($iptc["2#101"][0]) ? $iptc["2#101"][0] : null; + $data['OTR'] = isset($iptc["2#103"][0]) ? $iptc["2#103"][0] : null; + $data['Headline'] = isset($iptc["2#105"][0]) ? $iptc["2#105"][0] : null; + $data['Source'] = isset($iptc["2#110"][0]) ? $iptc["2#110"][0] : null; + $data['PhotoSource'] = isset($iptc["2#115"][0]) ? $iptc["2#115"][0] : null; + $data['Copyright'] = isset($iptc["2#116"][0]) ? $iptc["2#116"][0] : null; + $data['Caption'] = isset($iptc["2#120"][0]) ? $iptc["2#120"][0] : null; + $data['CaptionWriter'] = isset($iptc["2#122"][0]) ? $iptc["2#122"][0] : null; + } + } + + if (! is_null($key) && is_array($data)) { + $data = array_key_exists($key, $data) ? $data[$key] : false; + } + + $this->setOutput($data); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/LineCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/LineCommand.php new file mode 100644 index 000000000..a068c662a --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/LineCommand.php @@ -0,0 +1,36 @@ +argument(0)->type('numeric')->required()->value(); + $y1 = $this->argument(1)->type('numeric')->required()->value(); + $x2 = $this->argument(2)->type('numeric')->required()->value(); + $y2 = $this->argument(3)->type('numeric')->required()->value(); + $callback = $this->argument(4)->type('closure')->value(); + + $line_classname = sprintf('\Intervention\Image\%s\Shapes\LineShape', + $image->getDriver()->getDriverName()); + + $line = new $line_classname($x2, $y2); + + if ($callback instanceof Closure) { + $callback($line); + } + + $line->applyToImage($image, $x1, $y1); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/OrientateCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/OrientateCommand.php new file mode 100644 index 000000000..552482cb4 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/OrientateCommand.php @@ -0,0 +1,48 @@ +exif('Orientation')) { + + case 2: + $image->flip(); + break; + + case 3: + $image->rotate(180); + break; + + case 4: + $image->rotate(180)->flip(); + break; + + case 5: + $image->rotate(270)->flip(); + break; + + case 6: + $image->rotate(270); + break; + + case 7: + $image->rotate(90)->flip(); + break; + + case 8: + $image->rotate(90); + break; + } + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/PolygonCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/PolygonCommand.php new file mode 100644 index 000000000..a2fa99788 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/PolygonCommand.php @@ -0,0 +1,49 @@ +argument(0)->type('array')->required()->value(); + $callback = $this->argument(1)->type('closure')->value(); + + $vertices_count = count($points); + + // check if number if coordinates is even + if ($vertices_count % 2 !== 0) { + throw new InvalidArgumentException( + "The number of given polygon vertices must be even." + ); + } + + if ($vertices_count < 6) { + throw new InvalidArgumentException( + "You must have at least 3 points in your array." + ); + } + + $polygon_classname = sprintf('\Intervention\Image\%s\Shapes\PolygonShape', + $image->getDriver()->getDriverName()); + + $polygon = new $polygon_classname($points); + + if ($callback instanceof Closure) { + $callback($polygon); + } + + $polygon->applyToImage($image); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/PsrResponseCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/PsrResponseCommand.php new file mode 100644 index 000000000..d75cd903b --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/PsrResponseCommand.php @@ -0,0 +1,45 @@ +argument(0)->value(); + $quality = $this->argument(1)->between(0, 100)->value(); + + //Encoded property will be populated at this moment + $stream = $image->stream($format, $quality); + + $mimetype = finfo_buffer( + finfo_open(FILEINFO_MIME_TYPE), + $image->getEncoded() + ); + + $this->setOutput(new Response( + 200, + [ + 'Content-Type' => $mimetype, + 'Content-Length' => strlen($image->getEncoded()) + ], + $stream + )); + + return true; + } +} \ No newline at end of file diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/RectangleCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/RectangleCommand.php new file mode 100644 index 000000000..24378b386 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/RectangleCommand.php @@ -0,0 +1,36 @@ +argument(0)->type('numeric')->required()->value(); + $y1 = $this->argument(1)->type('numeric')->required()->value(); + $x2 = $this->argument(2)->type('numeric')->required()->value(); + $y2 = $this->argument(3)->type('numeric')->required()->value(); + $callback = $this->argument(4)->type('closure')->value(); + + $rectangle_classname = sprintf('\Intervention\Image\%s\Shapes\RectangleShape', + $image->getDriver()->getDriverName()); + + $rectangle = new $rectangle_classname($x1, $y1, $x2, $y2); + + if ($callback instanceof Closure) { + $callback($rectangle); + } + + $rectangle->applyToImage($image, $x1, $y1); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/ResponseCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/ResponseCommand.php new file mode 100644 index 000000000..7903b5af4 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/ResponseCommand.php @@ -0,0 +1,26 @@ +argument(0)->value(); + $quality = $this->argument(1)->between(0, 100)->value(); + + $response = new Response($image, $format, $quality); + + $this->setOutput($response->make()); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/StreamCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/StreamCommand.php new file mode 100644 index 000000000..111c47569 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/StreamCommand.php @@ -0,0 +1,25 @@ +argument(0)->value(); + $quality = $this->argument(1)->between(0, 100)->value(); + + $this->setOutput(\GuzzleHttp\Psr7\stream_for( + $image->encode($format, $quality)->getEncoded() + )); + + return true; + } +} \ No newline at end of file diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/TextCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/TextCommand.php new file mode 100644 index 000000000..3c60b4e77 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Commands/TextCommand.php @@ -0,0 +1,34 @@ +argument(0)->required()->value(); + $x = $this->argument(1)->type('numeric')->value(0); + $y = $this->argument(2)->type('numeric')->value(0); + $callback = $this->argument(3)->type('closure')->value(); + + $fontclassname = sprintf('\Intervention\Image\%s\Font', + $image->getDriver()->getDriverName()); + + $font = new $fontclassname($text); + + if ($callback instanceof Closure) { + $callback($font); + } + + $font->applyToImage($image, $x, $y); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Constraint.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Constraint.php new file mode 100644 index 000000000..44bdd67a6 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Constraint.php @@ -0,0 +1,92 @@ +size = $size; + } + + /** + * Returns current size of constraint + * + * @return \Intervention\Image\Size + */ + public function getSize() + { + return $this->size; + } + + /** + * Fix the given argument in current constraint + * + * @param int $type + * @return void + */ + public function fix($type) + { + $this->fixed = ($this->fixed & ~(1 << $type)) | (1 << $type); + } + + /** + * Checks if given argument is fixed in current constraint + * + * @param int $type + * @return boolean + */ + public function isFixed($type) + { + return (bool) ($this->fixed & (1 << $type)); + } + + /** + * Fixes aspect ratio in current constraint + * + * @return void + */ + public function aspectRatio() + { + $this->fix(self::ASPECTRATIO); + } + + /** + * Fixes possibility to size up in current constraint + * + * @return void + */ + public function upsize() + { + $this->fix(self::UPSIZE); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Exception/ImageException.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Exception/ImageException.php new file mode 100644 index 000000000..83e6b91f2 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Exception/ImageException.php @@ -0,0 +1,8 @@ +dirname = array_key_exists('dirname', $info) ? $info['dirname'] : null; + $this->basename = array_key_exists('basename', $info) ? $info['basename'] : null; + $this->extension = array_key_exists('extension', $info) ? $info['extension'] : null; + $this->filename = array_key_exists('filename', $info) ? $info['filename'] : null; + + if (file_exists($path) && is_file($path)) { + $this->mime = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path); + } + + return $this; + } + + /** + * Get file size + * + * @return mixed + */ + public function filesize() + { + $path = $this->basePath(); + + if (file_exists($path) && is_file($path)) { + return filesize($path); + } + + return false; + } + + /** + * Get fully qualified path + * + * @return string + */ + public function basePath() + { + if ($this->dirname && $this->basename) { + return ($this->dirname .'/'. $this->basename); + } + + return null; + } + +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Filters/DemoFilter.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Filters/DemoFilter.php new file mode 100644 index 000000000..4e8f92b82 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Filters/DemoFilter.php @@ -0,0 +1,44 @@ +size = is_numeric($size) ? intval($size) : self::DEFAULT_SIZE; + } + + /** + * Applies filter effects to given image + * + * @param \Intervention\Image\Image $image + * @return \Intervention\Image\Image + */ + public function applyFilter(Image $image) + { + $image->pixelate($this->size); + $image->greyscale(); + + return $image; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Filters/FilterInterface.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Filters/FilterInterface.php new file mode 100644 index 000000000..88f6cbfe0 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Filters/FilterInterface.php @@ -0,0 +1,16 @@ +a = ($value >> 24) & 0xFF; + $this->r = ($value >> 16) & 0xFF; + $this->g = ($value >> 8) & 0xFF; + $this->b = $value & 0xFF; + } + + /** + * Initiates color object from given array + * + * @param array $value + * @return \Intervention\Image\AbstractColor + */ + public function initFromArray($array) + { + $array = array_values($array); + + if (count($array) == 4) { + + // color array with alpha value + list($r, $g, $b, $a) = $array; + $this->a = $this->alpha2gd($a); + + } elseif (count($array) == 3) { + + // color array without alpha value + list($r, $g, $b) = $array; + $this->a = 0; + + } + + $this->r = $r; + $this->g = $g; + $this->b = $b; + } + + /** + * Initiates color object from given string + * + * @param string $value + * @return \Intervention\Image\AbstractColor + */ + public function initFromString($value) + { + if ($color = $this->rgbaFromString($value)) { + $this->r = $color[0]; + $this->g = $color[1]; + $this->b = $color[2]; + $this->a = $this->alpha2gd($color[3]); + } + } + + /** + * Initiates color object from given R, G and B values + * + * @param int $r + * @param int $g + * @param int $b + * @return \Intervention\Image\AbstractColor + */ + public function initFromRgb($r, $g, $b) + { + $this->r = intval($r); + $this->g = intval($g); + $this->b = intval($b); + $this->a = 0; + } + + /** + * Initiates color object from given R, G, B and A values + * + * @param int $r + * @param int $g + * @param int $b + * @param float $a + * @return \Intervention\Image\AbstractColor + */ + public function initFromRgba($r, $g, $b, $a = 1) + { + $this->r = intval($r); + $this->g = intval($g); + $this->b = intval($b); + $this->a = $this->alpha2gd($a); + } + + /** + * Initiates color object from given ImagickPixel object + * + * @param ImagickPixel $value + * @return \Intervention\Image\AbstractColor + */ + public function initFromObject($value) + { + throw new NotSupportedException( + "GD colors cannot init from ImagickPixel objects." + ); + } + + /** + * Calculates integer value of current color instance + * + * @return int + */ + public function getInt() + { + return ($this->a << 24) + ($this->r << 16) + ($this->g << 8) + $this->b; + } + + /** + * Calculates hexadecimal value of current color instance + * + * @param string $prefix + * @return string + */ + public function getHex($prefix = '') + { + return sprintf('%s%02x%02x%02x', $prefix, $this->r, $this->g, $this->b); + } + + /** + * Calculates RGB(A) in array format of current color instance + * + * @return array + */ + public function getArray() + { + return [$this->r, $this->g, $this->b, round(1 - $this->a / 127, 2)]; + } + + /** + * Calculates RGBA in string format of current color instance + * + * @return string + */ + public function getRgba() + { + return sprintf('rgba(%d, %d, %d, %.2F)', $this->r, $this->g, $this->b, round(1 - $this->a / 127, 2)); + } + + /** + * Determines if current color is different from given color + * + * @param AbstractColor $color + * @param int $tolerance + * @return boolean + */ + public function differs(AbstractColor $color, $tolerance = 0) + { + $color_tolerance = round($tolerance * 2.55); + $alpha_tolerance = round($tolerance * 1.27); + + $delta = [ + 'r' => abs($color->r - $this->r), + 'g' => abs($color->g - $this->g), + 'b' => abs($color->b - $this->b), + 'a' => abs($color->a - $this->a) + ]; + + return ( + $delta['r'] > $color_tolerance or + $delta['g'] > $color_tolerance or + $delta['b'] > $color_tolerance or + $delta['a'] > $alpha_tolerance + ); + } + + /** + * Convert rgba alpha (0-1) value to gd value (0-127) + * + * @param float $input + * @return int + */ + private function alpha2gd($input) + { + $oldMin = 0; + $oldMax = 1; + + $newMin = 127; + $newMax = 0; + + return ceil(((($input- $oldMin) * ($newMax - $newMin)) / ($oldMax - $oldMin)) + $newMin); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BackupCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BackupCommand.php new file mode 100644 index 000000000..310dc03a9 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BackupCommand.php @@ -0,0 +1,25 @@ +argument(0)->value(); + + // clone current image resource + $clone = clone $image; + $image->setBackup($clone->getCore(), $backupName); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BlurCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BlurCommand.php new file mode 100644 index 000000000..c4fca0eae --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BlurCommand.php @@ -0,0 +1,25 @@ +argument(0)->between(0, 100)->value(1); + + for ($i=0; $i < intval($amount); $i++) { + imagefilter($image->getCore(), IMG_FILTER_GAUSSIAN_BLUR); + } + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BrightnessCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BrightnessCommand.php new file mode 100644 index 000000000..4e48464b1 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/BrightnessCommand.php @@ -0,0 +1,21 @@ +argument(0)->between(-100, 100)->required()->value(); + + return imagefilter($image->getCore(), IMG_FILTER_BRIGHTNESS, ($level * 2.55)); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ColorizeCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ColorizeCommand.php new file mode 100644 index 000000000..410917b33 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ColorizeCommand.php @@ -0,0 +1,29 @@ +argument(0)->between(-100, 100)->required()->value(); + $green = $this->argument(1)->between(-100, 100)->required()->value(); + $blue = $this->argument(2)->between(-100, 100)->required()->value(); + + // normalize colorize levels + $red = round($red * 2.55); + $green = round($green * 2.55); + $blue = round($blue * 2.55); + + // apply filter + return imagefilter($image->getCore(), IMG_FILTER_COLORIZE, $red, $green, $blue); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ContrastCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ContrastCommand.php new file mode 100644 index 000000000..916c41f82 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ContrastCommand.php @@ -0,0 +1,21 @@ +argument(0)->between(-100, 100)->required()->value(); + + return imagefilter($image->getCore(), IMG_FILTER_CONTRAST, ($level * -1)); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/CropCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/CropCommand.php new file mode 100644 index 000000000..b7f595421 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/CropCommand.php @@ -0,0 +1,40 @@ +argument(0)->type('digit')->required()->value(); + $height = $this->argument(1)->type('digit')->required()->value(); + $x = $this->argument(2)->type('digit')->value(); + $y = $this->argument(3)->type('digit')->value(); + + if (is_null($width) || is_null($height)) { + throw new \Intervention\Image\Exception\InvalidArgumentException( + "Width and height of cutout needs to be defined." + ); + } + + $cropped = new Size($width, $height); + $position = new Point($x, $y); + + // align boxes + if (is_null($x) && is_null($y)) { + $position = $image->getSize()->align('center')->relativePosition($cropped->align('center')); + } + + // crop image core + return $this->modify($image, 0, 0, $position->x, $position->y, $cropped->width, $cropped->height, $cropped->width, $cropped->height); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/DestroyCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/DestroyCommand.php new file mode 100644 index 000000000..4503d10fe --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/DestroyCommand.php @@ -0,0 +1,27 @@ +getCore()); + + // destroy backups + foreach ($image->getBackups() as $backup) { + imagedestroy($backup); + } + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FillCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FillCommand.php new file mode 100644 index 000000000..cf1908210 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FillCommand.php @@ -0,0 +1,69 @@ +argument(0)->value(); + $x = $this->argument(1)->type('digit')->value(); + $y = $this->argument(2)->type('digit')->value(); + + $width = $image->getWidth(); + $height = $image->getHeight(); + $resource = $image->getCore(); + + try { + + // set image tile filling + $source = new Decoder; + $tile = $source->init($filling); + imagesettile($image->getCore(), $tile->getCore()); + $filling = IMG_COLOR_TILED; + + } catch (\Intervention\Image\Exception\NotReadableException $e) { + + // set solid color filling + $color = new Color($filling); + $filling = $color->getInt(); + } + + imagealphablending($resource, true); + + if (is_int($x) && is_int($y)) { + + // resource should be visible through transparency + $base = $image->getDriver()->newImage($width, $height)->getCore(); + imagecopy($base, $resource, 0, 0, 0, 0, $width, $height); + + // floodfill if exact position is defined + imagefill($resource, $x, $y, $filling); + + // copy filled original over base + imagecopy($base, $resource, 0, 0, 0, 0, $width, $height); + + // set base as new resource-core + $image->setCore($base); + imagedestroy($resource); + + } else { + // fill whole image otherwise + imagefilledrectangle($resource, 0, 0, $width - 1, $height - 1, $filling); + } + + isset($tile) ? imagedestroy($tile->getCore()) : null; + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FitCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FitCommand.php new file mode 100644 index 000000000..d861ad94c --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FitCommand.php @@ -0,0 +1,32 @@ +argument(0)->type('digit')->required()->value(); + $height = $this->argument(1)->type('digit')->value($width); + $constraints = $this->argument(2)->type('closure')->value(); + $position = $this->argument(3)->type('string')->value('center'); + + // calculate size + $cropped = $image->getSize()->fit(new Size($width, $height), $position); + $resized = clone $cropped; + $resized = $resized->resize($width, $height, $constraints); + + // modify image + $this->modify($image, 0, 0, $cropped->pivot->x, $cropped->pivot->y, $resized->getWidth(), $resized->getHeight(), $cropped->getWidth(), $cropped->getHeight()); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FlipCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FlipCommand.php new file mode 100644 index 000000000..aa8f230e8 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/FlipCommand.php @@ -0,0 +1,37 @@ +argument(0)->value('h'); + + $size = $image->getSize(); + $dst = clone $size; + + switch (strtolower($mode)) { + case 2: + case 'v': + case 'vert': + case 'vertical': + $size->pivot->y = $size->height - 1; + $size->height = $size->height * (-1); + break; + + default: + $size->pivot->x = $size->width - 1; + $size->width = $size->width * (-1); + break; + } + + return $this->modify($image, 0, 0, $size->pivot->x, $size->pivot->y, $dst->width, $dst->height, $size->width, $size->height); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GammaCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GammaCommand.php new file mode 100644 index 000000000..7de0fb8a1 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GammaCommand.php @@ -0,0 +1,21 @@ +argument(0)->type('numeric')->required()->value(); + + return imagegammacorrect($image->getCore(), 1, $gamma); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GetSizeCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GetSizeCommand.php new file mode 100644 index 000000000..9eb7e2092 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GetSizeCommand.php @@ -0,0 +1,25 @@ +setOutput(new Size( + imagesx($image->getCore()), + imagesy($image->getCore()) + )); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GreyscaleCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GreyscaleCommand.php new file mode 100644 index 000000000..12921e79e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/GreyscaleCommand.php @@ -0,0 +1,19 @@ +getCore(), IMG_FILTER_GRAYSCALE); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/HeightenCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/HeightenCommand.php new file mode 100644 index 000000000..d31e9cde0 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/HeightenCommand.php @@ -0,0 +1,28 @@ +argument(0)->type('digit')->required()->value(); + $additionalConstraints = $this->argument(1)->type('closure')->value(); + + $this->arguments[0] = null; + $this->arguments[1] = $height; + $this->arguments[2] = function ($constraint) use ($additionalConstraints) { + $constraint->aspectRatio(); + if(is_callable($additionalConstraints)) + $additionalConstraints($constraint); + }; + + return parent::execute($image); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InsertCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InsertCommand.php new file mode 100644 index 000000000..47c770398 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InsertCommand.php @@ -0,0 +1,34 @@ +argument(0)->required()->value(); + $position = $this->argument(1)->type('string')->value(); + $x = $this->argument(2)->type('digit')->value(0); + $y = $this->argument(3)->type('digit')->value(0); + + // build watermark + $watermark = $image->getDriver()->init($source); + + // define insertion point + $image_size = $image->getSize()->align($position, $x, $y); + $watermark_size = $watermark->getSize()->align($position); + $target = $image_size->relativePosition($watermark_size); + + // insert image at position + imagealphablending($image->getCore(), true); + return imagecopy($image->getCore(), $watermark->getCore(), $target->x, $target->y, 0, 0, $watermark_size->width, $watermark_size->height); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InterlaceCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InterlaceCommand.php new file mode 100644 index 000000000..e3461cb07 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InterlaceCommand.php @@ -0,0 +1,23 @@ +argument(0)->type('bool')->value(true); + + imageinterlace($image->getCore(), $mode); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InvertCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InvertCommand.php new file mode 100644 index 000000000..1a514f1d4 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InvertCommand.php @@ -0,0 +1,19 @@ +getCore(), IMG_FILTER_NEGATE); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/LimitColorsCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/LimitColorsCommand.php new file mode 100644 index 000000000..0baed7e91 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/LimitColorsCommand.php @@ -0,0 +1,53 @@ +argument(0)->value(); + $matte = $this->argument(1)->value(); + + // get current image size + $size = $image->getSize(); + + // create empty canvas + $resource = imagecreatetruecolor($size->width, $size->height); + + // define matte + if (is_null($matte)) { + $matte = imagecolorallocatealpha($resource, 255, 255, 255, 127); + } else { + $matte = $image->getDriver()->parseColor($matte)->getInt(); + } + + // fill with matte and copy original image + imagefill($resource, 0, 0, $matte); + + // set transparency + imagecolortransparent($resource, $matte); + + // copy original image + imagecopy($resource, $image->getCore(), 0, 0, 0, 0, $size->width, $size->height); + + if (is_numeric($count) && $count <= 256) { + // decrease colors + imagetruecolortopalette($resource, true, $count); + } + + // set new resource + $image->setCore($resource); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/MaskCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/MaskCommand.php new file mode 100644 index 000000000..4c61429b2 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/MaskCommand.php @@ -0,0 +1,83 @@ +argument(0)->value(); + $mask_w_alpha = $this->argument(1)->type('bool')->value(false); + + $image_size = $image->getSize(); + + // create empty canvas + $canvas = $image->getDriver()->newImage($image_size->width, $image_size->height, [0,0,0,0]); + + // build mask image from source + $mask = $image->getDriver()->init($mask_source); + $mask_size = $mask->getSize(); + + // resize mask to size of current image (if necessary) + if ($mask_size != $image_size) { + $mask->resize($image_size->width, $image_size->height); + } + + imagealphablending($canvas->getCore(), false); + + if ( ! $mask_w_alpha) { + // mask from greyscale image + imagefilter($mask->getCore(), IMG_FILTER_GRAYSCALE); + } + + // redraw old image pixel by pixel considering alpha map + for ($x=0; $x < $image_size->width; $x++) { + for ($y=0; $y < $image_size->height; $y++) { + + $color = $image->pickColor($x, $y, 'array'); + $alpha = $mask->pickColor($x, $y, 'array'); + + if ($mask_w_alpha) { + $alpha = $alpha[3]; // use alpha channel as mask + } else { + + if ($alpha[3] == 0) { // transparent as black + $alpha = 0; + } else { + + // $alpha = floatval(round((($alpha[0] + $alpha[1] + $alpha[3]) / 3) / 255, 2)); + + // image is greyscale, so channel doesn't matter (use red channel) + $alpha = floatval(round($alpha[0] / 255, 2)); + } + + } + + // preserve alpha of original image... + if ($color[3] < $alpha) { + $alpha = $color[3]; + } + + // replace alpha value + $color[3] = $alpha; + + // redraw pixel + $canvas->pixel($color, $x, $y); + } + } + + + // replace current image with masked instance + $image->setCore($canvas->getCore()); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/OpacityCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/OpacityCommand.php new file mode 100644 index 000000000..48492d24f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/OpacityCommand.php @@ -0,0 +1,31 @@ +argument(0)->between(0, 100)->required()->value(); + + // get size of image + $size = $image->getSize(); + + // build temp alpha mask + $mask_color = sprintf('rgba(0, 0, 0, %.1F)', $transparency / 100); + $mask = $image->getDriver()->newImage($size->width, $size->height, $mask_color); + + // mask image + $image->mask($mask->getCore(), true); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PickColorCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PickColorCommand.php new file mode 100644 index 000000000..bad96f498 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PickColorCommand.php @@ -0,0 +1,37 @@ +argument(0)->type('digit')->required()->value(); + $y = $this->argument(1)->type('digit')->required()->value(); + $format = $this->argument(2)->type('string')->value('array'); + + // pick color + $color = imagecolorat($image->getCore(), $x, $y); + + if ( ! imageistruecolor($image->getCore())) { + $color = imagecolorsforindex($image->getCore(), $color); + $color['alpha'] = round(1 - $color['alpha'] / 127, 2); + } + + $color = new Color($color); + + // format to output + $this->setOutput($color->format($format)); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelCommand.php new file mode 100644 index 000000000..2a90ce34f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelCommand.php @@ -0,0 +1,25 @@ +argument(0)->required()->value(); + $color = new Color($color); + $x = $this->argument(1)->type('digit')->required()->value(); + $y = $this->argument(2)->type('digit')->required()->value(); + + return imagesetpixel($image->getCore(), $x, $y, $color->getInt()); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelateCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelateCommand.php new file mode 100644 index 000000000..0934797a8 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/PixelateCommand.php @@ -0,0 +1,21 @@ +argument(0)->type('digit')->value(10); + + return imagefilter($image->getCore(), IMG_FILTER_PIXELATE, $size, true); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResetCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResetCommand.php new file mode 100644 index 000000000..12c41bf6e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResetCommand.php @@ -0,0 +1,38 @@ +argument(0)->value(); + + if (is_resource($backup = $image->getBackup($backupName))) { + + // destroy current resource + imagedestroy($image->getCore()); + + // clone backup + $backup = $image->getDriver()->cloneCore($backup); + + // reset to new resource + $image->setCore($backup); + + return true; + } + + throw new RuntimeException( + "Backup not available. Call backup() before reset()." + ); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResizeCanvasCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResizeCanvasCommand.php new file mode 100644 index 000000000..73f3df308 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResizeCanvasCommand.php @@ -0,0 +1,83 @@ +argument(0)->type('digit')->required()->value(); + $height = $this->argument(1)->type('digit')->required()->value(); + $anchor = $this->argument(2)->value('center'); + $relative = $this->argument(3)->type('boolean')->value(false); + $bgcolor = $this->argument(4)->value(); + + $original_width = $image->getWidth(); + $original_height = $image->getHeight(); + + // check of only width or height is set + $width = is_null($width) ? $original_width : intval($width); + $height = is_null($height) ? $original_height : intval($height); + + // check on relative width/height + if ($relative) { + $width = $original_width + $width; + $height = $original_height + $height; + } + + // check for negative width/height + $width = ($width <= 0) ? $width + $original_width : $width; + $height = ($height <= 0) ? $height + $original_height : $height; + + // create new canvas + $canvas = $image->getDriver()->newImage($width, $height, $bgcolor); + + // set copy position + $canvas_size = $canvas->getSize()->align($anchor); + $image_size = $image->getSize()->align($anchor); + $canvas_pos = $image_size->relativePosition($canvas_size); + $image_pos = $canvas_size->relativePosition($image_size); + + if ($width <= $original_width) { + $dst_x = 0; + $src_x = $canvas_pos->x; + $src_w = $canvas_size->width; + } else { + $dst_x = $image_pos->x; + $src_x = 0; + $src_w = $original_width; + } + + if ($height <= $original_height) { + $dst_y = 0; + $src_y = $canvas_pos->y; + $src_h = $canvas_size->height; + } else { + $dst_y = $image_pos->y; + $src_y = 0; + $src_h = $original_height; + } + + // make image area transparent to keep transparency + // even if background-color is set + $transparent = imagecolorallocatealpha($canvas->getCore(), 255, 255, 255, 127); + imagealphablending($canvas->getCore(), false); // do not blend / just overwrite + imagefilledrectangle($canvas->getCore(), $dst_x, $dst_y, $dst_x + $src_w - 1, $dst_y + $src_h - 1, $transparent); + + // copy image into new canvas + imagecopy($canvas->getCore(), $image->getCore(), $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h); + + // set new core to canvas + $image->setCore($canvas->getCore()); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResizeCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResizeCommand.php new file mode 100644 index 000000000..382d9709e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResizeCommand.php @@ -0,0 +1,84 @@ +argument(0)->value(); + $height = $this->argument(1)->value(); + $constraints = $this->argument(2)->type('closure')->value(); + + // resize box + $resized = $image->getSize()->resize($width, $height, $constraints); + + // modify image + $this->modify($image, 0, 0, 0, 0, $resized->getWidth(), $resized->getHeight(), $image->getWidth(), $image->getHeight()); + + return true; + } + + /** + * Wrapper function for 'imagecopyresampled' + * + * @param Image $image + * @param int $dst_x + * @param int $dst_y + * @param int $src_x + * @param int $src_y + * @param int $dst_w + * @param int $dst_h + * @param int $src_w + * @param int $src_h + * @return boolean + */ + protected function modify($image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) + { + // create new image + $modified = imagecreatetruecolor($dst_w, $dst_h); + + // get current image + $resource = $image->getCore(); + + // preserve transparency + $transIndex = imagecolortransparent($resource); + + if ($transIndex != -1) { + $rgba = imagecolorsforindex($modified, $transIndex); + $transColor = imagecolorallocatealpha($modified, $rgba['red'], $rgba['green'], $rgba['blue'], 127); + imagefill($modified, 0, 0, $transColor); + imagecolortransparent($modified, $transColor); + } else { + imagealphablending($modified, false); + imagesavealpha($modified, true); + } + + // copy content from resource + $result = imagecopyresampled( + $modified, + $resource, + $dst_x, + $dst_y, + $src_x, + $src_y, + $dst_w, + $dst_h, + $src_w, + $src_h + ); + + // set new content as recource + $image->setCore($modified); + + return $result; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/RotateCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/RotateCommand.php new file mode 100644 index 000000000..e02b91760 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/RotateCommand.php @@ -0,0 +1,30 @@ +argument(0)->type('numeric')->required()->value(); + $color = $this->argument(1)->value(); + $color = new Color($color); + + // restrict rotations beyond 360 degrees, since the end result is the same + $angle %= 360; + + // rotate image + $image->setCore(imagerotate($image->getCore(), $angle, $color->getInt())); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/SharpenCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/SharpenCommand.php new file mode 100644 index 000000000..782e56502 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/SharpenCommand.php @@ -0,0 +1,34 @@ +argument(0)->between(0, 100)->value(10); + + // build matrix + $min = $amount >= 10 ? $amount * -0.01 : 0; + $max = $amount * -0.025; + $abs = ((4 * $min + 4 * $max) * -1) + 1; + $div = 1; + + $matrix = [ + [$min, $max, $min], + [$max, $abs, $max], + [$min, $max, $min] + ]; + + // apply the matrix + return imageconvolution($image->getCore(), $matrix, $div, 0); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/TrimCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/TrimCommand.php new file mode 100644 index 000000000..2e3697527 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/TrimCommand.php @@ -0,0 +1,176 @@ +argument(0)->type('string')->value(); + $away = $this->argument(1)->value(); + $tolerance = $this->argument(2)->type('numeric')->value(0); + $feather = $this->argument(3)->type('numeric')->value(0); + + $width = $image->getWidth(); + $height = $image->getHeight(); + + // default values + $checkTransparency = false; + + // define borders to trim away + if (is_null($away)) { + $away = ['top', 'right', 'bottom', 'left']; + } elseif (is_string($away)) { + $away = [$away]; + } + + // lower border names + foreach ($away as $key => $value) { + $away[$key] = strtolower($value); + } + + // define base color position + switch (strtolower($base)) { + case 'transparent': + case 'trans': + $checkTransparency = true; + $base_x = 0; + $base_y = 0; + break; + + case 'bottom-right': + case 'right-bottom': + $base_x = $width - 1; + $base_y = $height - 1; + break; + + default: + case 'top-left': + case 'left-top': + $base_x = 0; + $base_y = 0; + break; + } + + // pick base color + if ($checkTransparency) { + $color = new Color; // color will only be used to compare alpha channel + } else { + $color = $image->pickColor($base_x, $base_y, 'object'); + } + + $top_x = 0; + $top_y = 0; + $bottom_x = $width; + $bottom_y = $height; + + // search upper part of image for colors to trim away + if (in_array('top', $away)) { + + for ($y=0; $y < ceil($height/2); $y++) { + for ($x=0; $x < $width; $x++) { + + $checkColor = $image->pickColor($x, $y, 'object'); + + if ($checkTransparency) { + $checkColor->r = $color->r; + $checkColor->g = $color->g; + $checkColor->b = $color->b; + } + + if ($color->differs($checkColor, $tolerance)) { + $top_y = max(0, $y - $feather); + break 2; + } + + } + } + + } + + // search left part of image for colors to trim away + if (in_array('left', $away)) { + + for ($x=0; $x < ceil($width/2); $x++) { + for ($y=$top_y; $y < $height; $y++) { + + $checkColor = $image->pickColor($x, $y, 'object'); + + if ($checkTransparency) { + $checkColor->r = $color->r; + $checkColor->g = $color->g; + $checkColor->b = $color->b; + } + + if ($color->differs($checkColor, $tolerance)) { + $top_x = max(0, $x - $feather); + break 2; + } + + } + } + + } + + // search lower part of image for colors to trim away + if (in_array('bottom', $away)) { + + for ($y=($height-1); $y >= floor($height/2)-1; $y--) { + for ($x=$top_x; $x < $width; $x++) { + + $checkColor = $image->pickColor($x, $y, 'object'); + + if ($checkTransparency) { + $checkColor->r = $color->r; + $checkColor->g = $color->g; + $checkColor->b = $color->b; + } + + if ($color->differs($checkColor, $tolerance)) { + $bottom_y = min($height, $y+1 + $feather); + break 2; + } + + } + } + + } + + // search right part of image for colors to trim away + if (in_array('right', $away)) { + + for ($x=($width-1); $x >= floor($width/2)-1; $x--) { + for ($y=$top_y; $y < $bottom_y; $y++) { + + $checkColor = $image->pickColor($x, $y, 'object'); + + if ($checkTransparency) { + $checkColor->r = $color->r; + $checkColor->g = $color->g; + $checkColor->b = $color->b; + } + + if ($color->differs($checkColor, $tolerance)) { + $bottom_x = min($width, $x+1 + $feather); + break 2; + } + + } + } + + } + + + // trim parts of image + return $this->modify($image, 0, 0, $top_x, $top_y, ($bottom_x-$top_x), ($bottom_y-$top_y), ($bottom_x-$top_x), ($bottom_y-$top_y)); + + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/WidenCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/WidenCommand.php new file mode 100644 index 000000000..43000d5dc --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Commands/WidenCommand.php @@ -0,0 +1,28 @@ +argument(0)->type('digit')->required()->value(); + $additionalConstraints = $this->argument(1)->type('closure')->value(); + + $this->arguments[0] = $width; + $this->arguments[1] = null; + $this->arguments[2] = function ($constraint) use ($additionalConstraints) { + $constraint->aspectRatio(); + if(is_callable($additionalConstraints)) + $additionalConstraints($constraint); + }; + + return parent::execute($image); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php new file mode 100644 index 000000000..6d2d7b4d3 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php @@ -0,0 +1,155 @@ +gdResourceToTruecolor($core); + + // build image + $image = $this->initFromGdResource($core); + $image->mime = $mime; + $image->setFileInfoFromPath($path); + + return $image; + } + + /** + * Initiates new image from GD resource + * + * @param Resource $resource + * @return \Intervention\Image\Image + */ + public function initFromGdResource($resource) + { + return new Image(new Driver, $resource); + } + + /** + * Initiates new image from Imagick object + * + * @param Imagick $object + * @return \Intervention\Image\Image + */ + public function initFromImagick(\Imagick $object) + { + throw new NotSupportedException( + "Gd driver is unable to init from Imagick object." + ); + } + + /** + * Initiates new image from binary data + * + * @param string $data + * @return \Intervention\Image\Image + */ + public function initFromBinary($binary) + { + $resource = @imagecreatefromstring($binary); + + if ($resource === false) { + throw new NotReadableException( + "Unable to init from given binary data." + ); + } + + $image = $this->initFromGdResource($resource); + $image->mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $binary); + + return $image; + } + + /** + * Transform GD resource into Truecolor version + * + * @param resource $resource + * @return bool + */ + public function gdResourceToTruecolor(&$resource) + { + $width = imagesx($resource); + $height = imagesy($resource); + + // new canvas + $canvas = imagecreatetruecolor($width, $height); + + // fill with transparent color + imagealphablending($canvas, false); + $transparent = imagecolorallocatealpha($canvas, 255, 255, 255, 127); + imagefilledrectangle($canvas, 0, 0, $width, $height, $transparent); + imagecolortransparent($canvas, $transparent); + imagealphablending($canvas, true); + + // copy original + imagecopy($canvas, $resource, 0, 0, 0, 0, $width, $height); + imagedestroy($resource); + + $resource = $canvas; + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Driver.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Driver.php new file mode 100644 index 000000000..5f2f23ea3 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Driver.php @@ -0,0 +1,89 @@ +coreAvailable()) { + throw new NotSupportedException( + "GD Library extension not available with this PHP installation." + ); + } + + $this->decoder = $decoder ? $decoder : new Decoder; + $this->encoder = $encoder ? $encoder : new Encoder; + } + + /** + * Creates new image instance + * + * @param int $width + * @param int $height + * @param mixed $background + * @return \Intervention\Image\Image + */ + public function newImage($width, $height, $background = null) + { + // create empty resource + $core = imagecreatetruecolor($width, $height); + $image = new Image(new static, $core); + + // set background color + $background = new Color($background); + imagefill($image->getCore(), 0, 0, $background->getInt()); + + return $image; + } + + /** + * Reads given string into color object + * + * @param string $value + * @return AbstractColor + */ + public function parseColor($value) + { + return new Color($value); + } + + /** + * Checks if core module installation is available + * + * @return boolean + */ + protected function coreAvailable() + { + return (extension_loaded('gd') && function_exists('gd_info')); + } + + /** + * Returns clone of given core + * + * @return mixed + */ + public function cloneCore($core) + { + $width = imagesx($core); + $height = imagesy($core); + $clone = imagecreatetruecolor($width, $height); + imagealphablending($clone, false); + imagesavealpha($clone, true); + $transparency = imagecolorallocatealpha($clone, 0, 0, 0, 127); + imagefill($clone, 0, 0, $transparency); + + imagecopy($clone, $core, 0, 0, 0, 0, $width, $height); + + return $clone; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Encoder.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Encoder.php new file mode 100644 index 000000000..d8cc02178 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Encoder.php @@ -0,0 +1,124 @@ +image->getCore(), null, $this->quality); + $this->image->mime = image_type_to_mime_type(IMAGETYPE_JPEG); + $buffer = ob_get_contents(); + ob_end_clean(); + + return $buffer; + } + + /** + * Processes and returns encoded image as PNG string + * + * @return string + */ + protected function processPng() + { + ob_start(); + $resource = $this->image->getCore(); + imagealphablending($resource, false); + imagesavealpha($resource, true); + imagepng($resource, null, -1); + $this->image->mime = image_type_to_mime_type(IMAGETYPE_PNG); + $buffer = ob_get_contents(); + ob_end_clean(); + + return $buffer; + } + + /** + * Processes and returns encoded image as GIF string + * + * @return string + */ + protected function processGif() + { + ob_start(); + imagegif($this->image->getCore()); + $this->image->mime = image_type_to_mime_type(IMAGETYPE_GIF); + $buffer = ob_get_contents(); + ob_end_clean(); + + return $buffer; + } + + protected function processWebp() + { + if ( ! function_exists('imagewebp')) { + throw new NotSupportedException( + "Webp format is not supported by PHP installation." + ); + } + + ob_start(); + imagewebp($this->image->getCore(), null, $this->quality); + $this->image->mime = defined('IMAGETYPE_WEBP') ? image_type_to_mime_type(IMAGETYPE_WEBP) : 'image/webp'; + $buffer = ob_get_contents(); + ob_end_clean(); + + return $buffer; + } + + /** + * Processes and returns encoded image as TIFF string + * + * @return string + */ + protected function processTiff() + { + throw new NotSupportedException( + "TIFF format is not supported by Gd Driver." + ); + } + + /** + * Processes and returns encoded image as BMP string + * + * @return string + */ + protected function processBmp() + { + throw new NotSupportedException( + "BMP format is not supported by Gd Driver." + ); + } + + /** + * Processes and returns encoded image as ICO string + * + * @return string + */ + protected function processIco() + { + throw new NotSupportedException( + "ICO format is not supported by Gd Driver." + ); + } + + /** + * Processes and returns encoded image as PSD string + * + * @return string + */ + protected function processPsd() + { + throw new NotSupportedException( + "PSD format is not supported by Gd Driver." + ); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Font.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Font.php new file mode 100644 index 000000000..47a7b15bd --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Font.php @@ -0,0 +1,256 @@ +size * 0.75)); + } + + /** + * Filter function to access internal integer font values + * + * @return int + */ + private function getInternalFont() + { + $internalfont = is_null($this->file) ? 1 : $this->file; + $internalfont = is_numeric($internalfont) ? $internalfont : false; + + if ( ! in_array($internalfont, [1, 2, 3, 4, 5])) { + throw new NotSupportedException( + sprintf('Internal GD font (%s) not available. Use only 1-5.', $internalfont) + ); + } + + return intval($internalfont); + } + + /** + * Get width of an internal font character + * + * @return int + */ + private function getInternalFontWidth() + { + return $this->getInternalFont() + 4; + } + + /** + * Get height of an internal font character + * + * @return int + */ + private function getInternalFontHeight() + { + switch ($this->getInternalFont()) { + case 1: + return 8; + + case 2: + return 14; + + case 3: + return 14; + + case 4: + return 16; + + case 5: + return 16; + } + } + + /** + * Calculates bounding box of current font setting + * + * @return Array + */ + public function getBoxSize() + { + $box = []; + + if ($this->hasApplicableFontFile()) { + + // get bounding box with angle 0 + $box = imagettfbbox($this->getPointSize(), 0, $this->file, $this->text); + + // rotate points manually + if ($this->angle != 0) { + + $angle = pi() * 2 - $this->angle * pi() * 2 / 360; + + for ($i=0; $i<4; $i++) { + $x = $box[$i * 2]; + $y = $box[$i * 2 + 1]; + $box[$i * 2] = cos($angle) * $x - sin($angle) * $y; + $box[$i * 2 + 1] = sin($angle) * $x + cos($angle) * $y; + } + } + + $box['width'] = intval(abs($box[4] - $box[0])); + $box['height'] = intval(abs($box[5] - $box[1])); + + } else { + + // get current internal font size + $width = $this->getInternalFontWidth(); + $height = $this->getInternalFontHeight(); + + if (strlen($this->text) == 0) { + // no text -> no boxsize + $box['width'] = 0; + $box['height'] = 0; + } else { + // calculate boxsize + $box['width'] = strlen($this->text) * $width; + $box['height'] = $height; + } + } + + return $box; + } + + /** + * Draws font to given image at given position + * + * @param Image $image + * @param int $posx + * @param int $posy + * @return void + */ + public function applyToImage(Image $image, $posx = 0, $posy = 0) + { + // parse text color + $color = new Color($this->color); + + if ($this->hasApplicableFontFile()) { + + if ($this->angle != 0 || is_string($this->align) || is_string($this->valign)) { + + $box = $this->getBoxSize(); + + $align = is_null($this->align) ? 'left' : strtolower($this->align); + $valign = is_null($this->valign) ? 'bottom' : strtolower($this->valign); + + // correction on position depending on v/h alignment + switch ($align.'-'.$valign) { + + case 'center-top': + $posx = $posx - round(($box[6]+$box[4])/2); + $posy = $posy - round(($box[7]+$box[5])/2); + break; + + case 'right-top': + $posx = $posx - $box[4]; + $posy = $posy - $box[5]; + break; + + case 'left-top': + $posx = $posx - $box[6]; + $posy = $posy - $box[7]; + break; + + case 'center-center': + case 'center-middle': + $posx = $posx - round(($box[0]+$box[4])/2); + $posy = $posy - round(($box[1]+$box[5])/2); + break; + + case 'right-center': + case 'right-middle': + $posx = $posx - round(($box[2]+$box[4])/2); + $posy = $posy - round(($box[3]+$box[5])/2); + break; + + case 'left-center': + case 'left-middle': + $posx = $posx - round(($box[0]+$box[6])/2); + $posy = $posy - round(($box[1]+$box[7])/2); + break; + + case 'center-bottom': + $posx = $posx - round(($box[0]+$box[2])/2); + $posy = $posy - round(($box[1]+$box[3])/2); + break; + + case 'right-bottom': + $posx = $posx - $box[2]; + $posy = $posy - $box[3]; + break; + + case 'left-bottom': + $posx = $posx - $box[0]; + $posy = $posy - $box[1]; + break; + } + } + + // enable alphablending for imagettftext + imagealphablending($image->getCore(), true); + + // draw ttf text + imagettftext($image->getCore(), $this->getPointSize(), $this->angle, $posx, $posy, $color->getInt(), $this->file, $this->text); + + } else { + + // get box size + $box = $this->getBoxSize(); + $width = $box['width']; + $height = $box['height']; + + // internal font specific position corrections + if ($this->getInternalFont() == 1) { + $top_correction = 1; + $bottom_correction = 2; + } elseif ($this->getInternalFont() == 3) { + $top_correction = 2; + $bottom_correction = 4; + } else { + $top_correction = 3; + $bottom_correction = 4; + } + + // x-position corrections for horizontal alignment + switch (strtolower($this->align)) { + case 'center': + $posx = ceil($posx - ($width / 2)); + break; + + case 'right': + $posx = ceil($posx - $width) + 1; + break; + } + + // y-position corrections for vertical alignment + switch (strtolower($this->valign)) { + case 'center': + case 'middle': + $posy = ceil($posy - ($height / 2)); + break; + + case 'top': + $posy = ceil($posy - $top_correction); + break; + + default: + case 'bottom': + $posy = round($posy - $height + $bottom_correction); + break; + } + + // draw text + imagestring($image->getCore(), $this->getInternalFont(), $posx, $posy, $this->text, $color->getInt()); + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/CircleShape.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/CircleShape.php new file mode 100644 index 000000000..c3c42144d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/CircleShape.php @@ -0,0 +1,40 @@ +width = is_numeric($diameter) ? intval($diameter) : $this->diameter; + $this->height = is_numeric($diameter) ? intval($diameter) : $this->diameter; + $this->diameter = is_numeric($diameter) ? intval($diameter) : $this->diameter; + } + + /** + * Draw current circle on given image + * + * @param Image $image + * @param int $x + * @param int $y + * @return boolean + */ + public function applyToImage(Image $image, $x = 0, $y = 0) + { + return parent::applyToImage($image, $x, $y); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/EllipseShape.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/EllipseShape.php new file mode 100644 index 000000000..78e5e4a59 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/EllipseShape.php @@ -0,0 +1,65 @@ +width = is_numeric($width) ? intval($width) : $this->width; + $this->height = is_numeric($height) ? intval($height) : $this->height; + } + + /** + * Draw ellipse instance on given image + * + * @param Image $image + * @param int $x + * @param int $y + * @return boolean + */ + public function applyToImage(Image $image, $x = 0, $y = 0) + { + // parse background color + $background = new Color($this->background); + + if ($this->hasBorder()) { + // slightly smaller ellipse to keep 1px bordered edges clean + imagefilledellipse($image->getCore(), $x, $y, $this->width-1, $this->height-1, $background->getInt()); + + $border_color = new Color($this->border_color); + imagesetthickness($image->getCore(), $this->border_width); + + // gd's imageellipse doesn't respect imagesetthickness so i use imagearc with 359.9 degrees here + imagearc($image->getCore(), $x, $y, $this->width, $this->height, 0, 359.99, $border_color->getInt()); + } else { + imagefilledellipse($image->getCore(), $x, $y, $this->width, $this->height, $background->getInt()); + } + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/LineShape.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/LineShape.php new file mode 100644 index 000000000..ea38b513e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/LineShape.php @@ -0,0 +1,90 @@ +x = is_numeric($x) ? intval($x) : $this->x; + $this->y = is_numeric($y) ? intval($y) : $this->y; + } + + /** + * Set current line color + * + * @param string $color + * @return void + */ + public function color($color) + { + $this->color = $color; + } + + /** + * Set current line width in pixels + * + * @param int $width + * @return void + */ + public function width($width) + { + throw new \Intervention\Image\Exception\NotSupportedException( + "Line width is not supported by GD driver." + ); + } + + /** + * Draw current instance of line to given endpoint on given image + * + * @param Image $image + * @param int $x + * @param int $y + * @return boolean + */ + public function applyToImage(Image $image, $x = 0, $y = 0) + { + $color = new Color($this->color); + imageline($image->getCore(), $x, $y, $this->x, $this->y, $color->getInt()); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/PolygonShape.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/PolygonShape.php new file mode 100644 index 000000000..5e14df40e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/PolygonShape.php @@ -0,0 +1,49 @@ +points = $points; + } + + /** + * Draw polygon on given image + * + * @param Image $image + * @param int $x + * @param int $y + * @return boolean + */ + public function applyToImage(Image $image, $x = 0, $y = 0) + { + $background = new Color($this->background); + imagefilledpolygon($image->getCore(), $this->points, intval(count($this->points) / 2), $background->getInt()); + + if ($this->hasBorder()) { + $border_color = new Color($this->border_color); + imagesetthickness($image->getCore(), $this->border_width); + imagepolygon($image->getCore(), $this->points, intval(count($this->points) / 2), $border_color->getInt()); + } + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/RectangleShape.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/RectangleShape.php new file mode 100644 index 000000000..5f69a7f92 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/RectangleShape.php @@ -0,0 +1,76 @@ +x1 = is_numeric($x1) ? intval($x1) : $this->x1; + $this->y1 = is_numeric($y1) ? intval($y1) : $this->y1; + $this->x2 = is_numeric($x2) ? intval($x2) : $this->x2; + $this->y2 = is_numeric($y2) ? intval($y2) : $this->y2; + } + + /** + * Draw rectangle to given image at certain position + * + * @param Image $image + * @param int $x + * @param int $y + * @return boolean + */ + public function applyToImage(Image $image, $x = 0, $y = 0) + { + $background = new Color($this->background); + imagefilledrectangle($image->getCore(), $this->x1, $this->y1, $this->x2, $this->y2, $background->getInt()); + + if ($this->hasBorder()) { + $border_color = new Color($this->border_color); + imagesetthickness($image->getCore(), $this->border_width); + imagerectangle($image->getCore(), $this->x1, $this->y1, $this->x2, $this->y2, $border_color->getInt()); + } + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Image.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Image.php new file mode 100644 index 000000000..2c4d3140a --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Image.php @@ -0,0 +1,365 @@ +driver = $driver; + $this->core = $core; + } + + /** + * Magic method to catch all image calls + * usually any AbstractCommand + * + * @param string $name + * @param Array $arguments + * @return mixed + */ + public function __call($name, $arguments) + { + $command = $this->driver->executeCommand($this, $name, $arguments); + return $command->hasOutput() ? $command->getOutput() : $this; + } + + /** + * Starts encoding of current image + * + * @param string $format + * @param int $quality + * @return \Intervention\Image\Image + */ + public function encode($format = null, $quality = 90) + { + return $this->driver->encode($this, $format, $quality); + } + + /** + * Saves encoded image in filesystem + * + * @param string $path + * @param int $quality + * @return \Intervention\Image\Image + */ + public function save($path = null, $quality = null) + { + $path = is_null($path) ? $this->basePath() : $path; + + if (is_null($path)) { + throw new NotWritableException( + "Can't write to undefined path." + ); + } + + $data = $this->encode(pathinfo($path, PATHINFO_EXTENSION), $quality); + $saved = @file_put_contents($path, $data); + + if ($saved === false) { + throw new NotWritableException( + "Can't write image data to path ({$path})" + ); + } + + // set new file info + $this->setFileInfoFromPath($path); + + return $this; + } + + /** + * Runs a given filter on current image + * + * @param FiltersFilterInterface $filter + * @return \Intervention\Image\Image + */ + public function filter(Filters\FilterInterface $filter) + { + return $filter->applyFilter($this); + } + + /** + * Returns current image driver + * + * @return \Intervention\Image\AbstractDriver + */ + public function getDriver() + { + return $this->driver; + } + + /** + * Sets current image driver + * @param AbstractDriver $driver + */ + public function setDriver(AbstractDriver $driver) + { + $this->driver = $driver; + + return $this; + } + + /** + * Returns current image resource/obj + * + * @return mixed + */ + public function getCore() + { + return $this->core; + } + + /** + * Sets current image resource + * + * @param mixed $core + */ + public function setCore($core) + { + $this->core = $core; + + return $this; + } + + /** + * Returns current image backup + * + * @param string $name + * @return mixed + */ + public function getBackup($name = null) + { + $name = is_null($name) ? 'default' : $name; + + if ( ! $this->backupExists($name)) { + throw new RuntimeException( + "Backup with name ({$name}) not available. Call backup() before reset()." + ); + } + + return $this->backups[$name]; + } + + /** + * Returns all backups attached to image + * + * @return array + */ + public function getBackups() + { + return $this->backups; + } + + /** + * Sets current image backup + * + * @param mixed $resource + * @param string $name + * @return self + */ + public function setBackup($resource, $name = null) + { + $name = is_null($name) ? 'default' : $name; + + $this->backups[$name] = $resource; + + return $this; + } + + /** + * Checks if named backup exists + * + * @param string $name + * @return bool + */ + private function backupExists($name) + { + return array_key_exists($name, $this->backups); + } + + /** + * Checks if current image is already encoded + * + * @return boolean + */ + public function isEncoded() + { + return ! empty($this->encoded); + } + + /** + * Returns encoded image data of current image + * + * @return string + */ + public function getEncoded() + { + return $this->encoded; + } + + /** + * Sets encoded image buffer + * + * @param string $value + */ + public function setEncoded($value) + { + $this->encoded = $value; + + return $this; + } + + /** + * Calculates current image width + * + * @return int + */ + public function getWidth() + { + return $this->getSize()->width; + } + + /** + * Alias of getWidth() + * + * @return int + */ + public function width() + { + return $this->getWidth(); + } + + /** + * Calculates current image height + * + * @return int + */ + public function getHeight() + { + return $this->getSize()->height; + } + + /** + * Alias of getHeight + * + * @return int + */ + public function height() + { + return $this->getHeight(); + } + + /** + * Reads mime type + * + * @return string + */ + public function mime() + { + return $this->mime; + } + + /** + * Returns encoded image data in string conversion + * + * @return string + */ + public function __toString() + { + return $this->encoded; + } + + /** + * Cloning an image + */ + public function __clone() + { + $this->core = $this->driver->cloneCore($this->core); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageManager.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageManager.php new file mode 100644 index 000000000..324fe7fa3 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageManager.php @@ -0,0 +1,142 @@ + 'gd' + ]; + + /** + * Creates new instance of Image Manager + * + * @param array $config + */ + public function __construct(array $config = []) + { + $this->checkRequirements(); + $this->configure($config); + } + + /** + * Overrides configuration settings + * + * @param array $config + * + * @return self + */ + public function configure(array $config = []) + { + $this->config = array_replace($this->config, $config); + + return $this; + } + + /** + * Initiates an Image instance from different input types + * + * @param mixed $data + * + * @return \Intervention\Image\Image + */ + public function make($data) + { + return $this->createDriver()->init($data); + } + + /** + * Creates an empty image canvas + * + * @param int $width + * @param int $height + * @param mixed $background + * + * @return \Intervention\Image\Image + */ + public function canvas($width, $height, $background = null) + { + return $this->createDriver()->newImage($width, $height, $background); + } + + /** + * Create new cached image and run callback + * (requires additional package intervention/imagecache) + * + * @param Closure $callback + * @param int $lifetime + * @param boolean $returnObj + * + * @return Image + */ + public function cache(Closure $callback, $lifetime = null, $returnObj = false) + { + if (class_exists('Intervention\\Image\\ImageCache')) { + // create imagecache + $imagecache = new ImageCache($this); + + // run callback + if (is_callable($callback)) { + $callback($imagecache); + } + + return $imagecache->get($lifetime, $returnObj); + } + + throw new MissingDependencyException( + "Please install package intervention/imagecache before running this function." + ); + } + + /** + * Creates a driver instance according to config settings + * + * @return \Intervention\Image\AbstractDriver + */ + private function createDriver() + { + if (is_string($this->config['driver'])) { + $drivername = ucfirst($this->config['driver']); + $driverclass = sprintf('Intervention\\Image\\%s\\Driver', $drivername); + + if (class_exists($driverclass)) { + return new $driverclass; + } + + throw new NotSupportedException( + "Driver ({$drivername}) could not be instantiated." + ); + } + + if ($this->config['driver'] instanceof AbstractDriver) { + return $this->config['driver']; + } + + throw new NotSupportedException( + "Unknown driver type." + ); + } + + /** + * Check if all requirements are available + * + * @return void + */ + private function checkRequirements() + { + if ( ! function_exists('finfo_buffer')) { + throw new MissingDependencyException( + "PHP Fileinfo extension must be installed/enabled to use Intervention Image." + ); + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageManagerStatic.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageManagerStatic.php new file mode 100644 index 000000000..a1b564264 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageManagerStatic.php @@ -0,0 +1,88 @@ +configure($config); + } + + /** + * Statically initiates an Image instance from different input types + * + * @param mixed $data + * + * @return \Intervention\Image\Image + * @throws \Intervention\Image\Exception\NotReadableException + */ + public static function make($data) + { + return self::getManager()->make($data); + } + + /** + * Statically creates an empty image canvas + * + * @param int $width + * @param int $height + * @param mixed $background + * + * @return \Intervention\Image\Image + */ + public static function canvas($width, $height, $background = null) + { + return self::getManager()->canvas($width, $height, $background); + } + + /** + * Create new cached image and run callback statically + * + * @param Closure $callback + * @param int $lifetime + * @param boolean $returnObj + * + * @return mixed + */ + public static function cache(Closure $callback, $lifetime = null, $returnObj = false) + { + return self::getManager()->cache($callback, $lifetime, $returnObj); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProvider.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProvider.php new file mode 100644 index 000000000..e106d06cb --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProvider.php @@ -0,0 +1,87 @@ +provider = $this->getProvider(); + } + + /** + * Bootstrap the application events. + * + * @return void + */ + public function boot() + { + if (method_exists($this->provider, 'boot')) { + return $this->provider->boot(); + } + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + return $this->provider->register(); + } + + /** + * Return ServiceProvider according to Laravel version + * + * @return \Intervention\Image\Provider\ProviderInterface + */ + private function getProvider() + { + if ($this->app instanceof LumenApplication) { + $provider = '\Intervention\Image\ImageServiceProviderLumen'; + } elseif (version_compare(IlluminateApplication::VERSION, '5.0', '<')) { + $provider = '\Intervention\Image\ImageServiceProviderLaravel4'; + } else { + $provider = '\Intervention\Image\ImageServiceProviderLaravel5'; + } + + return new $provider($this->app); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return ['image']; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel4.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel4.php new file mode 100644 index 000000000..3b1388f25 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel4.php @@ -0,0 +1,112 @@ +package('intervention/image'); + + // try to create imagecache route only if imagecache is present + if (class_exists('Intervention\\Image\\ImageCache')) { + + $app = $this->app; + + // load imagecache config + $app['config']->package('intervention/imagecache', __DIR__.'/../../../../imagecache/src/config', 'imagecache'); + $config = $app['config']; + + // create dynamic manipulation route + if (is_string($config->get('imagecache::route'))) { + + // add original to route templates + $config->set('imagecache::templates.original', null); + + // setup image manipulator route + $app['router']->get($config->get('imagecache::route').'/{template}/{filename}', ['as' => 'imagecache', function ($template, $filename) use ($app, $config) { + + // disable session cookies for image route + $app['config']->set('session.driver', 'array'); + + // find file + foreach ($config->get('imagecache::paths') as $path) { + // don't allow '..' in filenames + $image_path = $path.'/'.str_replace('..', '', $filename); + if (file_exists($image_path) && is_file($image_path)) { + break; + } else { + $image_path = false; + } + } + + // abort if file not found + if ($image_path === false) { + $app->abort(404); + } + + // define template callback + $callback = $config->get("imagecache::templates.{$template}"); + + if (is_callable($callback) || class_exists($callback)) { + + // image manipulation based on callback + $content = $app['image']->cache(function ($image) use ($image_path, $callback) { + + switch (true) { + case is_callable($callback): + return $callback($image->make($image_path)); + break; + + case class_exists($callback): + return $image->make($image_path)->filter(new $callback); + break; + } + + }, $config->get('imagecache::lifetime')); + + } else { + + // get original image file contents + $content = file_get_contents($image_path); + } + + // define mime type + $mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $content); + + // return http response + return new IlluminateResponse($content, 200, [ + 'Content-Type' => $mime, + 'Cache-Control' => 'max-age='.($config->get('imagecache::lifetime')*60).', public', + 'Etag' => md5($content) + ]); + + }])->where(['template' => join('|', array_keys($config->get('imagecache::templates'))), 'filename' => '[ \w\\.\\/\\-]+']); + } + } + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + $app = $this->app; + + $app['image'] = $app->share(function ($app) { + return new ImageManager($app['config']->get('image::config')); + }); + + $app->alias('image', 'Intervention\Image\ImageManager'); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel5.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel5.php new file mode 100644 index 000000000..dd40ebd97 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLaravel5.php @@ -0,0 +1,89 @@ +publishes([ + __DIR__.'/../../config/config.php' => config_path('image.php') + ]); + + // setup intervention/imagecache if package is installed + $this->cacheIsInstalled() ? $this->bootstrapImageCache() : null; + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + $app = $this->app; + + // merge default config + $this->mergeConfigFrom( + __DIR__.'/../../config/config.php', + 'image' + ); + + // create image + $app->singleton('image', function ($app) { + return new ImageManager($app['config']->get('image')); + }); + + $app->alias('image', 'Intervention\Image\ImageManager'); + } + + /** + * Bootstrap imagecache + * + * @return void + */ + protected function bootstrapImageCache() + { + $app = $this->app; + $config = __DIR__.'/../../../../imagecache/src/config/config.php'; + + $this->publishes([ + $config => config_path('imagecache.php') + ]); + + // merge default config + $this->mergeConfigFrom( + $config, + 'imagecache' + ); + + // imagecache route + if (is_string(config('imagecache.route'))) { + + $filename_pattern = '[ \w\\.\\/\\-\\@\(\)]+'; + + // route to access template applied image file + $app['router']->get(config('imagecache.route').'/{template}/{filename}', [ + 'uses' => 'Intervention\Image\ImageCacheController@getResponse', + 'as' => 'imagecache' + ])->where(['filename' => $filename_pattern]); + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLeague.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLeague.php new file mode 100644 index 000000000..b756a61f5 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLeague.php @@ -0,0 +1,42 @@ +config = $config; + } + + /** + * Register the server provider. + * + * @return void + */ + public function register() + { + $this->getContainer()->share('Intervention\Image\ImageManager', function () { + return new ImageManager($this->config); + }); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLumen.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLumen.php new file mode 100644 index 000000000..4a381ccd4 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/ImageServiceProviderLumen.php @@ -0,0 +1,34 @@ +app; + + // merge default config + $this->mergeConfigFrom( + __DIR__.'/../../config/config.php', + 'image' + ); + + // set configuration + $app->configure('image'); + + // create image + $app->singleton('image',function ($app) { + return new ImageManager($app['config']->get('image')); + }); + + $app->alias('image', 'Intervention\Image\ImageManager'); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Color.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Color.php new file mode 100644 index 000000000..a41ff3a6e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Color.php @@ -0,0 +1,279 @@ +> 24) & 0xFF; + $r = ($value >> 16) & 0xFF; + $g = ($value >> 8) & 0xFF; + $b = $value & 0xFF; + $a = $this->rgb2alpha($a); + + $this->setPixel($r, $g, $b, $a); + } + + /** + * Initiates color object from given array + * + * @param array $value + * @return \Intervention\Image\AbstractColor + */ + public function initFromArray($array) + { + $array = array_values($array); + + if (count($array) == 4) { + + // color array with alpha value + list($r, $g, $b, $a) = $array; + + } elseif (count($array) == 3) { + + // color array without alpha value + list($r, $g, $b) = $array; + $a = 1; + } + + $this->setPixel($r, $g, $b, $a); + } + + /** + * Initiates color object from given string + * + * @param string $value + * + * @return \Intervention\Image\AbstractColor + */ + public function initFromString($value) + { + if ($color = $this->rgbaFromString($value)) { + $this->setPixel($color[0], $color[1], $color[2], $color[3]); + } + } + + /** + * Initiates color object from given ImagickPixel object + * + * @param ImagickPixel $value + * + * @return \Intervention\Image\AbstractColor + */ + public function initFromObject($value) + { + if (is_a($value, '\ImagickPixel')) { + $this->pixel = $value; + } + } + + /** + * Initiates color object from given R, G and B values + * + * @param int $r + * @param int $g + * @param int $b + * + * @return \Intervention\Image\AbstractColor + */ + public function initFromRgb($r, $g, $b) + { + $this->setPixel($r, $g, $b); + } + + /** + * Initiates color object from given R, G, B and A values + * + * @param int $r + * @param int $g + * @param int $b + * @param float $a + * + * @return \Intervention\Image\AbstractColor + */ + public function initFromRgba($r, $g, $b, $a) + { + $this->setPixel($r, $g, $b, $a); + } + + /** + * Calculates integer value of current color instance + * + * @return int + */ + public function getInt() + { + $r = $this->getRedValue(); + $g = $this->getGreenValue(); + $b = $this->getBlueValue(); + $a = intval(round($this->getAlphaValue() * 255)); + + return intval(($a << 24) + ($r << 16) + ($g << 8) + $b); + } + + /** + * Calculates hexadecimal value of current color instance + * + * @param string $prefix + * + * @return string + */ + public function getHex($prefix = '') + { + return sprintf('%s%02x%02x%02x', $prefix, + $this->getRedValue(), + $this->getGreenValue(), + $this->getBlueValue() + ); + } + + /** + * Calculates RGB(A) in array format of current color instance + * + * @return array + */ + public function getArray() + { + return [ + $this->getRedValue(), + $this->getGreenValue(), + $this->getBlueValue(), + $this->getAlphaValue() + ]; + } + + /** + * Calculates RGBA in string format of current color instance + * + * @return string + */ + public function getRgba() + { + return sprintf('rgba(%d, %d, %d, %.2F)', + $this->getRedValue(), + $this->getGreenValue(), + $this->getBlueValue(), + $this->getAlphaValue() + ); + } + + /** + * Determines if current color is different from given color + * + * @param AbstractColor $color + * @param int $tolerance + * @return boolean + */ + public function differs(AbstractColor $color, $tolerance = 0) + { + $color_tolerance = round($tolerance * 2.55); + $alpha_tolerance = round($tolerance); + + $delta = [ + 'r' => abs($color->getRedValue() - $this->getRedValue()), + 'g' => abs($color->getGreenValue() - $this->getGreenValue()), + 'b' => abs($color->getBlueValue() - $this->getBlueValue()), + 'a' => abs($color->getAlphaValue() - $this->getAlphaValue()) + ]; + + return ( + $delta['r'] > $color_tolerance or + $delta['g'] > $color_tolerance or + $delta['b'] > $color_tolerance or + $delta['a'] > $alpha_tolerance + ); + } + + /** + * Returns RGB red value of current color + * + * @return int + */ + public function getRedValue() + { + return intval(round($this->pixel->getColorValue(\Imagick::COLOR_RED) * 255)); + } + + /** + * Returns RGB green value of current color + * + * @return int + */ + public function getGreenValue() + { + return intval(round($this->pixel->getColorValue(\Imagick::COLOR_GREEN) * 255)); + } + + /** + * Returns RGB blue value of current color + * + * @return int + */ + public function getBlueValue() + { + return intval(round($this->pixel->getColorValue(\Imagick::COLOR_BLUE) * 255)); + } + + /** + * Returns RGB alpha value of current color + * + * @return float + */ + public function getAlphaValue() + { + return round($this->pixel->getColorValue(\Imagick::COLOR_ALPHA), 2); + } + + /** + * Initiates ImagickPixel from given RGBA values + * + * @return \ImagickPixel + */ + private function setPixel($r, $g, $b, $a = null) + { + $a = is_null($a) ? 1 : $a; + + return $this->pixel = new \ImagickPixel( + sprintf('rgba(%d, %d, %d, %.2F)', $r, $g, $b, $a) + ); + } + + /** + * Returns current color as ImagickPixel + * + * @return \ImagickPixel + */ + public function getPixel() + { + return $this->pixel; + } + + /** + * Calculates RGA integer alpha value into float value + * + * @param int $value + * @return float + */ + private function rgb2alpha($value) + { + // (255 -> 1.0) / (0 -> 0.0) + return (float) round($value/255, 2); + } + +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BackupCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BackupCommand.php new file mode 100644 index 000000000..76b4f72bb --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BackupCommand.php @@ -0,0 +1,25 @@ +argument(0)->value(); + + // clone current image resource + $clone = clone $image; + $image->setBackup($clone->getCore(), $backupName); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BlurCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BlurCommand.php new file mode 100644 index 000000000..d2533e0ea --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BlurCommand.php @@ -0,0 +1,21 @@ +argument(0)->between(0, 100)->value(1); + + return $image->getCore()->blurImage(1 * $amount, 0.5 * $amount); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BrightnessCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BrightnessCommand.php new file mode 100644 index 000000000..03ac8478d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BrightnessCommand.php @@ -0,0 +1,21 @@ +argument(0)->between(-100, 100)->required()->value(); + + return $image->getCore()->modulateImage(100 + $level, 100, 100); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ColorizeCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ColorizeCommand.php new file mode 100644 index 000000000..3a6506f6d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ColorizeCommand.php @@ -0,0 +1,44 @@ +argument(0)->between(-100, 100)->required()->value(); + $green = $this->argument(1)->between(-100, 100)->required()->value(); + $blue = $this->argument(2)->between(-100, 100)->required()->value(); + + // normalize colorize levels + $red = $this->normalizeLevel($red); + $green = $this->normalizeLevel($green); + $blue = $this->normalizeLevel($blue); + + $qrange = $image->getCore()->getQuantumRange(); + + // apply + $image->getCore()->levelImage(0, $red, $qrange['quantumRangeLong'], \Imagick::CHANNEL_RED); + $image->getCore()->levelImage(0, $green, $qrange['quantumRangeLong'], \Imagick::CHANNEL_GREEN); + $image->getCore()->levelImage(0, $blue, $qrange['quantumRangeLong'], \Imagick::CHANNEL_BLUE); + + return true; + } + + private function normalizeLevel($level) + { + if ($level > 0) { + return $level/5; + } else { + return ($level+100)/100; + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ContrastCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ContrastCommand.php new file mode 100644 index 000000000..c4847c61d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ContrastCommand.php @@ -0,0 +1,21 @@ +argument(0)->between(-100, 100)->required()->value(); + + return $image->getCore()->sigmoidalContrastImage($level > 0, $level / 4, 0); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/CropCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/CropCommand.php new file mode 100644 index 000000000..618edea7d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/CropCommand.php @@ -0,0 +1,45 @@ +argument(0)->type('digit')->required()->value(); + $height = $this->argument(1)->type('digit')->required()->value(); + $x = $this->argument(2)->type('digit')->value(); + $y = $this->argument(3)->type('digit')->value(); + + if (is_null($width) || is_null($height)) { + throw new InvalidArgumentException( + "Width and height of cutout needs to be defined." + ); + } + + $cropped = new Size($width, $height); + $position = new Point($x, $y); + + // align boxes + if (is_null($x) && is_null($y)) { + $position = $image->getSize()->align('center')->relativePosition($cropped->align('center')); + } + + // crop image core + $image->getCore()->cropImage($cropped->width, $cropped->height, $position->x, $position->y); + $image->getCore()->setImagePage(0,0,0,0); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/DestroyCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/DestroyCommand.php new file mode 100644 index 000000000..58c9556e4 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/DestroyCommand.php @@ -0,0 +1,27 @@ +getCore()->clear(); + + // destroy backups + foreach ($image->getBackups() as $backup) { + $backup->clear(); + } + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ExifCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ExifCommand.php new file mode 100644 index 000000000..521b38b09 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ExifCommand.php @@ -0,0 +1,63 @@ +preferExtension = false; + } + + /** + * Read Exif data from the given image + * + * @param \Intervention\Image\Image $image + * @return boolean + */ + public function execute($image) + { + if ($this->preferExtension && function_exists('exif_read_data')) { + return parent::execute($image); + } + + $core = $image->getCore(); + + if ( ! method_exists($core, 'getImageProperties')) { + throw new NotSupportedException( + "Reading Exif data is not supported by this PHP installation." + ); + } + + $requestedKey = $this->argument(0)->value(); + if ($requestedKey !== null) { + $this->setOutput($core->getImageProperty('exif:' . $requestedKey)); + return true; + } + + $exif = []; + $properties = $core->getImageProperties(); + foreach ($properties as $key => $value) { + if (substr($key, 0, 5) !== 'exif:') { + continue; + } + + $exif[substr($key, 5)] = $value; + } + + $this->setOutput($exif); + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FillCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FillCommand.php new file mode 100644 index 000000000..82baac532 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FillCommand.php @@ -0,0 +1,105 @@ +argument(0)->value(); + $x = $this->argument(1)->type('digit')->value(); + $y = $this->argument(2)->type('digit')->value(); + + $imagick = $image->getCore(); + + try { + // set image filling + $source = new Decoder; + $filling = $source->init($filling); + + } catch (NotReadableException $e) { + + // set solid color filling + $filling = new Color($filling); + } + + // flood fill if coordinates are set + if (is_int($x) && is_int($y)) { + + // flood fill with texture + if ($filling instanceof Image) { + + // create tile + $tile = clone $image->getCore(); + + // mask away color at position + $tile->transparentPaintImage($tile->getImagePixelColor($x, $y), 0, 0, false); + + // create canvas + $canvas = clone $image->getCore(); + + // fill canvas with texture + $canvas = $canvas->textureImage($filling->getCore()); + + // merge canvas and tile + $canvas->compositeImage($tile, \Imagick::COMPOSITE_DEFAULT, 0, 0); + + // replace image core + $image->setCore($canvas); + + // flood fill with color + } elseif ($filling instanceof Color) { + + // create canvas with filling + $canvas = new \Imagick; + $canvas->newImage($image->getWidth(), $image->getHeight(), $filling->getPixel(), 'png'); + + // create tile to put on top + $tile = clone $image->getCore(); + + // mask away color at pos. + $tile->transparentPaintImage($tile->getImagePixelColor($x, $y), 0, 0, false); + + // save alpha channel of original image + $alpha = clone $image->getCore(); + + // merge original with canvas and tile + $image->getCore()->compositeImage($canvas, \Imagick::COMPOSITE_DEFAULT, 0, 0); + $image->getCore()->compositeImage($tile, \Imagick::COMPOSITE_DEFAULT, 0, 0); + + // restore alpha channel of original image + $image->getCore()->compositeImage($alpha, \Imagick::COMPOSITE_COPYOPACITY, 0, 0); + } + + } else { + + if ($filling instanceof Image) { + + // fill whole image with texture + $image->setCore($image->getCore()->textureImage($filling->getCore())); + + } elseif ($filling instanceof Color) { + + // fill whole image with color + $draw = new \ImagickDraw(); + $draw->setFillColor($filling->getPixel()); + $draw->rectangle(0, 0, $image->getWidth(), $image->getHeight()); + $image->getCore()->drawImage($draw); + } + } + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FitCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FitCommand.php new file mode 100644 index 000000000..6d62ba677 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FitCommand.php @@ -0,0 +1,42 @@ +argument(0)->type('digit')->required()->value(); + $height = $this->argument(1)->type('digit')->value($width); + $constraints = $this->argument(2)->type('closure')->value(); + $position = $this->argument(3)->type('string')->value('center'); + + // calculate size + $cropped = $image->getSize()->fit(new Size($width, $height), $position); + $resized = clone $cropped; + $resized = $resized->resize($width, $height, $constraints); + + // crop image + $image->getCore()->cropImage( + $cropped->width, + $cropped->height, + $cropped->pivot->x, + $cropped->pivot->y + ); + + // resize image + $image->getCore()->scaleImage($resized->getWidth(), $resized->getHeight()); + $image->getCore()->setImagePage(0,0,0,0); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FlipCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FlipCommand.php new file mode 100644 index 000000000..abae16ad1 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FlipCommand.php @@ -0,0 +1,27 @@ +argument(0)->value('h'); + + if (in_array(strtolower($mode), [2, 'v', 'vert', 'vertical'])) { + // flip vertical + return $image->getCore()->flipImage(); + } else { + // flip horizontal + return $image->getCore()->flopImage(); + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GammaCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GammaCommand.php new file mode 100644 index 000000000..200515f3b --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GammaCommand.php @@ -0,0 +1,21 @@ +argument(0)->type('numeric')->required()->value(); + + return $image->getCore()->gammaImage($gamma); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GetSizeCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GetSizeCommand.php new file mode 100644 index 000000000..ccccedb03 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GetSizeCommand.php @@ -0,0 +1,28 @@ +getCore(); + + $this->setOutput(new Size( + $core->getImageWidth(), + $core->getImageHeight() + )); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GreyscaleCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GreyscaleCommand.php new file mode 100644 index 000000000..df0ff5b57 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GreyscaleCommand.php @@ -0,0 +1,19 @@ +getCore()->modulateImage(100, 0, 100); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/HeightenCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/HeightenCommand.php new file mode 100644 index 000000000..0b61e50c1 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/HeightenCommand.php @@ -0,0 +1,28 @@ +argument(0)->type('digit')->required()->value(); + $additionalConstraints = $this->argument(1)->type('closure')->value(); + + $this->arguments[0] = null; + $this->arguments[1] = $height; + $this->arguments[2] = function ($constraint) use ($additionalConstraints) { + $constraint->aspectRatio(); + if(is_callable($additionalConstraints)) + $additionalConstraints($constraint); + }; + + return parent::execute($image); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InsertCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InsertCommand.php new file mode 100644 index 000000000..2a9974367 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InsertCommand.php @@ -0,0 +1,33 @@ +argument(0)->required()->value(); + $position = $this->argument(1)->type('string')->value(); + $x = $this->argument(2)->type('digit')->value(0); + $y = $this->argument(3)->type('digit')->value(0); + + // build watermark + $watermark = $image->getDriver()->init($source); + + // define insertion point + $image_size = $image->getSize()->align($position, $x, $y); + $watermark_size = $watermark->getSize()->align($position); + $target = $image_size->relativePosition($watermark_size); + + // insert image at position + return $image->getCore()->compositeImage($watermark->getCore(), \Imagick::COMPOSITE_DEFAULT, $target->x, $target->y); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InterlaceCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InterlaceCommand.php new file mode 100644 index 000000000..913cab7e0 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InterlaceCommand.php @@ -0,0 +1,29 @@ +argument(0)->type('bool')->value(true); + + if ($mode) { + $mode = \Imagick::INTERLACE_LINE; + } else { + $mode = \Imagick::INTERLACE_NO; + } + + $image->getCore()->setInterlaceScheme($mode); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InvertCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InvertCommand.php new file mode 100644 index 000000000..1d134301b --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/InvertCommand.php @@ -0,0 +1,19 @@ +getCore()->negateImage(false); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/LimitColorsCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/LimitColorsCommand.php new file mode 100644 index 000000000..16f9b82e9 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/LimitColorsCommand.php @@ -0,0 +1,59 @@ +argument(0)->value(); + $matte = $this->argument(1)->value(); + + // get current image size + $size = $image->getSize(); + + // build 2 color alpha mask from original alpha + $alpha = clone $image->getCore(); + $alpha->separateImageChannel(\Imagick::CHANNEL_ALPHA); + $alpha->transparentPaintImage('#ffffff', 0, 0, false); + $alpha->separateImageChannel(\Imagick::CHANNEL_ALPHA); + $alpha->negateImage(false); + + if ($matte) { + + // get matte color + $mattecolor = $image->getDriver()->parseColor($matte)->getPixel(); + + // create matte image + $canvas = new \Imagick; + $canvas->newImage($size->width, $size->height, $mattecolor, 'png'); + + // lower colors of original and copy to matte + $image->getCore()->quantizeImage($count, \Imagick::COLORSPACE_RGB, 0, false, false); + $canvas->compositeImage($image->getCore(), \Imagick::COMPOSITE_DEFAULT, 0, 0); + + // copy new alpha to canvas + $canvas->compositeImage($alpha, \Imagick::COMPOSITE_COPYOPACITY, 0, 0); + + // replace core + $image->setCore($canvas); + + } else { + + $image->getCore()->quantizeImage($count, \Imagick::COLORSPACE_RGB, 0, false, false); + $image->getCore()->compositeImage($alpha, \Imagick::COMPOSITE_COPYOPACITY, 0, 0); + + } + + return true; + + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/MaskCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/MaskCommand.php new file mode 100644 index 000000000..af9d6b2f5 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/MaskCommand.php @@ -0,0 +1,60 @@ +argument(0)->value(); + $mask_w_alpha = $this->argument(1)->type('bool')->value(false); + + // get imagick + $imagick = $image->getCore(); + + // build mask image from source + $mask = $image->getDriver()->init($mask_source); + + // resize mask to size of current image (if necessary) + $image_size = $image->getSize(); + if ($mask->getSize() != $image_size) { + $mask->resize($image_size->width, $image_size->height); + } + + $imagick->setImageMatte(true); + + if ($mask_w_alpha) { + + // just mask with alpha map + $imagick->compositeImage($mask->getCore(), \Imagick::COMPOSITE_DSTIN, 0, 0); + + } else { + + // get alpha channel of original as greyscale image + $original_alpha = clone $imagick; + $original_alpha->separateImageChannel(\Imagick::CHANNEL_ALPHA); + + // use red channel from mask ask alpha + $mask_alpha = clone $mask->getCore(); + $mask_alpha->compositeImage($mask->getCore(), \Imagick::COMPOSITE_DEFAULT, 0, 0); + // $mask_alpha->setImageAlphaChannel(\Imagick::ALPHACHANNEL_DEACTIVATE); + $mask_alpha->separateImageChannel(\Imagick::CHANNEL_ALL); + + // combine both alphas from original and mask + $original_alpha->compositeImage($mask_alpha, \Imagick::COMPOSITE_COPYOPACITY, 0, 0); + + // mask the image with the alpha combination + $imagick->compositeImage($original_alpha, \Imagick::COMPOSITE_DSTIN, 0, 0); + } + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/OpacityCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/OpacityCommand.php new file mode 100644 index 000000000..b4708d899 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/OpacityCommand.php @@ -0,0 +1,23 @@ +argument(0)->between(0, 100)->required()->value(); + + $transparency = $transparency > 0 ? (100 / $transparency) : 1000; + + return $image->getCore()->evaluateImage(\Imagick::EVALUATE_DIVIDE, $transparency, \Imagick::CHANNEL_ALPHA); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PickColorCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PickColorCommand.php new file mode 100644 index 000000000..978a1284e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PickColorCommand.php @@ -0,0 +1,30 @@ +argument(0)->type('digit')->required()->value(); + $y = $this->argument(1)->type('digit')->required()->value(); + $format = $this->argument(2)->type('string')->value('array'); + + // pick color + $color = new Color($image->getCore()->getImagePixelColor($x, $y)); + + // format to output + $this->setOutput($color->format($format)); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PixelCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PixelCommand.php new file mode 100644 index 000000000..6eb6ae715 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PixelCommand.php @@ -0,0 +1,31 @@ +argument(0)->required()->value(); + $color = new Color($color); + $x = $this->argument(1)->type('digit')->required()->value(); + $y = $this->argument(2)->type('digit')->required()->value(); + + // prepare pixel + $draw = new \ImagickDraw; + $draw->setFillColor($color->getPixel()); + $draw->point($x, $y); + + // apply pixel + return $image->getCore()->drawImage($draw); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PixelateCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PixelateCommand.php new file mode 100644 index 000000000..6fe794913 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PixelateCommand.php @@ -0,0 +1,27 @@ +argument(0)->type('digit')->value(10); + + $width = $image->getWidth(); + $height = $image->getHeight(); + + $image->getCore()->scaleImage(max(1, ($width / $size)), max(1, ($height / $size))); + $image->getCore()->scaleImage($width, $height); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResetCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResetCommand.php new file mode 100644 index 000000000..77b7f3366 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResetCommand.php @@ -0,0 +1,40 @@ +argument(0)->value(); + + $backup = $image->getBackup($backupName); + + if ($backup instanceof \Imagick) { + + // destroy current core + $image->getCore()->clear(); + + // clone backup + $backup = clone $backup; + + // reset to new resource + $image->setCore($backup); + + return true; + } + + throw new RuntimeException( + "Backup not available. Call backup({$backupName}) before reset()." + ); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResizeCanvasCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResizeCanvasCommand.php new file mode 100644 index 000000000..ecf076106 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResizeCanvasCommand.php @@ -0,0 +1,91 @@ +argument(0)->type('digit')->required()->value(); + $height = $this->argument(1)->type('digit')->required()->value(); + $anchor = $this->argument(2)->value('center'); + $relative = $this->argument(3)->type('boolean')->value(false); + $bgcolor = $this->argument(4)->value(); + + $original_width = $image->getWidth(); + $original_height = $image->getHeight(); + + // check of only width or height is set + $width = is_null($width) ? $original_width : intval($width); + $height = is_null($height) ? $original_height : intval($height); + + // check on relative width/height + if ($relative) { + $width = $original_width + $width; + $height = $original_height + $height; + } + + // check for negative width/height + $width = ($width <= 0) ? $width + $original_width : $width; + $height = ($height <= 0) ? $height + $original_height : $height; + + // create new canvas + $canvas = $image->getDriver()->newImage($width, $height, $bgcolor); + + // set copy position + $canvas_size = $canvas->getSize()->align($anchor); + $image_size = $image->getSize()->align($anchor); + $canvas_pos = $image_size->relativePosition($canvas_size); + $image_pos = $canvas_size->relativePosition($image_size); + + if ($width <= $original_width) { + $dst_x = 0; + $src_x = $canvas_pos->x; + $src_w = $canvas_size->width; + } else { + $dst_x = $image_pos->x; + $src_x = 0; + $src_w = $original_width; + } + + if ($height <= $original_height) { + $dst_y = 0; + $src_y = $canvas_pos->y; + $src_h = $canvas_size->height; + } else { + $dst_y = $image_pos->y; + $src_y = 0; + $src_h = $original_height; + } + + // make image area transparent to keep transparency + // even if background-color is set + $rect = new \ImagickDraw; + $fill = $canvas->pickColor(0, 0, 'hex'); + $fill = $fill == '#ff0000' ? '#00ff00' : '#ff0000'; + $rect->setFillColor($fill); + $rect->rectangle($dst_x, $dst_y, $dst_x + $src_w - 1, $dst_y + $src_h - 1); + $canvas->getCore()->drawImage($rect); + $canvas->getCore()->transparentPaintImage($fill, 0, 0, false); + + $canvas->getCore()->setImageColorspace($image->getCore()->getImageColorspace()); + + // copy image into new canvas + $image->getCore()->cropImage($src_w, $src_h, $src_x, $src_y); + $canvas->getCore()->compositeImage($image->getCore(), \Imagick::COMPOSITE_DEFAULT, $dst_x, $dst_y); + $canvas->getCore()->setImagePage(0,0,0,0); + + // set new core to canvas + $image->setCore($canvas->getCore()); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResizeCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResizeCommand.php new file mode 100644 index 000000000..3d4dc5bed --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ResizeCommand.php @@ -0,0 +1,29 @@ +argument(0)->value(); + $height = $this->argument(1)->value(); + $constraints = $this->argument(2)->type('closure')->value(); + + // resize box + $resized = $image->getSize()->resize($width, $height, $constraints); + + // modify image + $image->getCore()->scaleImage($resized->getWidth(), $resized->getHeight()); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/RotateCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/RotateCommand.php new file mode 100644 index 000000000..edaef0d3f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/RotateCommand.php @@ -0,0 +1,30 @@ +argument(0)->type('numeric')->required()->value(); + $color = $this->argument(1)->value(); + $color = new Color($color); + + // restrict rotations beyond 360 degrees, since the end result is the same + $angle %= 360; + + // rotate image + $image->getCore()->rotateImage($color->getPixel(), ($angle * -1)); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/SharpenCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/SharpenCommand.php new file mode 100644 index 000000000..bc5e393f2 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/SharpenCommand.php @@ -0,0 +1,21 @@ +argument(0)->between(0, 100)->value(10); + + return $image->getCore()->unsharpMaskImage(1, 1, $amount / 6.25, 0); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/TrimCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/TrimCommand.php new file mode 100644 index 000000000..bdc897be7 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/TrimCommand.php @@ -0,0 +1,121 @@ +argument(0)->type('string')->value(); + $away = $this->argument(1)->value(); + $tolerance = $this->argument(2)->type('numeric')->value(0); + $feather = $this->argument(3)->type('numeric')->value(0); + + $width = $image->getWidth(); + $height = $image->getHeight(); + + $checkTransparency = false; + + // define borders to trim away + if (is_null($away)) { + $away = ['top', 'right', 'bottom', 'left']; + } elseif (is_string($away)) { + $away = [$away]; + } + + // lower border names + foreach ($away as $key => $value) { + $away[$key] = strtolower($value); + } + + // define base color position + switch (strtolower($base)) { + case 'transparent': + case 'trans': + $checkTransparency = true; + $base_x = 0; + $base_y = 0; + break; + + case 'bottom-right': + case 'right-bottom': + $base_x = $width - 1; + $base_y = $height - 1; + break; + + default: + case 'top-left': + case 'left-top': + $base_x = 0; + $base_y = 0; + break; + } + + // pick base color + if ($checkTransparency) { + $base_color = new Color; // color will only be used to compare alpha channel + } else { + $base_color = $image->pickColor($base_x, $base_y, 'object'); + } + + // trim on clone to get only coordinates + $trimed = clone $image->getCore(); + + // add border to trim specific color + $trimed->borderImage($base_color->getPixel(), 1, 1); + + // trim image + $trimed->trimImage(65850 / 100 * $tolerance); + + // get coordinates of trim + $imagePage = $trimed->getImagePage(); + list($crop_x, $crop_y) = [$imagePage['x']-1, $imagePage['y']-1]; + // $trimed->setImagePage(0, 0, 0, 0); + list($crop_width, $crop_height) = [$trimed->width, $trimed->height]; + + // adjust settings if right should not be trimed + if ( ! in_array('right', $away)) { + $crop_width = $crop_width + ($width - ($width - $crop_x)); + } + + // adjust settings if bottom should not be trimed + if ( ! in_array('bottom', $away)) { + $crop_height = $crop_height + ($height - ($height - $crop_y)); + } + + // adjust settings if left should not be trimed + if ( ! in_array('left', $away)) { + $crop_width = $crop_width + $crop_x; + $crop_x = 0; + } + + // adjust settings if top should not be trimed + if ( ! in_array('top', $away)) { + $crop_height = $crop_height + $crop_y; + $crop_y = 0; + } + + // add feather + $crop_width = min($width, ($crop_width + $feather * 2)); + $crop_height = min($height, ($crop_height + $feather * 2)); + $crop_x = max(0, ($crop_x - $feather)); + $crop_y = max(0, ($crop_y - $feather)); + + // finally crop based on page + $image->getCore()->cropImage($crop_width, $crop_height, $crop_x, $crop_y); + $image->getCore()->setImagePage(0,0,0,0); + + $trimed->destroy(); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/WidenCommand.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/WidenCommand.php new file mode 100644 index 000000000..a1967534c --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/WidenCommand.php @@ -0,0 +1,28 @@ +argument(0)->type('digit')->required()->value(); + $additionalConstraints = $this->argument(1)->type('closure')->value(); + + $this->arguments[0] = $width; + $this->arguments[1] = null; + $this->arguments[2] = function ($constraint) use ($additionalConstraints) { + $constraint->aspectRatio(); + if(is_callable($additionalConstraints)) + $additionalConstraints($constraint); + }; + + return parent::execute($image); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Decoder.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Decoder.php new file mode 100644 index 000000000..f4dde9a84 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Decoder.php @@ -0,0 +1,124 @@ +setBackgroundColor(new \ImagickPixel('transparent')); + $core->readImage($path); + $core->setImageType(defined('\Imagick::IMGTYPE_TRUECOLORALPHA') ? \Imagick::IMGTYPE_TRUECOLORALPHA : \Imagick::IMGTYPE_TRUECOLORMATTE); + + } catch (\ImagickException $e) { + throw new \Intervention\Image\Exception\NotReadableException( + "Unable to read image from path ({$path}).", + 0, + $e + ); + } + + // build image + $image = $this->initFromImagick($core); + $image->setFileInfoFromPath($path); + + return $image; + } + + /** + * Initiates new image from GD resource + * + * @param Resource $resource + * @return \Intervention\Image\Image + */ + public function initFromGdResource($resource) + { + throw new NotSupportedException( + 'Imagick driver is unable to init from GD resource.' + ); + } + + /** + * Initiates new image from Imagick object + * + * @param Imagick $object + * @return \Intervention\Image\Image + */ + public function initFromImagick(\Imagick $object) + { + // currently animations are not supported + // so all images are turned into static + $object = $this->removeAnimation($object); + + // reset image orientation + $object->setImageOrientation(\Imagick::ORIENTATION_UNDEFINED); + + return new Image(new Driver, $object); + } + + /** + * Initiates new image from binary data + * + * @param string $data + * @return \Intervention\Image\Image + */ + public function initFromBinary($binary) + { + $core = new \Imagick; + + try { + $core->setBackgroundColor(new \ImagickPixel('transparent')); + + $core->readImageBlob($binary); + + } catch (\ImagickException $e) { + throw new NotReadableException( + "Unable to read image from binary data.", + 0, + $e + ); + } + + // build image + $image = $this->initFromImagick($core); + $image->mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $binary); + + return $image; + } + + /** + * Turns object into one frame Imagick object + * by removing all frames except first + * + * @param Imagick $object + * @return Imagick + */ + private function removeAnimation(\Imagick $object) + { + $imagick = new \Imagick; + + foreach ($object as $frame) { + $imagick->addImage($frame->getImage()); + break; + } + + $object->destroy(); + + return $imagick; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Driver.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Driver.php new file mode 100644 index 000000000..bb26ca0fe --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Driver.php @@ -0,0 +1,74 @@ +coreAvailable()) { + throw new NotSupportedException( + "ImageMagick module not available with this PHP installation." + ); + } + + $this->decoder = $decoder ? $decoder : new Decoder; + $this->encoder = $encoder ? $encoder : new Encoder; + } + + /** + * Creates new image instance + * + * @param int $width + * @param int $height + * @param mixed $background + * @return \Intervention\Image\Image + */ + public function newImage($width, $height, $background = null) + { + $background = new Color($background); + + // create empty core + $core = new \Imagick; + $core->newImage($width, $height, $background->getPixel(), 'png'); + $core->setType(\Imagick::IMGTYPE_UNDEFINED); + $core->setImageType(\Imagick::IMGTYPE_UNDEFINED); + $core->setColorspace(\Imagick::COLORSPACE_UNDEFINED); + + // build image + $image = new Image(new static, $core); + + return $image; + } + + /** + * Reads given string into color object + * + * @param string $value + * @return AbstractColor + */ + public function parseColor($value) + { + return new Color($value); + } + + /** + * Checks if core module installation is available + * + * @return boolean + */ + protected function coreAvailable() + { + return (extension_loaded('imagick') && class_exists('Imagick')); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Encoder.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Encoder.php new file mode 100644 index 000000000..ac7345e4a --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Encoder.php @@ -0,0 +1,173 @@ +image->getCore(); + $imagick->setImageBackgroundColor('white'); + $imagick->setBackgroundColor('white'); + $imagick = $imagick->mergeImageLayers(\Imagick::LAYERMETHOD_MERGE); + $imagick->setFormat($format); + $imagick->setImageFormat($format); + $imagick->setCompression($compression); + $imagick->setImageCompression($compression); + $imagick->setCompressionQuality($this->quality); + $imagick->setImageCompressionQuality($this->quality); + + return $imagick->getImagesBlob(); + } + + /** + * Processes and returns encoded image as PNG string + * + * @return string + */ + protected function processPng() + { + $format = 'png'; + $compression = \Imagick::COMPRESSION_ZIP; + + $imagick = $this->image->getCore(); + $imagick->setFormat($format); + $imagick->setImageFormat($format); + $imagick->setCompression($compression); + $imagick->setImageCompression($compression); + + return $imagick->getImagesBlob(); + } + + /** + * Processes and returns encoded image as GIF string + * + * @return string + */ + protected function processGif() + { + $format = 'gif'; + $compression = \Imagick::COMPRESSION_LZW; + + $imagick = $this->image->getCore(); + $imagick->setFormat($format); + $imagick->setImageFormat($format); + $imagick->setCompression($compression); + $imagick->setImageCompression($compression); + + return $imagick->getImagesBlob(); + } + + protected function processWebp() + { + if ( ! \Imagick::queryFormats('WEBP')) { + throw new NotSupportedException( + "Webp format is not supported by Imagick installation." + ); + } + + $format = 'webp'; + $compression = \Imagick::COMPRESSION_JPEG; + + $imagick = $this->image->getCore(); + $imagick->setImageBackgroundColor(new \ImagickPixel('transparent')); + + $imagick = $imagick->mergeImageLayers(\Imagick::LAYERMETHOD_MERGE); + $imagick->setFormat($format); + $imagick->setImageFormat($format); + $imagick->setCompression($compression); + $imagick->setImageCompression($compression); + $imagick->setImageCompressionQuality($this->quality); + + return $imagick->getImagesBlob(); + } + + /** + * Processes and returns encoded image as TIFF string + * + * @return string + */ + protected function processTiff() + { + $format = 'tiff'; + $compression = \Imagick::COMPRESSION_UNDEFINED; + + $imagick = $this->image->getCore(); + $imagick->setFormat($format); + $imagick->setImageFormat($format); + $imagick->setCompression($compression); + $imagick->setImageCompression($compression); + $imagick->setCompressionQuality($this->quality); + $imagick->setImageCompressionQuality($this->quality); + + return $imagick->getImagesBlob(); + } + + /** + * Processes and returns encoded image as BMP string + * + * @return string + */ + protected function processBmp() + { + $format = 'bmp'; + $compression = \Imagick::COMPRESSION_UNDEFINED; + + $imagick = $this->image->getCore(); + $imagick->setFormat($format); + $imagick->setImageFormat($format); + $imagick->setCompression($compression); + $imagick->setImageCompression($compression); + + return $imagick->getImagesBlob(); + } + + /** + * Processes and returns encoded image as ICO string + * + * @return string + */ + protected function processIco() + { + $format = 'ico'; + $compression = \Imagick::COMPRESSION_UNDEFINED; + + $imagick = $this->image->getCore(); + $imagick->setFormat($format); + $imagick->setImageFormat($format); + $imagick->setCompression($compression); + $imagick->setImageCompression($compression); + + return $imagick->getImagesBlob(); + } + + /** + * Processes and returns encoded image as PSD string + * + * @return string + */ + protected function processPsd() + { + $format = 'psd'; + $compression = \Imagick::COMPRESSION_UNDEFINED; + + $imagick = $this->image->getCore(); + $imagick->setFormat($format); + $imagick->setImageFormat($format); + $imagick->setCompression($compression); + $imagick->setImageCompression($compression); + + return $imagick->getImagesBlob(); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Font.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Font.php new file mode 100644 index 000000000..0c5002a47 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Font.php @@ -0,0 +1,121 @@ +setStrokeAntialias(true); + $draw->setTextAntialias(true); + + // set font file + if ($this->hasApplicableFontFile()) { + $draw->setFont($this->file); + } else { + throw new RuntimeException( + "Font file must be provided to apply text to image." + ); + } + + // parse text color + $color = new Color($this->color); + + $draw->setFontSize($this->size); + $draw->setFillColor($color->getPixel()); + + // align horizontal + switch (strtolower($this->align)) { + case 'center': + $align = \Imagick::ALIGN_CENTER; + break; + + case 'right': + $align = \Imagick::ALIGN_RIGHT; + break; + + default: + $align = \Imagick::ALIGN_LEFT; + break; + } + + $draw->setTextAlignment($align); + + // align vertical + if (strtolower($this->valign) != 'bottom') { + + // corrections on y-position + switch (strtolower($this->valign)) { + case 'center': + case 'middle': + // calculate box size + $dimensions = $image->getCore()->queryFontMetrics($draw, $this->text); + $posy = $posy + $dimensions['textHeight'] * 0.65 / 2; + break; + + case 'top': + // calculate box size + $dimensions = $image->getCore()->queryFontMetrics($draw, $this->text, false); + $posy = $posy + $dimensions['textHeight'] * 0.65; + break; + } + } + + // apply to image + $image->getCore()->annotateImage($draw, $posx, $posy, $this->angle * (-1), $this->text); + } + + /** + * Calculates bounding box of current font setting + * + * @return array + */ + public function getBoxSize() + { + $box = []; + + // build draw object + $draw = new \ImagickDraw(); + $draw->setStrokeAntialias(true); + $draw->setTextAntialias(true); + + // set font file + if ($this->hasApplicableFontFile()) { + $draw->setFont($this->file); + } else { + throw new RuntimeException( + "Font file must be provided to apply text to image." + ); + } + + $draw->setFontSize($this->size); + + $dimensions = (new \Imagick())->queryFontMetrics($draw, $this->text); + + if (strlen($this->text) == 0) { + // no text -> no boxsize + $box['width'] = 0; + $box['height'] = 0; + } else { + // get boxsize + $box['width'] = intval(abs($dimensions['textWidth'])); + $box['height'] = intval(abs($dimensions['textHeight'])); + } + + return $box; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/CircleShape.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/CircleShape.php new file mode 100644 index 000000000..24172ea11 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/CircleShape.php @@ -0,0 +1,40 @@ +width = is_numeric($diameter) ? intval($diameter) : $this->diameter; + $this->height = is_numeric($diameter) ? intval($diameter) : $this->diameter; + $this->diameter = is_numeric($diameter) ? intval($diameter) : $this->diameter; + } + + /** + * Draw current circle on given image + * + * @param Image $image + * @param int $x + * @param int $y + * @return boolean + */ + public function applyToImage(Image $image, $x = 0, $y = 0) + { + return parent::applyToImage($image, $x, $y); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/EllipseShape.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/EllipseShape.php new file mode 100644 index 000000000..99694b97b --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/EllipseShape.php @@ -0,0 +1,66 @@ +width = is_numeric($width) ? intval($width) : $this->width; + $this->height = is_numeric($height) ? intval($height) : $this->height; + } + + /** + * Draw ellipse instance on given image + * + * @param Image $image + * @param int $x + * @param int $y + * @return boolean + */ + public function applyToImage(Image $image, $x = 0, $y = 0) + { + $circle = new \ImagickDraw; + + // set background + $bgcolor = new Color($this->background); + $circle->setFillColor($bgcolor->getPixel()); + + // set border + if ($this->hasBorder()) { + $border_color = new Color($this->border_color); + $circle->setStrokeWidth($this->border_width); + $circle->setStrokeColor($border_color->getPixel()); + } + + $circle->ellipse($x, $y, $this->width / 2, $this->height / 2, 0, 360); + + $image->getCore()->drawImage($circle); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/LineShape.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/LineShape.php new file mode 100644 index 000000000..0d6b3297d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/LineShape.php @@ -0,0 +1,94 @@ +x = is_numeric($x) ? intval($x) : $this->x; + $this->y = is_numeric($y) ? intval($y) : $this->y; + } + + /** + * Set current line color + * + * @param string $color + * @return void + */ + public function color($color) + { + $this->color = $color; + } + + /** + * Set current line width in pixels + * + * @param int $width + * @return void + */ + public function width($width) + { + $this->width = $width; + } + + /** + * Draw current instance of line to given endpoint on given image + * + * @param Image $image + * @param int $x + * @param int $y + * @return boolean + */ + public function applyToImage(Image $image, $x = 0, $y = 0) + { + $line = new \ImagickDraw; + + $color = new Color($this->color); + $line->setStrokeColor($color->getPixel()); + $line->setStrokeWidth($this->width); + + $line->line($this->x, $this->y, $x, $y); + $image->getCore()->drawImage($line); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/PolygonShape.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/PolygonShape.php new file mode 100644 index 000000000..45f44ad88 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/PolygonShape.php @@ -0,0 +1,81 @@ +points = $this->formatPoints($points); + } + + /** + * Draw polygon on given image + * + * @param Image $image + * @param int $x + * @param int $y + * @return boolean + */ + public function applyToImage(Image $image, $x = 0, $y = 0) + { + $polygon = new \ImagickDraw; + + // set background + $bgcolor = new Color($this->background); + $polygon->setFillColor($bgcolor->getPixel()); + + // set border + if ($this->hasBorder()) { + $border_color = new Color($this->border_color); + $polygon->setStrokeWidth($this->border_width); + $polygon->setStrokeColor($border_color->getPixel()); + } + + $polygon->polygon($this->points); + + $image->getCore()->drawImage($polygon); + + return true; + } + + /** + * Format polygon points to Imagick format + * + * @param Array $points + * @return Array + */ + private function formatPoints($points) + { + $ipoints = []; + $count = 1; + + foreach ($points as $key => $value) { + if ($count%2 === 0) { + $y = $value; + $ipoints[] = ['x' => $x, 'y' => $y]; + } else { + $x = $value; + } + $count++; + } + + return $ipoints; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/RectangleShape.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/RectangleShape.php new file mode 100644 index 000000000..1166d77b7 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/RectangleShape.php @@ -0,0 +1,84 @@ +x1 = is_numeric($x1) ? intval($x1) : $this->x1; + $this->y1 = is_numeric($y1) ? intval($y1) : $this->y1; + $this->x2 = is_numeric($x2) ? intval($x2) : $this->x2; + $this->y2 = is_numeric($y2) ? intval($y2) : $this->y2; + } + + /** + * Draw rectangle to given image at certain position + * + * @param Image $image + * @param int $x + * @param int $y + * @return boolean + */ + public function applyToImage(Image $image, $x = 0, $y = 0) + { + $rectangle = new \ImagickDraw; + + // set background + $bgcolor = new Color($this->background); + $rectangle->setFillColor($bgcolor->getPixel()); + + // set border + if ($this->hasBorder()) { + $border_color = new Color($this->border_color); + $rectangle->setStrokeWidth($this->border_width); + $rectangle->setStrokeColor($border_color->getPixel()); + } + + $rectangle->rectangle($this->x1, $this->y1, $this->x2, $this->y2); + + $image->getCore()->drawImage($rectangle); + + return true; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Point.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Point.php new file mode 100644 index 000000000..d51452e02 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Point.php @@ -0,0 +1,64 @@ +x = is_numeric($x) ? intval($x) : 0; + $this->y = is_numeric($y) ? intval($y) : 0; + } + + /** + * Sets X coordinate + * + * @param int $x + */ + public function setX($x) + { + $this->x = intval($x); + } + + /** + * Sets Y coordinate + * + * @param int $y + */ + public function setY($y) + { + $this->y = intval($y); + } + + /** + * Sets both X and Y coordinate + * + * @param int $x + * @param int $y + */ + public function setPosition($x, $y) + { + $this->setX($x); + $this->setY($y); + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Response.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Response.php new file mode 100644 index 000000000..8e7940811 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Response.php @@ -0,0 +1,78 @@ +image = $image; + $this->format = $format ? $format : $image->mime; + $this->quality = $quality ? $quality : 90; + } + + /** + * Builds response according to settings + * + * @return mixed + */ + public function make() + { + $this->image->encode($this->format, $this->quality); + $data = $this->image->getEncoded(); + $mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $data); + $length = strlen($data); + + if (function_exists('app') && is_a($app = app(), 'Illuminate\Foundation\Application')) { + + $response = IlluminateResponse::make($data); + $response->header('Content-Type', $mime); + $response->header('Content-Length', $length); + + } elseif (class_exists('\Symfony\Component\HttpFoundation\Response')) { + + $response = SymfonyResponse::create($data); + $response->headers->set('Content-Type', $mime); + $response->headers->set('Content-Length', $length); + + } else { + + header('Content-Type: ' . $mime); + header('Content-Length: ' . $length); + $response = $data; + } + + return $response; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Size.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Size.php new file mode 100644 index 000000000..46ae3135e --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/Intervention/Image/Size.php @@ -0,0 +1,374 @@ +width = is_numeric($width) ? intval($width) : 1; + $this->height = is_numeric($height) ? intval($height) : 1; + $this->pivot = $pivot ? $pivot : new Point; + } + + /** + * Set the width and height absolutely + * + * @param int $width + * @param int $height + */ + public function set($width, $height) + { + $this->width = $width; + $this->height = $height; + } + + /** + * Set current pivot point + * + * @param Point $point + */ + public function setPivot(Point $point) + { + $this->pivot = $point; + } + + /** + * Get the current width + * + * @return int + */ + public function getWidth() + { + return $this->width; + } + + /** + * Get the current height + * + * @return int + */ + public function getHeight() + { + return $this->height; + } + + /** + * Calculate the current aspect ratio + * + * @return float + */ + public function getRatio() + { + return $this->width / $this->height; + } + + /** + * Resize to desired width and/or height + * + * @param int $width + * @param int $height + * @param Closure $callback + * @return Size + */ + public function resize($width, $height, Closure $callback = null) + { + if (is_null($width) && is_null($height)) { + throw new InvalidArgumentException( + "Width or height needs to be defined." + ); + } + + // new size with dominant width + $dominant_w_size = clone $this; + $dominant_w_size->resizeHeight($height, $callback); + $dominant_w_size->resizeWidth($width, $callback); + + // new size with dominant height + $dominant_h_size = clone $this; + $dominant_h_size->resizeWidth($width, $callback); + $dominant_h_size->resizeHeight($height, $callback); + + // decide which size to use + if ($dominant_h_size->fitsInto(new self($width, $height))) { + $this->set($dominant_h_size->width, $dominant_h_size->height); + } else { + $this->set($dominant_w_size->width, $dominant_w_size->height); + } + + return $this; + } + + /** + * Scale size according to given constraints + * + * @param int $width + * @param Closure $callback + * @return Size + */ + private function resizeWidth($width, Closure $callback = null) + { + $constraint = $this->getConstraint($callback); + + if ($constraint->isFixed(Constraint::UPSIZE)) { + $max_width = $constraint->getSize()->getWidth(); + $max_height = $constraint->getSize()->getHeight(); + } + + if (is_numeric($width)) { + + if ($constraint->isFixed(Constraint::UPSIZE)) { + $this->width = ($width > $max_width) ? $max_width : $width; + } else { + $this->width = $width; + } + + if ($constraint->isFixed(Constraint::ASPECTRATIO)) { + $h = max(1, intval(round($this->width / $constraint->getSize()->getRatio()))); + + if ($constraint->isFixed(Constraint::UPSIZE)) { + $this->height = ($h > $max_height) ? $max_height : $h; + } else { + $this->height = $h; + } + } + } + } + + /** + * Scale size according to given constraints + * + * @param int $height + * @param Closure $callback + * @return Size + */ + private function resizeHeight($height, Closure $callback = null) + { + $constraint = $this->getConstraint($callback); + + if ($constraint->isFixed(Constraint::UPSIZE)) { + $max_width = $constraint->getSize()->getWidth(); + $max_height = $constraint->getSize()->getHeight(); + } + + if (is_numeric($height)) { + + if ($constraint->isFixed(Constraint::UPSIZE)) { + $this->height = ($height > $max_height) ? $max_height : $height; + } else { + $this->height = $height; + } + + if ($constraint->isFixed(Constraint::ASPECTRATIO)) { + $w = max(1, intval(round($this->height * $constraint->getSize()->getRatio()))); + + if ($constraint->isFixed(Constraint::UPSIZE)) { + $this->width = ($w > $max_width) ? $max_width : $w; + } else { + $this->width = $w; + } + } + } + } + + /** + * Calculate the relative position to another Size + * based on the pivot point settings of both sizes. + * + * @param Size $size + * @return \Intervention\Image\Point + */ + public function relativePosition(Size $size) + { + $x = $this->pivot->x - $size->pivot->x; + $y = $this->pivot->y - $size->pivot->y; + + return new Point($x, $y); + } + + /** + * Resize given Size to best fitting size of current size. + * + * @param Size $size + * @return \Intervention\Image\Size + */ + public function fit(Size $size, $position = 'center') + { + // create size with auto height + $auto_height = clone $size; + + $auto_height->resize($this->width, null, function ($constraint) { + $constraint->aspectRatio(); + }); + + // decide which version to use + if ($auto_height->fitsInto($this)) { + + $size = $auto_height; + + } else { + + // create size with auto width + $auto_width = clone $size; + + $auto_width->resize(null, $this->height, function ($constraint) { + $constraint->aspectRatio(); + }); + + $size = $auto_width; + } + + $this->align($position); + $size->align($position); + $size->setPivot($this->relativePosition($size)); + + return $size; + } + + /** + * Checks if given size fits into current size + * + * @param Size $size + * @return boolean + */ + public function fitsInto(Size $size) + { + return ($this->width <= $size->width) && ($this->height <= $size->height); + } + + /** + * Aligns current size's pivot point to given position + * and moves point automatically by offset. + * + * @param string $position + * @param int $offset_x + * @param int $offset_y + * @return \Intervention\Image\Size + */ + public function align($position, $offset_x = 0, $offset_y = 0) + { + switch (strtolower($position)) { + + case 'top': + case 'top-center': + case 'top-middle': + case 'center-top': + case 'middle-top': + $x = intval($this->width / 2); + $y = 0 + $offset_y; + break; + + case 'top-right': + case 'right-top': + $x = $this->width - $offset_x; + $y = 0 + $offset_y; + break; + + case 'left': + case 'left-center': + case 'left-middle': + case 'center-left': + case 'middle-left': + $x = 0 + $offset_x; + $y = intval($this->height / 2); + break; + + case 'right': + case 'right-center': + case 'right-middle': + case 'center-right': + case 'middle-right': + $x = $this->width - $offset_x; + $y = intval($this->height / 2); + break; + + case 'bottom-left': + case 'left-bottom': + $x = 0 + $offset_x; + $y = $this->height - $offset_y; + break; + + case 'bottom': + case 'bottom-center': + case 'bottom-middle': + case 'center-bottom': + case 'middle-bottom': + $x = intval($this->width / 2); + $y = $this->height - $offset_y; + break; + + case 'bottom-right': + case 'right-bottom': + $x = $this->width - $offset_x; + $y = $this->height - $offset_y; + break; + + case 'center': + case 'middle': + case 'center-center': + case 'middle-middle': + $x = intval($this->width / 2); + $y = intval($this->height / 2); + break; + + default: + case 'top-left': + case 'left-top': + $x = 0 + $offset_x; + $y = 0 + $offset_y; + break; + } + + $this->pivot->setPosition($x, $y); + + return $this; + } + + /** + * Runs constraints on current size + * + * @param Closure $callback + * @return \Intervention\Image\Constraint + */ + private function getConstraint(Closure $callback = null) + { + $constraint = new Constraint(clone $this); + + if (is_callable($callback)) { + $callback($constraint); + } + + return $constraint; + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/config/config.php b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/config/config.php new file mode 100644 index 000000000..2b1d2c3e1 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/intervention/image/src/config/config.php @@ -0,0 +1,20 @@ + 'gd' + +]; diff --git a/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/CHANGELOG.md b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/CHANGELOG.md new file mode 100644 index 000000000..74b1ef923 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/CHANGELOG.md @@ -0,0 +1,36 @@ +# Changelog + +All notable changes to this project will be documented in this file, in reverse chronological order by release. + +## 1.0.1 - 2016-08-06 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Updated all `@return self` annotation references in interfaces to use + `@return static`, which more closelly follows the semantics of the + specification. +- Updated the `MessageInterface::getHeaders()` return annotation to use the + value `string[][]`, indicating the format is a nested array of strings. +- Updated the `@link` annotation for `RequestInterface::withRequestTarget()` + to point to the correct section of RFC 7230. +- Updated the `ServerRequestInterface::withUploadedFiles()` parameter annotation + to add the parameter name (`$uploadedFiles`). +- Updated a `@throws` annotation for the `UploadedFileInterface::moveTo()` + method to correctly reference the method parameter (it was referencing an + incorrect parameter name previously). + +## 1.0.0 - 2016-05-18 + +Initial stable release; reflects accepted PSR-7 specification. diff --git a/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/LICENSE b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/LICENSE new file mode 100644 index 000000000..c2d8e452d --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 PHP Framework Interoperability Group + +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. diff --git a/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/README.md b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/README.md new file mode 100644 index 000000000..28185338f --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/README.md @@ -0,0 +1,13 @@ +PSR Http Message +================ + +This repository holds all interfaces/classes/traits related to +[PSR-7](http://www.php-fig.org/psr/psr-7/). + +Note that this is not a HTTP message implementation of its own. It is merely an +interface that describes a HTTP message. See the specification for more details. + +Usage +----- + +We'll certainly need some stuff in here. \ No newline at end of file diff --git a/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/composer.json b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/composer.json new file mode 100644 index 000000000..b0d2937a0 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/composer.json @@ -0,0 +1,26 @@ +{ + "name": "psr/http-message", + "description": "Common interface for HTTP messages", + "keywords": ["psr", "psr-7", "http", "http-message", "request", "response"], + "homepage": "https://github.com/php-fig/http-message", + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/MessageInterface.php b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/MessageInterface.php new file mode 100644 index 000000000..dd46e5ec8 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/MessageInterface.php @@ -0,0 +1,187 @@ +getHeaders() as $name => $values) { + * echo $name . ": " . implode(", ", $values); + * } + * + * // Emit headers iteratively: + * foreach ($message->getHeaders() as $name => $values) { + * foreach ($values as $value) { + * header(sprintf('%s: %s', $name, $value), false); + * } + * } + * + * While header names are not case-sensitive, getHeaders() will preserve the + * exact case in which headers were originally specified. + * + * @return string[][] Returns an associative array of the message's headers. Each + * key MUST be a header name, and each value MUST be an array of strings + * for that header. + */ + public function getHeaders(); + + /** + * Checks if a header exists by the given case-insensitive name. + * + * @param string $name Case-insensitive header field name. + * @return bool Returns true if any header names match the given header + * name using a case-insensitive string comparison. Returns false if + * no matching header name is found in the message. + */ + public function hasHeader($name); + + /** + * Retrieves a message header value by the given case-insensitive name. + * + * This method returns an array of all the header values of the given + * case-insensitive header name. + * + * If the header does not appear in the message, this method MUST return an + * empty array. + * + * @param string $name Case-insensitive header field name. + * @return string[] An array of string values as provided for the given + * header. If the header does not appear in the message, this method MUST + * return an empty array. + */ + public function getHeader($name); + + /** + * Retrieves a comma-separated string of the values for a single header. + * + * This method returns all of the header values of the given + * case-insensitive header name as a string concatenated together using + * a comma. + * + * NOTE: Not all header values may be appropriately represented using + * comma concatenation. For such headers, use getHeader() instead + * and supply your own delimiter when concatenating. + * + * If the header does not appear in the message, this method MUST return + * an empty string. + * + * @param string $name Case-insensitive header field name. + * @return string A string of values as provided for the given header + * concatenated together using a comma. If the header does not appear in + * the message, this method MUST return an empty string. + */ + public function getHeaderLine($name); + + /** + * Return an instance with the provided value replacing the specified header. + * + * While header names are case-insensitive, the casing of the header will + * be preserved by this function, and returned from getHeaders(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new and/or updated header and value. + * + * @param string $name Case-insensitive header field name. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withHeader($name, $value); + + /** + * Return an instance with the specified header appended with the given value. + * + * Existing values for the specified header will be maintained. The new + * value(s) will be appended to the existing list. If the header did not + * exist previously, it will be added. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new header and/or value. + * + * @param string $name Case-insensitive header field name to add. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withAddedHeader($name, $value); + + /** + * Return an instance without the specified header. + * + * Header resolution MUST be done without case-sensitivity. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the named header. + * + * @param string $name Case-insensitive header field name to remove. + * @return static + */ + public function withoutHeader($name); + + /** + * Gets the body of the message. + * + * @return StreamInterface Returns the body as a stream. + */ + public function getBody(); + + /** + * Return an instance with the specified message body. + * + * The body MUST be a StreamInterface object. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return a new instance that has the + * new body stream. + * + * @param StreamInterface $body Body. + * @return static + * @throws \InvalidArgumentException When the body is not valid. + */ + public function withBody(StreamInterface $body); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/RequestInterface.php b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/RequestInterface.php new file mode 100644 index 000000000..a96d4fd63 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/RequestInterface.php @@ -0,0 +1,129 @@ +getQuery()` + * or from the `QUERY_STRING` server param. + * + * @return array + */ + public function getQueryParams(); + + /** + * Return an instance with the specified query string arguments. + * + * These values SHOULD remain immutable over the course of the incoming + * request. They MAY be injected during instantiation, such as from PHP's + * $_GET superglobal, or MAY be derived from some other value such as the + * URI. In cases where the arguments are parsed from the URI, the data + * MUST be compatible with what PHP's parse_str() would return for + * purposes of how duplicate query parameters are handled, and how nested + * sets are handled. + * + * Setting query string arguments MUST NOT change the URI stored by the + * request, nor the values in the server params. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated query string arguments. + * + * @param array $query Array of query string arguments, typically from + * $_GET. + * @return static + */ + public function withQueryParams(array $query); + + /** + * Retrieve normalized file upload data. + * + * This method returns upload metadata in a normalized tree, with each leaf + * an instance of Psr\Http\Message\UploadedFileInterface. + * + * These values MAY be prepared from $_FILES or the message body during + * instantiation, or MAY be injected via withUploadedFiles(). + * + * @return array An array tree of UploadedFileInterface instances; an empty + * array MUST be returned if no data is present. + */ + public function getUploadedFiles(); + + /** + * Create a new instance with the specified uploaded files. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param array $uploadedFiles An array tree of UploadedFileInterface instances. + * @return static + * @throws \InvalidArgumentException if an invalid structure is provided. + */ + public function withUploadedFiles(array $uploadedFiles); + + /** + * Retrieve any parameters provided in the request body. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, this method MUST + * return the contents of $_POST. + * + * Otherwise, this method may return any results of deserializing + * the request body content; as parsing returns structured content, the + * potential types MUST be arrays or objects only. A null value indicates + * the absence of body content. + * + * @return null|array|object The deserialized body parameters, if any. + * These will typically be an array or object. + */ + public function getParsedBody(); + + /** + * Return an instance with the specified body parameters. + * + * These MAY be injected during instantiation. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, use this method + * ONLY to inject the contents of $_POST. + * + * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of + * deserializing the request body content. Deserialization/parsing returns + * structured data, and, as such, this method ONLY accepts arrays or objects, + * or a null value if nothing was available to parse. + * + * As an example, if content negotiation determines that the request data + * is a JSON payload, this method could be used to create a request + * instance with the deserialized parameters. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param null|array|object $data The deserialized body data. This will + * typically be in an array or object. + * @return static + * @throws \InvalidArgumentException if an unsupported argument type is + * provided. + */ + public function withParsedBody($data); + + /** + * Retrieve attributes derived from the request. + * + * The request "attributes" may be used to allow injection of any + * parameters derived from the request: e.g., the results of path + * match operations; the results of decrypting cookies; the results of + * deserializing non-form-encoded message bodies; etc. Attributes + * will be application and request specific, and CAN be mutable. + * + * @return array Attributes derived from the request. + */ + public function getAttributes(); + + /** + * Retrieve a single derived request attribute. + * + * Retrieves a single derived request attribute as described in + * getAttributes(). If the attribute has not been previously set, returns + * the default value as provided. + * + * This method obviates the need for a hasAttribute() method, as it allows + * specifying a default value to return if the attribute is not found. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $default Default value to return if the attribute does not exist. + * @return mixed + */ + public function getAttribute($name, $default = null); + + /** + * Return an instance with the specified derived request attribute. + * + * This method allows setting a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $value The value of the attribute. + * @return static + */ + public function withAttribute($name, $value); + + /** + * Return an instance that removes the specified derived request attribute. + * + * This method allows removing a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @return static + */ + public function withoutAttribute($name); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/StreamInterface.php b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/StreamInterface.php new file mode 100644 index 000000000..f68f39126 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/psr/http-message/src/StreamInterface.php @@ -0,0 +1,158 @@ + + * [user-info@]host[:port] + * + * + * If the port component is not set or is the standard port for the current + * scheme, it SHOULD NOT be included. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.2 + * @return string The URI authority, in "[user-info@]host[:port]" format. + */ + public function getAuthority(); + + /** + * Retrieve the user information component of the URI. + * + * If no user information is present, this method MUST return an empty + * string. + * + * If a user is present in the URI, this will return that value; + * additionally, if the password is also present, it will be appended to the + * user value, with a colon (":") separating the values. + * + * The trailing "@" character is not part of the user information and MUST + * NOT be added. + * + * @return string The URI user information, in "username[:password]" format. + */ + public function getUserInfo(); + + /** + * Retrieve the host component of the URI. + * + * If no host is present, this method MUST return an empty string. + * + * The value returned MUST be normalized to lowercase, per RFC 3986 + * Section 3.2.2. + * + * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 + * @return string The URI host. + */ + public function getHost(); + + /** + * Retrieve the port component of the URI. + * + * If a port is present, and it is non-standard for the current scheme, + * this method MUST return it as an integer. If the port is the standard port + * used with the current scheme, this method SHOULD return null. + * + * If no port is present, and no scheme is present, this method MUST return + * a null value. + * + * If no port is present, but a scheme is present, this method MAY return + * the standard port for that scheme, but SHOULD return null. + * + * @return null|int The URI port. + */ + public function getPort(); + + /** + * Retrieve the path component of the URI. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * Normally, the empty path "" and absolute path "/" are considered equal as + * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically + * do this normalization because in contexts with a trimmed base path, e.g. + * the front controller, this difference becomes significant. It's the task + * of the user to handle both "" and "/". + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.3. + * + * As an example, if the value should include a slash ("/") not intended as + * delimiter between path segments, that value MUST be passed in encoded + * form (e.g., "%2F") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.3 + * @return string The URI path. + */ + public function getPath(); + + /** + * Retrieve the query string of the URI. + * + * If no query string is present, this method MUST return an empty string. + * + * The leading "?" character is not part of the query and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.4. + * + * As an example, if a value in a key/value pair of the query string should + * include an ampersand ("&") not intended as a delimiter between values, + * that value MUST be passed in encoded form (e.g., "%26") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.4 + * @return string The URI query string. + */ + public function getQuery(); + + /** + * Retrieve the fragment component of the URI. + * + * If no fragment is present, this method MUST return an empty string. + * + * The leading "#" character is not part of the fragment and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.5. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.5 + * @return string The URI fragment. + */ + public function getFragment(); + + /** + * Return an instance with the specified scheme. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified scheme. + * + * Implementations MUST support the schemes "http" and "https" case + * insensitively, and MAY accommodate other schemes if required. + * + * An empty scheme is equivalent to removing the scheme. + * + * @param string $scheme The scheme to use with the new instance. + * @return static A new instance with the specified scheme. + * @throws \InvalidArgumentException for invalid or unsupported schemes. + */ + public function withScheme($scheme); + + /** + * Return an instance with the specified user information. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified user information. + * + * Password is optional, but the user information MUST include the + * user; an empty string for the user is equivalent to removing user + * information. + * + * @param string $user The user name to use for authority. + * @param null|string $password The password associated with $user. + * @return static A new instance with the specified user information. + */ + public function withUserInfo($user, $password = null); + + /** + * Return an instance with the specified host. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified host. + * + * An empty host value is equivalent to removing the host. + * + * @param string $host The hostname to use with the new instance. + * @return static A new instance with the specified host. + * @throws \InvalidArgumentException for invalid hostnames. + */ + public function withHost($host); + + /** + * Return an instance with the specified port. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified port. + * + * Implementations MUST raise an exception for ports outside the + * established TCP and UDP port ranges. + * + * A null value provided for the port is equivalent to removing the port + * information. + * + * @param null|int $port The port to use with the new instance; a null value + * removes the port information. + * @return static A new instance with the specified port. + * @throws \InvalidArgumentException for invalid ports. + */ + public function withPort($port); + + /** + * Return an instance with the specified path. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified path. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * If the path is intended to be domain-relative rather than path relative then + * it must begin with a slash ("/"). Paths not starting with a slash ("/") + * are assumed to be relative to some base path known to the application or + * consumer. + * + * Users can provide both encoded and decoded path characters. + * Implementations ensure the correct encoding as outlined in getPath(). + * + * @param string $path The path to use with the new instance. + * @return static A new instance with the specified path. + * @throws \InvalidArgumentException for invalid paths. + */ + public function withPath($path); + + /** + * Return an instance with the specified query string. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified query string. + * + * Users can provide both encoded and decoded query characters. + * Implementations ensure the correct encoding as outlined in getQuery(). + * + * An empty query string value is equivalent to removing the query string. + * + * @param string $query The query string to use with the new instance. + * @return static A new instance with the specified query string. + * @throws \InvalidArgumentException for invalid query strings. + */ + public function withQuery($query); + + /** + * Return an instance with the specified URI fragment. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified URI fragment. + * + * Users can provide both encoded and decoded fragment characters. + * Implementations ensure the correct encoding as outlined in getFragment(). + * + * An empty fragment value is equivalent to removing the fragment. + * + * @param string $fragment The fragment to use with the new instance. + * @return static A new instance with the specified fragment. + */ + public function withFragment($fragment); + + /** + * Return the string representation as a URI reference. + * + * Depending on which components of the URI are present, the resulting + * string is either a full URI or relative reference according to RFC 3986, + * Section 4.1. The method concatenates the various components of the URI, + * using the appropriate delimiters: + * + * - If a scheme is present, it MUST be suffixed by ":". + * - If an authority is present, it MUST be prefixed by "//". + * - The path can be concatenated without delimiters. But there are two + * cases where the path has to be adjusted to make the URI reference + * valid as PHP does not allow to throw an exception in __toString(): + * - If the path is rootless and an authority is present, the path MUST + * be prefixed by "/". + * - If the path is starting with more than one "/" and no authority is + * present, the starting slashes MUST be reduced to one. + * - If a query is present, it MUST be prefixed by "?". + * - If a fragment is present, it MUST be prefixed by "#". + * + * @see http://tools.ietf.org/html/rfc3986#section-4.1 + * @return string + */ + public function __toString(); +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/LICENSE b/plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/LICENSE new file mode 100644 index 000000000..be5540c2a --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Ralph Khattar + +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. diff --git a/plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/README.md b/plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/README.md new file mode 100644 index 000000000..9430d76bb --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/README.md @@ -0,0 +1,27 @@ +getallheaders +============= + +PHP `getallheaders()` polyfill. Compatible with PHP >= 5.3. + +[![Build Status](https://travis-ci.org/ralouphie/getallheaders.svg?branch=master)](https://travis-ci.org/ralouphie/getallheaders) +[![Coverage Status](https://coveralls.io/repos/ralouphie/getallheaders/badge.png?branch=master)](https://coveralls.io/r/ralouphie/getallheaders?branch=master) +[![Latest Stable Version](https://poser.pugx.org/ralouphie/getallheaders/v/stable.png)](https://packagist.org/packages/ralouphie/getallheaders) +[![Latest Unstable Version](https://poser.pugx.org/ralouphie/getallheaders/v/unstable.png)](https://packagist.org/packages/ralouphie/getallheaders) +[![License](https://poser.pugx.org/ralouphie/getallheaders/license.png)](https://packagist.org/packages/ralouphie/getallheaders) + + +This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php). + +## Install + +For PHP version **`>= 5.6`**: + +``` +composer require ralouphie/getallheaders +``` + +For PHP version **`< 5.6`**: + +``` +composer require ralouphie/getallheaders "^2" +``` diff --git a/plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/composer.json b/plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/composer.json new file mode 100644 index 000000000..de8ce62e4 --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/composer.json @@ -0,0 +1,26 @@ +{ + "name": "ralouphie/getallheaders", + "description": "A polyfill for getallheaders.", + "license": "MIT", + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5 || ^6.5", + "php-coveralls/php-coveralls": "^2.1" + }, + "autoload": { + "files": ["src/getallheaders.php"] + }, + "autoload-dev": { + "psr-4": { + "getallheaders\\Tests\\": "tests/" + } + } +} diff --git a/plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/src/getallheaders.php b/plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/src/getallheaders.php new file mode 100644 index 000000000..c7285a5ba --- /dev/null +++ b/plugins/abwebdevelopers/imageresize/vendor/ralouphie/getallheaders/src/getallheaders.php @@ -0,0 +1,46 @@ + 'Content-Type', + 'CONTENT_LENGTH' => 'Content-Length', + 'CONTENT_MD5' => 'Content-Md5', + ); + + foreach ($_SERVER as $key => $value) { + if (substr($key, 0, 5) === 'HTTP_') { + $key = substr($key, 5); + if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) { + $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key)))); + $headers[$key] = $value; + } + } elseif (isset($copy_server[$key])) { + $headers[$copy_server[$key]] = $value; + } + } + + if (!isset($headers['Authorization'])) { + if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { + $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; + } elseif (isset($_SERVER['PHP_AUTH_USER'])) { + $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; + $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass); + } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { + $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; + } + } + + return $headers; + } + +} diff --git a/plugins/ahmadfatoni/apigenerator/Plugin.php b/plugins/ahmadfatoni/apigenerator/Plugin.php new file mode 100644 index 000000000..575a4fdf1 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/Plugin.php @@ -0,0 +1,18 @@ + October CMS plugin to build RESTful APIs. + +## Features + + - Auto generate routes + - Auto Generate Controller (CRUD) + - Support relationship restful API + +## Install +``` +composer require AhmadFatoni.ApiGenerator +``` + +## Usage + +### Form +- API Name : Name of your API module +- Base Endpoint : Base endpoint of your API, ex : api/v1/modulename +- Short Description : Describe your API +- Model : select model that will be created API +- Custom Condition : Build customer response using JSON modeling + +### Custom Condition Example +``` +{ + 'fillable': 'id,title,content', + 'relation': [{ + 'name': 'user', + 'fillable': 'id,first_name' + }, { + 'name': 'categories', + 'fillable': 'id,name + }] +} +``` +* please replace single quote with quote + +## Contribute + +Pull Requests accepted. + +## Contact + +You can communicate with me using [linkedin](https://www.linkedin.com/in/ahmad-fatoni) + +## License +The OctoberCMS platform is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). diff --git a/plugins/ahmadfatoni/apigenerator/controllers/ApiGeneratorController.php b/plugins/ahmadfatoni/apigenerator/controllers/ApiGeneratorController.php new file mode 100644 index 000000000..1eea0a4c4 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/ApiGeneratorController.php @@ -0,0 +1,336 @@ +files = $files; + } + + /** + * delete selected data (multiple delete) + * @return [type] [description] + */ + public function index_onDelete() + { + if (($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds)) { + + foreach ($checkedIds as $id) { + if ((!$item = ApiGenerator::find($id))) + continue; + $name = $item->name; + if($item->delete()){ + $this->deleteApi($name); + } + } + + Flash::success('Successfully deleted those data.'); + } + + return $this->listRefresh(); + } + + /** + * generate API + * @param Request $request [description] + * @return [type] [description] + */ + public function generateApi(Request $request){ + + $data['model'] = $request->model; + $modelname = explode("\\", $request->model); + $modelname = $modelname[count($modelname)-1]; + $data['modelname'] = $modelname; + $data['controllername'] = str_replace(" ", "", $request->name); + $data['endpoint'] = $request->endpoint; + $data['custom_format'] = $request->custom_format; + + if( strpos($data['controllername'], ".") OR strpos($data['controllername'], "/") ){ + + Flash::success('Failed to create data, invalid API name.'); + return Redirect::to( Backend::url($this->homePage)); + + } + + if( isset($request->id) ){ + $this->deleteApi($request->oldname, 'false'); + } + + $this->files->put(__DIR__ . $this->path . $data['controllername'].'Controller.php', $this->compile($data)); + + $this->files->put(__DIR__ . '/'.'../routes.php', $this->compileRoute($data)); + + return Redirect::to( Backend::url($this->homePage)); + + } + + /** + * delete available API + * @param [type] $name [description] + * @param [type] $redirect [description] + * @return [type] [description] + */ + public function deleteApi($name, $redirect = null){ + + $fileLocation = __DIR__ . $this->path.$name; + $fileLocation = str_replace(".", "", $fileLocation); + + if( ! file_exists($fileLocation.'Controller.php') ){ + + Flash::success('Failed to delete data, invalid file location.'); + return Redirect::to( Backend::url($this->homePage)); + + } + + if( strpos( strtolower($name), 'apigenerator' ) === false){ + $data = []; + + //generate new route + $this->files->put(__DIR__ . '/'.'../routes.php', $this->compileRoute($data)); + + //remove controller + if (file_exists( __DIR__ . $this->path.$name.'Controller.php' )) { + + unlink(__DIR__ . $this->path.$name.'Controller.php'); + + } + + if( $redirect != null ){ + return 'success without redirect'; + } + } + + return Redirect::to( Backend::url($this->homePage)); + + } + + public function updateApi($name){ + + } + + /** + * compile controller from template + * @param [type] $data [description] + * @return [type] [description] + */ + public function compile($data){ + if( $data['custom_format'] != ''){ + + $template = $this->files->get(__DIR__ .'/../template/customcontroller.dot'); + $template = $this->replaceAttribute($template, $data); + $template = $this->replaceCustomAttribute($template, $data); + }else{ + $template = $this->files->get(__DIR__ .'/../template/controller.dot'); + $template = $this->replaceAttribute($template, $data); + } + return $template; + } + + /** + * replace attribute + * @param [type] $template [description] + * @param [type] $data [description] + * @return [type] [description] + */ + public function replaceAttribute($template, $data){ + if( isset( $data['model'] ) ){ + $template = str_replace('{{model}}', $data['model'], $template); + } + $template = str_replace('{{modelname}}', $data['modelname'], $template); + $template = str_replace('{{controllername}}', $data['controllername'], $template); + return $template; + } + + /** + * replace custom attribute + * @param [type] $template [description] + * @param [type] $data [description] + * @return [type] [description] + */ + public function replaceCustomAttribute($template, $data){ + + $arr = str_replace('\t', '', $data['custom_format']); + $arr = json_decode($arr); + $select = str_replace('
', '', $this->compileOpenIndexFunction($data['modelname'], 'index')); + $show = str_replace('
', '', $this->compileOpenIndexFunction($data['modelname'], 'show')); + $fillableParent = ''; + + if( isset($arr->fillable) AND $arr->fillable != null ) { + $fillableParent = $this->compileFillableParent($arr->fillable); + } + + if( isset($arr->relation) AND $arr->relation != null AND is_array($arr->relation) AND count($arr->relation) > 0) { + $select .= str_replace('
', '', $this->compileFillableChild($arr->relation)); + $show .= str_replace('
', '', $this->compileFillableChild($arr->relation)); + } + + $select .= "->select(".$fillableParent.")"; + $show .= "->select(".$fillableParent.")->where('id', '=', \$id)->first();"; + + ( $fillableParent != '') ? $select .= "->get()->toArray();" : $select .= "->toArray();" ; + + $closeFunction = str_replace('
', '', nl2br( + " + return \$this->helpers->apiArrayResponseBuilder(200, 'success', \$data); + }")); + $select .= $closeFunction; + $show .= $closeFunction; + + $template = str_replace('{{select}}', $select, $template); + $template = str_replace('{{show}}', $show, $template); + + return $template; + } + + public function compileOpenIndexFunction($modelname, $type){ + if( $type == 'index'){ + return nl2br(" + public function index(){ + \$data = \$this->".$modelname); + }else{ + return nl2br(" + public function show(\$id){ + \$data = \$this->".$modelname); + } + + } + + public function compileFillableParent($fillable){ + + $fillableParentArr = explode(",", $fillable); + $fillableParent = ''; + + foreach ($fillableParentArr as $key) { + + $fillableParent .= ",'".$key."'"; + + } + + $fillableParent = substr_replace($fillableParent, '', 0 , 1); + + return $fillableParent; + } + + public function compileFillableChild($fillable){ + + $select = "->with(array("; + + foreach ($fillable as $key) { + + $fillableChild = ""; + + if( isset($key->fillable) AND $key->fillable != null ){ + $fillableChildArr = explode(",", $key->fillable); + + + foreach ($fillableChildArr as $key2) { + + $fillableChild .= ",'".$key2."'"; + + } + + $fillableChild = substr_replace($fillableChild, '', 0 , 1); + } + + $select .= nl2br( + " + '".$key->name."'=>function(\$query){ + \$query->select(".$fillableChild."); + },"); + + } + + $select .= " ))"; + + return $select; + } + + public function compileRoute($data){ + + $oldData = ApiGenerator::all(); + $routeList = ""; + + if( count($oldData) > 0 ){ + + $routeList .= $this->parseRouteOldData($oldData, $data); + + } + + if( count($data) > 0 ){ + $data['modelname'] = $data['endpoint']; + if( $data['modelname'][0] == "/" ){ + $data['modelname'] = substr_replace($data['modelname'], '', 0 , 1); + } + $routeList .= $this->parseRoute($data); + } + + $route = $this->files->get(__DIR__ .'/../template/routes.dot'); + $route = str_replace('{{route}}', $routeList, $route); + + return $route; + + } + + public function parseRouteOldData($oldData, $data = null){ + + $routeList = ""; + + if( count($data) == 0 ) $data['modelname']=''; + + foreach ( $oldData as $key ) { + + $modelname = explode("\\", $key->model); + $modelname = $modelname[count($modelname)-1]; + $old['modelname'] = $key->endpoint; + $old['controllername'] = $key->name; + + if( $data['modelname'] != $modelname ){ + + if( $old['modelname'][0] == "/" ){ + $old['modelname'] = substr_replace($old['modelname'], '', 0 , 1); + } + + $routeList .= $this->parseRoute($old); + } + } + + return $routeList; + + } + + public function parseRoute($data){ + + $template = $this->files->get(__DIR__ .'/../template/route.dot'); + $template = $this->replaceAttribute($template, $data); + return $template; + } + + + public static function getAfterFilters() {return [];} + public static function getBeforeFilters() {return [];} + public function callAction($method, $parameters=false) { + return call_user_func_array(array($this, $method), $parameters); + } +} diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/CategoriesController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/CategoriesController.php new file mode 100644 index 000000000..3ae948a56 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/CategoriesController.php @@ -0,0 +1,99 @@ +Category = $Category; + $this->helpers = $helpers; + } + + public function index(){ + + $data = $this->Category->all()->toArray(); + + return $this->helpers->apiArrayResponseBuilder(200, 'success', $data); + } + + public function show($id){ + + $data = $this->Category::find($id); + + if ($data){ + return $this->helpers->apiArrayResponseBuilder(200, 'success', [$data]); + } else { + $this->helpers->apiArrayResponseBuilder(404, 'not found', ['error' => 'Resource id=' . $id . ' could not be found']); + } + + } + + public function store(Request $request){ + + $arr = $request->all(); + + while ( $data = current($arr)) { + $this->Category->{key($arr)} = $data; + next($arr); + } + + $validation = Validator::make($request->all(), $this->Category->rules); + + if( $validation->passes() ){ + $this->Category->save(); + return $this->helpers->apiArrayResponseBuilder(201, 'created', ['id' => $this->Category->id]); + }else{ + return $this->helpers->apiArrayResponseBuilder(400, 'fail', $validation->errors() ); + } + + } + + public function update($id, Request $request){ + + $status = $this->Category->where('id',$id)->update($data); + + if( $status ){ + + return $this->helpers->apiArrayResponseBuilder(200, 'success', 'Data has been updated successfully.'); + + }else{ + + return $this->helpers->apiArrayResponseBuilder(400, 'bad request', 'Error, data failed to update.'); + + } + } + + public function delete($id){ + + $this->Category->where('id',$id)->delete(); + + return $this->helpers->apiArrayResponseBuilder(200, 'success', 'Data has been deleted successfully.'); + } + + public function destroy($id){ + + $this->Category->where('id',$id)->delete(); + + return $this->helpers->apiArrayResponseBuilder(200, 'success', 'Data has been deleted successfully.'); + } + + + public static function getAfterFilters() {return [];} + public static function getBeforeFilters() {return [];} + public static function getMiddleware() {return [];} + public function callAction($method, $parameters=false) { + return call_user_func_array(array($this, $method), $parameters); + } + +} \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php new file mode 100644 index 000000000..e9afd7552 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php @@ -0,0 +1,99 @@ +Post = $Post; + $this->helpers = $helpers; + } + + public function index(){ + + $data = $this->Post->all()->toArray(); + + return $this->helpers->apiArrayResponseBuilder(200, 'success', $data); + } + + public function show($id){ + + $data = $this->Post::find($id); + + if ($data){ + return $this->helpers->apiArrayResponseBuilder(200, 'success', [$data]); + } else { + $this->helpers->apiArrayResponseBuilder(404, 'not found', ['error' => 'Resource id=' . $id . ' could not be found']); + } + + } + + public function store(Request $request){ + + $arr = $request->all(); + + while ( $data = current($arr)) { + $this->Post->{key($arr)} = $data; + next($arr); + } + + $validation = Validator::make($request->all(), $this->Post->rules); + + if( $validation->passes() ){ + $this->Post->save(); + return $this->helpers->apiArrayResponseBuilder(201, 'created', ['id' => $this->Post->id]); + }else{ + return $this->helpers->apiArrayResponseBuilder(400, 'fail', $validation->errors() ); + } + + } + + public function update($id, Request $request){ + + $status = $this->Post->where('id',$id)->update($data); + + if( $status ){ + + return $this->helpers->apiArrayResponseBuilder(200, 'success', 'Data has been updated successfully.'); + + }else{ + + return $this->helpers->apiArrayResponseBuilder(400, 'bad request', 'Error, data failed to update.'); + + } + } + + public function delete($id){ + + $this->Post->where('id',$id)->delete(); + + return $this->helpers->apiArrayResponseBuilder(200, 'success', 'Data has been deleted successfully.'); + } + + public function destroy($id){ + + $this->Post->where('id',$id)->delete(); + + return $this->helpers->apiArrayResponseBuilder(200, 'success', 'Data has been deleted successfully.'); + } + + + public static function getAfterFilters() {return [];} + public static function getBeforeFilters() {return [];} + public static function getMiddleware() {return [];} + public function callAction($method, $parameters=false) { + return call_user_func_array(array($this, $method), $parameters); + } + +} \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/readme.txt b/plugins/ahmadfatoni/apigenerator/controllers/api/readme.txt new file mode 100644 index 000000000..f972e8de0 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/readme.txt @@ -0,0 +1 @@ +api controller here \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/_list_toolbar.htm b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/_list_toolbar.htm new file mode 100644 index 000000000..82a362239 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/_list_toolbar.htm @@ -0,0 +1,18 @@ +
+ + +
diff --git a/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/_reorder_toolbar.htm b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/_reorder_toolbar.htm new file mode 100644 index 000000000..59b78d088 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/_reorder_toolbar.htm @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/config_form.yaml b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/config_form.yaml new file mode 100644 index 000000000..9317c6bd1 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/config_form.yaml @@ -0,0 +1,10 @@ +name: ApiGeneratorController +form: $/ahmadfatoni/apigenerator/models/apigenerator/fields.yaml +modelClass: AhmadFatoni\ApiGenerator\Models\ApiGenerator +defaultRedirect: ahmadfatoni/apigenerator/apigeneratorcontroller +create: + redirect: 'ahmadfatoni/apigenerator/apigeneratorcontroller/update/:id' + redirectClose: ahmadfatoni/apigenerator/apigeneratorcontroller +update: + redirect: ahmadfatoni/apigenerator/apigeneratorcontroller + redirectClose: ahmadfatoni/apigenerator/apigeneratorcontroller diff --git a/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/config_list.yaml b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/config_list.yaml new file mode 100644 index 000000000..d36a63f51 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/config_list.yaml @@ -0,0 +1,11 @@ +list: $/ahmadfatoni/apigenerator/models/apigenerator/columns.yaml +modelClass: AhmadFatoni\ApiGenerator\Models\ApiGenerator +title: ApiGeneratorController +noRecordsMessage: 'backend::lang.list.no_records' +showSetup: true +showCheckboxes: true +toolbar: + buttons: list_toolbar + search: + prompt: 'backend::lang.list.search_prompt' +recordUrl: 'ahmadfatoni/apigenerator/apigeneratorcontroller/update/:id' diff --git a/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/config_reorder.yaml b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/config_reorder.yaml new file mode 100644 index 000000000..70fda7be8 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/config_reorder.yaml @@ -0,0 +1,4 @@ +title: ApiGeneratorController +modelClass: AhmadFatoni\ApiGenerator\Models\ApiGenerator +toolbar: + buttons: reorder_toolbar diff --git a/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/create.htm b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/create.htm new file mode 100644 index 000000000..22322c523 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/create.htm @@ -0,0 +1,97 @@ + + + + +fatalError): ?> + + 'layout']) ?> + +
+ formRender() ?> +
+ + + + + + + + + + +

fatalError)) ?>

+

+ + + \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/index.htm b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/index.htm new file mode 100644 index 000000000..ea43a3636 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/index.htm @@ -0,0 +1 @@ +listRender() ?> diff --git a/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/preview.htm b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/preview.htm new file mode 100644 index 000000000..f259af345 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/preview.htm @@ -0,0 +1,22 @@ + + + + +fatalError): ?> + +
+ formRenderPreview() ?> +
+ + +

fatalError) ?>

+ + +

+ + + +

\ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/reorder.htm b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/reorder.htm new file mode 100644 index 000000000..9813ab46a --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/reorder.htm @@ -0,0 +1,8 @@ + + + + +reorderRender() ?> \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/update.htm b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/update.htm new file mode 100644 index 000000000..dc6594a46 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/apigeneratorcontroller/update.htm @@ -0,0 +1,133 @@ + + + + +fatalError): ?> + + 'layout']) ?> + +
+ formRender() ?> +
+ + +
+ +
+ + + +

fatalError)) ?>

+

+ + + + + + + + \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/helpers/Helpers.php b/plugins/ahmadfatoni/apigenerator/helpers/Helpers.php new file mode 100644 index 000000000..1145f7f7a --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/helpers/Helpers.php @@ -0,0 +1,19 @@ + (isset($statusCode)) ? $statusCode : 500, + 'message' => (isset($message)) ? $message : 'error' + ]; + if (count($data) > 0) { + $arr['data'] = $data; + } + + return response()->json($arr, $arr['status_code']); + //return $arr; + + } +} \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/lang/en/lang.php b/plugins/ahmadfatoni/apigenerator/lang/en/lang.php new file mode 100644 index 000000000..9ade59ec2 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/lang/en/lang.php @@ -0,0 +1,6 @@ + [ + 'name' => 'API-Generator', + 'description' => 'Generate API base on Builder Plugin' + ] +]; \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/models/ApiGenerator.php b/plugins/ahmadfatoni/apigenerator/models/ApiGenerator.php new file mode 100644 index 000000000..531bfd111 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/models/ApiGenerator.php @@ -0,0 +1,76 @@ + 'required|unique:ahmadfatoni_apigenerator_data,name|regex:/^[\pL\s\-]+$/u', + 'endpoint' => 'required|unique:ahmadfatoni_apigenerator_data,endpoint', + 'custom_format' => 'json' + ]; + + public $customMessages = [ + 'custom_format.json' => 'Invalid Json Format Custom Condition' + ]; + + /* + * Disable timestamps by default. + * Remove this line if timestamps are defined in the database table. + */ + public $timestamps = false; + + /** + * @var string The database table used by the model. + */ + public $table = 'ahmadfatoni_apigenerator_data'; + + /** + * get model List + * @return [type] [description] + */ + public function getModelOptions(){ + + return ComponentHelper::instance()->listGlobalModels(); + } + + /** + * [setCustomFormatAttribute description] + * @param [type] $value [description] + */ + public function setCustomFormatAttribute($value){ + + $json = str_replace('\t', '', $value); + $json = json_decode($json); + + if( $json != null){ + + if( ! isset($json->fillable) AND ! isset($json->relation) ){ + + return $this->attributes['custom_format'] = 'invalid format'; + + } + + if( isset($json->relation) AND $json->relation != null ){ + foreach ($json->relation as $key) { + if( !isset($key->name) OR $key->name == null ){ + return $this->attributes['custom_format'] = 'invalid format'; + } + } + } + } + + return $this->attributes['custom_format'] = $value; + + } + +} \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/models/apigenerator/columns.yaml b/plugins/ahmadfatoni/apigenerator/models/apigenerator/columns.yaml new file mode 100644 index 000000000..58ce8eb61 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/models/apigenerator/columns.yaml @@ -0,0 +1,9 @@ +columns: + name: + label: 'API NAME' + type: text + searchable: true + sortable: true + endpoint: + label: 'BASE ENDPOINT' + type: text diff --git a/plugins/ahmadfatoni/apigenerator/models/apigenerator/fields.yaml b/plugins/ahmadfatoni/apigenerator/models/apigenerator/fields.yaml new file mode 100644 index 000000000..a8e6e0bce --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/models/apigenerator/fields.yaml @@ -0,0 +1,33 @@ +fields: + name: + label: 'API Name' + oc.commentPosition: '' + span: auto + placeholder: 'Name of your API' + required: 1 + type: text + endpoint: + label: 'Base Endpoint' + oc.commentPosition: '' + span: auto + placeholder: api/v1/modulename + required: 1 + type: text + description: + label: 'Short Description' + oc.commentPosition: '' + span: auto + placeholder: 'Descript your API' + type: text + model: + label: 'Select Model' + oc.commentPosition: '' + span: auto + required: 1 + type: dropdown + custom_format: + label: 'Custom Condition (Fillable and Relation)' + size: large + oc.commentPosition: '' + span: full + type: textarea diff --git a/plugins/ahmadfatoni/apigenerator/plugin.yaml b/plugins/ahmadfatoni/apigenerator/plugin.yaml new file mode 100644 index 000000000..598021df5 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/plugin.yaml @@ -0,0 +1,17 @@ +plugin: + name: 'ahmadfatoni.apigenerator::lang.plugin.name' + description: 'ahmadfatoni.apigenerator::lang.plugin.description' + author: AhmadFatoni + icon: oc-icon-bolt + homepage: '' +navigation: + api-generator: + label: 'API Generator' + url: ahmadfatoni/apigenerator/apigeneratorcontroller + icon: icon-cogs + permissions: + - ahmadfatoni.apigenerator.manage +permissions: + ahmadfatoni.apigenerator.manage: + tab: 'API Generator' + label: 'Manage the API Generator' diff --git a/plugins/ahmadfatoni/apigenerator/routes.php b/plugins/ahmadfatoni/apigenerator/routes.php new file mode 100644 index 000000000..bdc1b2a41 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/routes.php @@ -0,0 +1,10 @@ + 'fatoni.generate.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@generateApi')); +Route::post('fatoni/update/api/{id}', array('as' => 'fatoni.update.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@updateApi')); +Route::get('fatoni/delete/api/{id}', array('as' => 'fatoni.delete.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@deleteApi')); + +Route::resource('api/v1/categories', 'AhmadFatoni\ApiGenerator\Controllers\API\CategoriesController', ['except' => ['destroy', 'create', 'edit']]); +Route::get('api/v1/categories/{id}/delete', ['as' => 'api/v1/categories.delete', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\API\CategoriesController@destroy']); +Route::resource('api/v1/posts', 'AhmadFatoni\ApiGenerator\Controllers\API\postsController', ['except' => ['destroy', 'create', 'edit']]); +Route::get('api/v1/posts/{id}/delete', ['as' => 'api/v1/posts.delete', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\API\postsController@destroy']); \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/template/controller.dot b/plugins/ahmadfatoni/apigenerator/template/controller.dot new file mode 100644 index 000000000..ff20ea3aa --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/template/controller.dot @@ -0,0 +1,99 @@ +{{modelname}} = ${{modelname}}; + $this->helpers = $helpers; + } + + public function index(){ + + $data = $this->{{modelname}}->all()->toArray(); + + return $this->helpers->apiArrayResponseBuilder(200, 'success', $data); + } + + public function show($id){ + + $data = $this->{{modelname}}::find($id); + + if ($data){ + return $this->helpers->apiArrayResponseBuilder(200, 'success', [$data]); + } else { + $this->helpers->apiArrayResponseBuilder(404, 'not found', ['error' => 'Resource id=' . $id . ' could not be found']); + } + + } + + public function store(Request $request){ + + $arr = $request->all(); + + while ( $data = current($arr)) { + $this->{{modelname}}->{key($arr)} = $data; + next($arr); + } + + $validation = Validator::make($request->all(), $this->{{modelname}}->rules); + + if( $validation->passes() ){ + $this->{{modelname}}->save(); + return $this->helpers->apiArrayResponseBuilder(201, 'created', ['id' => $this->{{modelname}}->id]); + }else{ + return $this->helpers->apiArrayResponseBuilder(400, 'fail', $validation->errors() ); + } + + } + + public function update($id, Request $request){ + + $status = $this->{{modelname}}->where('id',$id)->update($data); + + if( $status ){ + + return $this->helpers->apiArrayResponseBuilder(200, 'success', 'Data has been updated successfully.'); + + }else{ + + return $this->helpers->apiArrayResponseBuilder(400, 'bad request', 'Error, data failed to update.'); + + } + } + + public function delete($id){ + + $this->{{modelname}}->where('id',$id)->delete(); + + return $this->helpers->apiArrayResponseBuilder(200, 'success', 'Data has been deleted successfully.'); + } + + public function destroy($id){ + + $this->{{modelname}}->where('id',$id)->delete(); + + return $this->helpers->apiArrayResponseBuilder(200, 'success', 'Data has been deleted successfully.'); + } + + + public static function getAfterFilters() {return [];} + public static function getBeforeFilters() {return [];} + public static function getMiddleware() {return [];} + public function callAction($method, $parameters=false) { + return call_user_func_array(array($this, $method), $parameters); + } + +} \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/template/controller.php b/plugins/ahmadfatoni/apigenerator/template/controller.php new file mode 100644 index 000000000..f78dde065 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/template/controller.php @@ -0,0 +1,35 @@ +{{modelname}} = ${{modelname}}; + } + + public static function getAfterFilters() {return [];} + public static function getBeforeFilters() {return [];} + public static function getMiddleware() {return [];} + public function callAction($method, $parameters=false) { + return call_user_func_array(array($this, $method), $parameters); + } + + // public function create(Request $request){ + + // $arr = $request->all(); + + // while ( $data = current($arr)) { + // $this-> + // } + // return json_encode($this->{{modelname}}->store($request)); + + // } +} diff --git a/plugins/ahmadfatoni/apigenerator/template/customcontroller.dot b/plugins/ahmadfatoni/apigenerator/template/customcontroller.dot new file mode 100644 index 000000000..be5cf6ff2 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/template/customcontroller.dot @@ -0,0 +1,83 @@ +{{modelname}} = ${{modelname}}; + $this->helpers = $helpers; + } + + {{select}} + + {{show}} + + public function store(Request $request){ + + $arr = $request->all(); + + while ( $data = current($arr)) { + $this->{{modelname}}->{key($arr)} = $data; + next($arr); + } + + $validation = Validator::make($request->all(), $this->{{modelname}}->rules); + + if( $validation->passes() ){ + $this->{{modelname}}->save(); + return $this->helpers->apiArrayResponseBuilder(201, 'created', ['id' => $this->{{modelname}}->id]); + }else{ + return $this->helpers->apiArrayResponseBuilder(400, 'fail', $validation->errors() ); + } + + } + + public function update($id, Request $request){ + + $status = $this->{{modelname}}->where('id',$id)->update($data); + + if( $status ){ + + return $this->helpers->apiArrayResponseBuilder(200, 'success', 'Data has been updated successfully.'); + + }else{ + + return $this->helpers->apiArrayResponseBuilder(400, 'bad request', 'Error, data failed to update.'); + + } + } + + public function delete($id){ + + $this->{{modelname}}->where('id',$id)->delete(); + + return $this->helpers->apiArrayResponseBuilder(200, 'success', 'Data has been deleted successfully.'); + } + + public function destroy($id){ + + $this->{{modelname}}->where('id',$id)->delete(); + + return $this->helpers->apiArrayResponseBuilder(200, 'success', 'Data has been deleted successfully.'); + } + + + public static function getAfterFilters() {return [];} + public static function getBeforeFilters() {return [];} + public static function getMiddleware() {return [];} + public function callAction($method, $parameters=false) { + return call_user_func_array(array($this, $method), $parameters); + } + +} diff --git a/plugins/ahmadfatoni/apigenerator/template/route.dot b/plugins/ahmadfatoni/apigenerator/template/route.dot new file mode 100644 index 000000000..515cb53c9 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/template/route.dot @@ -0,0 +1,3 @@ + +Route::resource('{{modelname}}', 'AhmadFatoni\ApiGenerator\Controllers\API\{{controllername}}Controller', ['except' => ['destroy', 'create', 'edit']]); +Route::get('{{modelname}}/{id}/delete', ['as' => '{{modelname}}.delete', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\API\{{controllername}}Controller@destroy']); \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/template/routes.dot b/plugins/ahmadfatoni/apigenerator/template/routes.dot new file mode 100644 index 000000000..ddafe5901 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/template/routes.dot @@ -0,0 +1,6 @@ + 'fatoni.generate.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@generateApi')); +Route::post('fatoni/update/api/{id}', array('as' => 'fatoni.update.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@updateApi')); +Route::get('fatoni/delete/api/{id}', array('as' => 'fatoni.delete.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@deleteApi')); +{{route}} \ No newline at end of file diff --git a/plugins/ahmadfatoni/apigenerator/updates/builder_table_create_ahmadfatoni_apigenerator_data.php b/plugins/ahmadfatoni/apigenerator/updates/builder_table_create_ahmadfatoni_apigenerator_data.php new file mode 100644 index 000000000..44cdc81e3 --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/updates/builder_table_create_ahmadfatoni_apigenerator_data.php @@ -0,0 +1,26 @@ +engine = 'InnoDB'; + $table->increments('id'); + $table->string('name'); + $table->string('endpoint'); + $table->string('model'); + $table->string('description')->nullable(); + $table->text('custom_format')->nullable(); + }); + } + + public function down() + { + Schema::dropIfExists('ahmadfatoni_apigenerator_data'); + } +} diff --git a/plugins/ahmadfatoni/apigenerator/updates/version.yaml b/plugins/ahmadfatoni/apigenerator/updates/version.yaml new file mode 100644 index 000000000..966ff307a --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/updates/version.yaml @@ -0,0 +1,15 @@ +1.0.1: + - 'Initialize plugin.' +1.0.2: + - 'Database implementation' +1.0.3: + - 'add builder plugin on requirements dependency' + - builder_table_create_ahmadfatoni_apigenerator_data.php +1.0.4: + - 'fixing bug on PHP 7' +1.0.5: + - 'fixing bug on request delete data' +1.0.6: + - 'fixing bug on generate endpoint' +1.0.7: + - 'fixing bug on October CMS v1.0.456' \ No newline at end of file diff --git a/plugins/vdlp/rssfetcher/components/Items.php b/plugins/vdlp/rssfetcher/components/Items.php index 9cb326ef7..c983e74a0 100644 --- a/plugins/vdlp/rssfetcher/components/Items.php +++ b/plugins/vdlp/rssfetcher/components/Items.php @@ -7,6 +7,7 @@ declare(strict_types=1); namespace Vdlp\RssFetcher\Components; use Cms\Classes\ComponentBase; +use Illuminate\Support\Facades\App; use October\Rain\Support\Collection; use Throwable; use Vdlp\RssFetcher\Models\Item; @@ -80,6 +81,7 @@ class Items extends ComponentBase 'vdlp_rssfetcher_sources.id' ) ->where('vdlp_rssfetcher_sources.is_enabled', '=', 1) + ->where('vdlp_rssfetcher_sources.locale', '=', App::getLocale()) ->where('vdlp_rssfetcher_items.is_published', '=', 1) ->orderBy('vdlp_rssfetcher_items.pub_date', 'desc') ->limit($maxItems); diff --git a/plugins/vdlp/rssfetcher/models/source/columns.yaml b/plugins/vdlp/rssfetcher/models/source/columns.yaml index 1383c5e30..732a77354 100644 --- a/plugins/vdlp/rssfetcher/models/source/columns.yaml +++ b/plugins/vdlp/rssfetcher/models/source/columns.yaml @@ -19,3 +19,5 @@ columns: fetched_at: label: vdlp.rssfetcher::lang.source.last_fetched type: timesince + locale: + label: language diff --git a/plugins/vdlp/rssfetcher/models/source/fields.yaml b/plugins/vdlp/rssfetcher/models/source/fields.yaml index b8ee1e455..45cdbe267 100644 --- a/plugins/vdlp/rssfetcher/models/source/fields.yaml +++ b/plugins/vdlp/rssfetcher/models/source/fields.yaml @@ -28,3 +28,11 @@ fields: label: vdlp.rssfetcher::lang.source.publish_new_items type: switch span: left + locale: + label: Language of Source + span: left + type: dropdown + default: ru + options: + ru: Russian + en: English diff --git a/plugins/vdlp/rssfetcher/updates/version.yaml b/plugins/vdlp/rssfetcher/updates/version.yaml index b824d3dce..9c65539d4 100644 --- a/plugins/vdlp/rssfetcher/updates/version.yaml +++ b/plugins/vdlp/rssfetcher/updates/version.yaml @@ -1,20 +1,23 @@ 1.0.0: - - "First version of RssFetcher" + - 'First version of RssFetcher' - 20180718_0001_create_sources_table.php - 20180718_0002_create_items_table.php - 20180718_0003_seed_feeds_table.php - 20180718_0004_seed_sources_table.php -1.0.1: "Add correct controller permissions" +1.0.1: 'Add correct controller permissions' 1.0.2: - - "Move publish_new_items to Sources table" + - 'Move publish_new_items to Sources table' - 20181012_0005_move_publish_new_items_to_sources_table.php -1.0.3: "Fix SQL error with `enclosure_length` attribute" -1.0.4: "Code optimizations" -1.0.5: "Escape output to prevent XSS injections" -1.1.0: "Code improvements (>= PHP 7.1)" +1.0.3: 'Fix SQL error with `enclosure_length` attribute' +1.0.4: 'Code optimizations' +1.0.5: 'Escape output to prevent XSS injections' +1.1.0: 'Code improvements (>= PHP 7.1)' 1.2.0: - - "Improve item saving" + - 'Improve item saving' - 20200206_0006_remove_unique_constraint_from_items.php 2.0.0: - - "Replace Zend Framework with Laminas and added events" -2.1.0: "Fix Author parsing for Atom/RSS feeds" + - 'Replace Zend Framework with Laminas and added events' +2.1.0: 'Fix Author parsing for Atom/RSS feeds' +2.1.1: + - 'Updated table vdlp_rssfetcher_sources' + - builder_table_update_vdlp_rssfetcher_sources.php diff --git a/themes/modern/content/static-pages-en/contact.htm b/themes/modern/content/static-pages-en/contact.htm index eccd4e2d6..989c7d5df 100644 --- a/themes/modern/content/static-pages-en/contact.htm +++ b/themes/modern/content/static-pages-en/contact.htm @@ -1,3 +1,14 @@ [viewBag] title = "Contact us" -== \ No newline at end of file +== +{% put form %} +
Feedback
+
 
+ +{% endput %} +== +
Contacts
+
+
Address: Turkmenistan, Ashgabat city, Bitarap Turkmenistan 24а
+ +
\ No newline at end of file diff --git a/themes/modern/content/static-pages/contact.htm b/themes/modern/content/static-pages/contact.htm index 758d057b6..543d52302 100644 --- a/themes/modern/content/static-pages/contact.htm +++ b/themes/modern/content/static-pages/contact.htm @@ -4,6 +4,8 @@ url = "/contact-us" layout = "contacts" is_hidden = 0 navigation_hidden = 0 +robot_index = "index" +robot_follow = "follow" == {% put form %}
Обратная связь
diff --git a/themes/modern/meta/menus/top-menu.yaml b/themes/modern/meta/menus/top-menu.yaml index b65c83ae0..105e2847c 100644 --- a/themes/modern/meta/menus/top-menu.yaml +++ b/themes/modern/meta/menus/top-menu.yaml @@ -1,25 +1,24 @@ items: - title: Главная - nesting: null type: url url: / code: '' - reference: null - cmsPage: null - replace: null viewBag: locale: en: title: Home url: '' - isHidden: '0' + isHidden: '1' cssClass: '' isExternal: '0' - title: Рубрики + nesting: null type: all-blog-categories + url: null code: '' + reference: null cmsPage: category replace: 1 viewBag: diff --git a/themes/modern/pages/post.htm b/themes/modern/pages/post.htm index f248484b1..d8dcf8f8a 100644 --- a/themes/modern/pages/post.htm +++ b/themes/modern/pages/post.htm @@ -42,7 +42,7 @@ slug = "{{ :slug }}" {% if post.featured_image %} - {{post.title}} + {{post.title}} {% endif %} diff --git a/themes/modern/partials/header.htm b/themes/modern/partials/header.htm index e99370871..9673d737d 100644 --- a/themes/modern/partials/header.htm +++ b/themes/modern/partials/header.htm @@ -53,7 +53,7 @@ code = "top-menu" - {% else %} - {{ item.title }} + {% elseif not item.viewBag.isHidden %} + {{ item.title }} {% endif %} {% endfor %} @@ -92,4 +92,4 @@ code = "top-menu" +================================================--> \ No newline at end of file diff --git a/themes/modern/partials/index/category_posts.htm b/themes/modern/partials/index/category_posts.htm index 066f6fd21..5aa10b3eb 100644 --- a/themes/modern/partials/index/category_posts.htm +++ b/themes/modern/partials/index/category_posts.htm @@ -8,7 +8,7 @@ {{'page.more'|_}} - + {{posts.first.title}}
diff --git a/themes/modern/partials/index/top_section.htm b/themes/modern/partials/index/top_section.htm index 09e2a2d83..c3dc02d95 100644 --- a/themes/modern/partials/index/top_section.htm +++ b/themes/modern/partials/index/top_section.htm @@ -13,7 +13,7 @@
- + {{firstPost.title}}
diff --git a/themes/modern/partials/slider.htm b/themes/modern/partials/slider.htm index 7b114e0a6..6f2f4cd69 100644 --- a/themes/modern/partials/slider.htm +++ b/themes/modern/partials/slider.htm @@ -1,6 +1,6 @@ [blogPosts] pageNumber = "{{ :page }}" -postsPerPage = 6 +postsPerPage = 4 noPostsMessage = "No posts found" sortOrder = "published_at desc" categoryPage = "category" @@ -15,7 +15,7 @@ postPage = "post"
{% for post in posts %}
- {{post.title}} + {{post.title}} {% if post.categories.count()>0%}
{{post.categories.implode('name', ', ')}}