strukt / pkg-asset
Simple Asset Finder
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:strukt-module
Requires
- erusev/parsedown: ^1.7
- gumlet/php-image-resize: dev-master
- league/html-to-markdown: ^5.0
- strukt/contract: v1.0.4-alpha
- strukt/fs: 1.1.0
This package is auto-updated.
Last update: 2025-01-06 20:49:57 UTC
README
Installation
composer require strukt/pkg-asset:v1.0.6-alpha
If need be you need to install the middlewares, providers and commands:
./console publish:package pkg-asset
Simple Asset Manager
$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 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')
For more on Gumlet
see Gumlet/ImageResize on Github.