Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Normal
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?
I still don't understand how this would work
Right now, \XF\Mvc\Entity\Manager::create doesn't have a return type at all.
\XF\Mvc\Entity\Manager::create
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)?
\XF\Entity\Phrase
\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?
Phrase::getStructue
We use essential cookies to make this site work, and optional cookies to enhance your experience.
See further information and configure your preferences