PHP 5.2.x Asset management library
Is there anything but Asseti开发者_开发问答c (which I cannot use because of PHP version) that can do asset management?
EDIT: This is about web application assets, like javascript and css, a library to manage and minify them for production, be that on the run or with precompiled assets.
Your best bet is probably to backport Assetic to PHP 5.2. The use
and namespace
statements would need to be replaced with an autoload function and a call to spl_autoload_register()
.
It looks pretty comprehensive, although it might lack the ability to reference an externally hosted script, like calling jQuery from a CDN.
Personally, I use the Smarty template engine, and some prefilter/postfilter functions to handle stylesheet and javascript includes. A similar trick might be possible in another template system, if you're using one.
精彩评论