RWOverdijk/AssetManager — pull request #141 by gabrielsomoza (2014-09-03 14:14:08+00:00)
Title: Added a GlobPathStack Resolver

A new resolver that has a slightly higher priority than PathStack and intercepts paths that look like globs.

Among hopefully other advantages, this will allow configuring collections as follows:

```php
array(
'collections' => array(
'js/ember-app.js' => array(
'js/app.js',
'js/authenticator.js', // individual files, resolved by PathStack
'js/router.js',
'js/routes/*', // glob paths, resolved by GlobPathStack
'js/transformations/*',
'js/models/*', // this saves us lazy people a lot of work
'js/components/*',
'js/controllers/*',
),
),
);
```
One gotcha: all files in the glob must have the same MimeType as the first file (creating a MimeResolver for this might be a good idea in the future?). This is enforced anyway if within a collection so it shouldn't be a problem because the collection will throw an exception. But outside a collection (e.g. if using a simple Map resolver) GlobPathStack will probably just concatenate all files as usual and silently serve the result with the MimeType of the first file.