So, I have something like this:
$r = $this->app->record('users_2fa');
$list = $r->eq('user_id', 0)->find()->toArray();
That $list values in latte template can be accessed like {$list['user_id']} . But, if I want to make it {$list.user_id} I must do this abomination:
$r = $this->app->record('users_2fa');
$data = $r->eq('user_id', 0)->find()->toArray();
$list = new \ArrayObject($data, \ArrayObject::ARRAY_AS_PROPS);
Now {$list.user_id} works.
It would immensely helpful to have something like this:
$r = $this->app->record('users_2fa');
$list = $r->eq('user_id', 0)->find()->toObject();
P.S. Or just like I have mutilated F3:
$r = $this->app->record('users_2fa');
$list = $r->eq('user_id', 0)->find()->cast(); // if 'true' passed then it makes objects, otherwise - arrays
So, I have something like this:
That $list values in latte template can be accessed like {$list['user_id']} . But, if I want to make it {$list.user_id} I must do this abomination:
Now {$list.user_id} works.
It would immensely helpful to have something like this:
P.S. Or just like I have mutilated F3: