samweru / pkg-asset

Asset Finder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Strukt Asset

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.

About

Asset Finder


Languages

Language:PHP 84.3%Language:HTML 15.4%Language:JavaScript 0.2%Language:CSS 0.1%