Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Abstraction layer for providing contents from different sources

License

NotificationsYou must be signed in to change notification settings

endroid/asset

Repository files navigation

Byendroid

Latest Stable VersionBuild StatusTotal DownloadsLicense

Library for quick and easy asset management.

Read theblogfor 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 foryou. This allows you to create your assets without worrying about the necessarydependencies.

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

Installation

UseComposer to install the library.

$ composer require endroid/asset

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

Versioning

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

License

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

About

Abstraction layer for providing contents from different sources

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp