php - Namespace/Group/key identification -
when using laravel 4 config class, can phone call config::set('namespace::file.key', 'new value') , follow process:
check if there file called file. if there is, set (in memory) value of:
key key in file file from namespace namespace (which translates package) to new value
if there not, phone call gets silently translated config::set('namespace::config.file.key', 'new value') sets (in memory) value of:
key sub-key in file array in config file from namespace namespace (which translates package) to new value
which because dealing in-memory, works fine.
but, if wanted physically save changes create when calling config::set(...?
the issue run is, how know if wanting create new grouping (aka file) called file if not exist, , set key key within that? or if using shorthand reference config group?
my thinking except couple of exceptions, assume first section (exploded on .) after namespace file/group, wondering if goes against "laravelian" or of there border cases have missed?
config::set('key', 'value') == config::set('config.key', 'value') exception sets value of key value in config file (no namespace) config::set('namespace::key', 'value') == config::set('namespace::config.key', 'value') exception sets value of key in config file of namespace namespace value config::set('file.key', 'value') sets value of key in file file value (no namespace) config::set('namespace::file.key', 'value') sets value of key in file file of namespace namespace value config::set('namespace::file.key.arrk1.arrk2', 'value') sets value of arrk2 in arrk1 array of key key in file file of namespace namespace value
php laravel
No comments:
Post a Comment