简体   繁体   English

PHP 5.2.x 资产管理库

[英]PHP 5.2.x Asset management library

Is there anything but Assetic (which I cannot use because of PHP version) that can do asset management?除了Assetic (由于 PHP 版本,我无法使用)之外,还有什么可以进行资产管理的吗?

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.编辑:这是关于 web 应用程序资产,如 javascript 和 css,一个用于管理和缩小它们以用于生产的库,无论是在运行中还是使用预编译资产。

Your best bet is probably to backport Assetic to PHP 5.2.您最好的选择可能是将 Assetic 反向移植到 PHP 5.2。 The use and namespace statements would need to be replaced with an autoload function and a call to spl_autoload_register() . usenamespace语句需要替换为自动加载 function 和对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.它看起来非常全面,尽管它可能缺乏引用外部托管脚本的能力,例如从 CDN 调用 jQuery。

Personally, I use the Smarty template engine, and some prefilter/postfilter functions to handle stylesheet and javascript includes.就个人而言,我使用 Smarty 模板引擎和一些前置过滤器/后置过滤器函数来处理样式表和 javascript 包括。 A similar trick might be possible in another template system, if you're using one.如果您正在使用另一个模板系统,则可能会在另一个模板系统中使用类似的技巧。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM