定制 strukt/pkg-asset 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-12-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固