In github phalcon/forum, some codes like these,why? thanks in advance.
else { $activity->type = 'B'; $activity->posts_id = 1; $activity->posts_replies_id = 1; }
What is your exact question? Those are objects with properties being set for whatever reason / application context - business logic.
https://php.net/manual/en/language.oop5.properties.php
In app/models/UsersBadges.php, why did they set $activity->posts_id = 1? why is it 1? thank you very much in advance.
Hi,
the answer should be in https://github.com/phalcon/forum/blob/master/app/model/ActivityNotifications.php as seen here: https://github.com/phalcon/forum/blob/master/app/model/UsersBadges.php#L49