How do I access the getServiceLocator in Model ZF2
问题 I am trying to access the getServiceLocator function in a model. It works in the controller but when I move it into a model I get NULL when trying to access. Call to a member function get() on null It seemed like below link offered a comparable solution but I had trouble implementing Use another module in our custom helper in zend framework 2 Below is the code I am trying to run in a model. use Zend\ServiceManager\ServiceLocatorAwareInterface; use Zend\ServiceManager\ServiceLocatorInterface;