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

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

This package is auto-updated.

Last update: 2024-03-30 00:30:58 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.