Hello,
I've custom event:
$eventsManager->fire('user/authorize:beforeLogin', null, $properties);
where's $properties is an array.
event handler:
$eventsManager->attach('user/authorize:beforeLogin', function(\Phalcon\Events\Event $event){
$data = $event->getData();
$data->field = 'my new data';
$event->setData($data);
}, 100);
How can i send $properties as a reference and below in code,and use updated $properties?
I know following way, but it looks ugly and unpractical for me
$properties = (object)$properties;
$eventsManager->fire('user/authorize:beforeLogin', null, $properties);
Any suggestions?