strukt/pkg-asset

简单资产查找器

安装: 23

依赖项: 0

建议者: 0

安全: 0

星星: 0

观察者: 1

分支: 0

开放性问题: 0

类型:strukt-module

v1.0.7-alpha 2023-07-30 11:40 UTC

This package is auto-updated.

Last update: 2024-09-06 20:06:40 UTC


README

安装

composer require strukt/pkg-asset:v1.0.6-alpha

如果需要,您需要安装中间件、提供者和命令

./console publish:package pkg-asset

简单资产管理器

$finder = new \Strukt\Asset($root_dir, $static_dir);
$finder->exists("/js/script.js");
$finder->getInfo("/js/script.js");//SplFileInfo
$finder->get("/js/script.js");//returns contents of file

图片缩放

$image = new \Gumlet\ImageResize();
$image = new \Gumlet\ImageResize('image.jpg');
$image->scale(50);
$image->save('image2.jpg')

$image = new \Gumlet\ImageResize('image.jpg');
$image->resizeToHeight(500);
$image->save('image2.jpg')

有关更多关于 Gumlet 的信息,请参阅 Github 上的 Gumlet/ImageResize