I'm using F3 3.7.3. I have a class Config with __get and __set methods implemented. I'm assigning it to 'config' var and reading values from it successfully:
$f3->set('config', new Config());
echo $f3->get('config->foo');
This code ↑ will call magic __get correctly. Setting values through magic __set doesn't work though:
$f3->set('config->foo', 'bar'); // does nothing
Base::ref tries to grab and return a reference to non-existent property. It's later assigned in Base::set but __set is never called.
I can use $f3->get('config')->foo = 'bar' as a workaround, but it's inconsistent.
I'm using F3 3.7.3. I have a class
Config
with__get
and__set
methods implemented. I'm assigning it to'config'
var and reading values from it successfully:This code ↑ will call magic
__get
correctly. Setting values through magic__set
doesn't work though:Base::ref
tries to grab and return a reference to non-existent property. It's later assigned inBase::set
but__set
is never called.I can use
$f3->get('config')->foo = 'bar'
as a workaround, but it's inconsistent.