Created
October 18, 2012 11:24
-
-
Save basz/3911163 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| goal = get filtermanager to act as plugin manager and have invokables and factories for all of the assetic filters and thus have a generic way to configure those filters. | |
| a call to | |
| $filterManager->setFilters($path, AssetInterface $asset) | |
| must be able to hanlde the following configuration settings. | |
| // can be invokable || factory | |
| 'filters' => array('some/path' => 'somefilter') // by name // auto registered by AssetFilterManager | |
| // or | |
| 'filters' => array('some/path' => '\SxBootstrap\Service\BootstrapFilter') // by service | |
| // or | |
| 'filters' => array('some/path' => array('somefilter', 'other_filter')); // multiple filters | |
| // or | |
| 'filters' => array('some/path' => array('somefilter' => array('some_option'=>'value'), ...); // filter with invokable __construct options || factory __construct options | |
| // since you don't want to specify some options for every filtered path over and over configuration should be merged, I suggest asset_manager_filters | |
| 'filters_configs' => array( | |
| 'less' => array( | |
| 'node_bin' => '/usr/bin/node', | |
| 'node_paths' => array(), | |
| ), | |
| // ... | |
| ), | |
| // notes | |
| 1. added custom filter by factories to the global sm should still be possible if we set the plugin manager to peer into its parent. | |
| 2. but a preferred way might add those to the filtermanager directly, like view helpers are not added to the global SM. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment