endroid/asset 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

endroid/asset

Composer 安装命令:

composer require endroid/asset

包简介

Endroid Asset

README 文档

README

By endroid

Latest Stable Version Build Status Total Downloads License

Library for quick and easy asset management.

Read the blog for more information on why I created this library.

  • ControllerAsset: generates the string from a controller action and parameters.
  • TemplateAsset: generates the string from a template and parameters.
  • FileAsset: generates the string by loading the contents of a file.
  • UrlAsset: simply contains a string which is returned when requested.
  • DataAsset: simply contains a string which is returned when requested.
  • CacheAsset: wraps any of the above in a cache to optimize performance.

All implement AssetInterface and provide the method: getData().

Usage

The easiest way to work with assets is by letting the factory create assets for you. This allows you to create your assets without worrying about the necessary dependencies.

$dataAsset = $assetFactory->create([
   'controller' => CoverController::class,
   'parameters' => ['title' => 'My PDF', 'date' => new DateTime()],
   'cache_key' => 'cover',
   'cache_expires_after' => 3600,
   'cache_clear' => true, // use to purge any previously cached data
]);

Installation

Use Composer to install the library.

$ composer require endroid/asset

When you use Symfony, the installer makes sure that services are automatically wired. If this is not the case you can find the configuration files in the .install/symfony folder.

Versioning

Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatible changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading.

License

This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.

统计信息

  • 总下载量: 47.13k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-04-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固