as I can bring an element of an array config->get('array.element')?
I try:
$this->config->get('database.adapter');
there should be some way to get an item from a list.
$this->config->get('database')->apadter; ?
$this->config->get('database')->apadter;
?
hahah
the good from the get function is that you can set a default value.
if to a default value, you would do:
$adapter = $this->config->database->adapter ? $this->config->database->adapter : 'MySql' ;
@Izo hahahaha -> finger error. That happens when you do not use CTRL-C
i dont think its good practise to have if config .....
you need to put some getters in the config, or set/update those properties after init
You're telling me I have to extend Phalcon\config
its up to you how you gonna do it, but in my mind config should be something solid that you can always relay on, because you hard coded it yourself. Nothing should go wrong. At least in my mind. I could be wrong
'Phalcon/config' is mutable. but not have set()
New feature in 3.1.0
https://github.com/phalcon/cphalcon/issues/12221