Reply to thread

I still don't understand how this would work :(


Right now, \XF\Mvc\Entity\Manager::create doesn't have a return type at all.


How can this be changed so that the correct return type (e.g an instance of \XF\Entity\Phrase) can be detected automatically when calling \XF::em()->create(\XF\Entity\Phrase::class)?



Hmm ... I don't see Phrase::getStructue being called multiple times for this example code, nor do I get class redefining errors with XF 2.2.10 / PHP 8.0?


Back
Top Bottom