strukt/pkg-asset
Composer 安装命令:
composer require strukt/pkg-asset
包简介
Simple Asset Finder
README 文档
README
Installation
composer require strukt/pkg-asset:v1.0.8-alpha
If need be you need to install the middlewares, providers and commands:
./xcli publish:package pkg-asset
Usage
Environment Variables
You may put a reference in .env for your static directory.
rel_static_dir = static
You will also need to make sure you bootstrap.
Env::withFile(".env"); env("root_dir", getcwd());
Simple Asset Manager
// $finder = new \Strukt\Asset($root_dir, $static_dir); // $finder = asset($root_dir, $static_dir); $finder = asset(); $finder->exists("/js/script.js"); $finder->getInfo("/js/script.js");//SplFileInfo $finder->get("/js/script.js");//returns contents of file
Image Resize
$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')
Credits
For more on Gumlet see Gumlet/ImageResize on Github.
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-28