-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reference Configure::read settings in ini file (3.0) #258
Comments
I'm going to be pushing some changes soon that will automatically import any and all user defined constants into the configuration files. Would that help with this? |
I suppose a constant could be defined that reads a Config parameter, but that seems a bit hacky, and it might not be desirable to litter the namespace with constants just for this. I plan to try my hands at a UrlRewrite filter during the weekend, and I've already written a similar Config checking implementation for YAML files in my own app, so I can reference other Configs within my own Config. Would you mind if I made a pull request with this feature, and a UrlRewrite filter this weekend? (Probably as separate pulls) |
I'm just in the middle of splitting out the internally bits of this plugin into a standalone library. You might want to wait for that to land, so the pull request will merge reasonably. AssetConfig will be moved out of the plugin, but this plugin could have a subclass that adds Configure reading. Have you considered using |
That would actually make more sense. I was actually about to ask what delimeter you prefer. Sure thing. |
I was thinking about server-side and localhost configuration options.
I know the plugin already has the asset_compress.local.ini option to configure server-side, and localhost options, but that could potentially expose certain executable locations on the server we may not want to show to other developers when configuring filters.
I think a simpler, and more universal solution might be to simply be able to reference Cakephp's configuration file contents (like in the ini file, just write: path = %AssetCompress.Uglifyjs.path%, which would equal to Configure::read('AssetCompress.Uglifyjs.path'))
This way, someone could do a lot of interesting things with their configuration. I, for example, read my config from a YAML file, and use Incenteev's ParameterHandler to update an uncommited parameters.yml file, so it prompts everyone for the missing configuration options when they execute composer install. Paths could also be globally set for the entire app, so if someone uses a filter executable somewhere outside of AssetCompress, now only has to set it at one place.
The text was updated successfully, but these errors were encountered: