Closed SerafimArts closed 9 years ago
Great idea !
What about extend this idea and add php class wrapper? =) as example:
class Yui
{
public static function compress($inputFile, $output)
{
exec('java -jar yuicompressor.jar ****** // etc
}
}
I would say it depends of your usage of yuicompressor. For instance, we used (i say "used", because we are now using npm packages for this) it with assetic, where you just have to declare the jar path. I'm not against a wrapper, but with a more solid approach. Things like a class named "YuiCompressor" instead of just "Yui", a compress method not static (so that you can pass some parameters to the constrcutor) ,an adapter system to allow usage of third party libraries like process (http://symfony.com/doc/current/components/process.html), a logger, etc...
I'm curious : what is your usage of yuicompressor ?
Add binary