alex-kalanis/kw_images
Composer 安装命令:
composer require alex-kalanis/kw_images
包简介
Processing images in KWCMS
README 文档
README
Gallery on (remote) file system tree.
Working with images in tree-like gallery. Usually these libraries uses volume as their data source, but it is possible to set different (external) storage and use it. Just a few things cannot be done remotely and these will dump processed content locally and after changes returns it back to the storage.
PHP Installation
composer.phar require alex-kalanis/kw_images
(Refer to Composer Documentation if you are not familiar with composer)
PHP Usage
1.) Use your autoloader (if not already done via Composer autoloader)
2.) Add some external packages with connection to the local or remote services.
3.) Connect the "kalanis\kw_images\FilesHelper" into your app. Extends it for setting your case.
4.) Extend your libraries by interfaces inside the package.
5.) Just call setting and render in controllers
// Somewhere in DI return function ($params): \kalanis\kw_images\Content\Images { return (new \kalanis\kw_images\Access\Factory())->getImages($params); }
// Classes class ProcessImages { public function __construct( // ... protected readonly \kalanis\kw_images\Content\Images $images, // ... ) {} public function rotate(string $file, float $angle): bool { $path = (new \kalanis\kw_paths\ArrayPath())->setString($file); return $this->images->rotate($path->getArray(), $angle); } }
Changes
- 1.0 - initial version
- 2.0 - has remote as storage, no volume operation directly here
- 3.0 - has updated paths and following libraries
- 4.0 - has updated code style and all libraries underneath
- 5.0 - uses DateTime, tests with separated classes
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-03-06