Hi there !
I've been playing with Phalcon for a while, and in my current project I need CSS assets minification. I know that Phalcon has a built-in CSS min library, but this library breaks relative URL's in CSS, if the target path of the minified file is different from the source path.
So, I thought I might implement the \Phalcon\Assets\FilterInterface, and use my custom filter to fix this issue. However, I noticed that the filter method of that interface only receives the string with the actual content of the file as parameter.
I tried, but I couldn't find a way of getting the source path of the resource inside of the filter method. Am I missing something?
In case I am not, I wonder if passing the whole resource wouldn't be a better option, instead of passing exclusively the content of the file. The content would still be accessible through the $resource->getContent() method, and it would provide a lot of freedom to the developers when implementing filters for the AssetsManager.
Obviously there's also the issue of breaking backwards compatibility, but that is why I created a discussion, and not a new feature request.
Thanks in advance !