title: How do I access the getServiceLocator in Model ZF2
body: <p>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.  </p>
  
  <pre><code> Call to a member function get() on null
  </code></pre>
  
  <p>It seemed like below link offered a comparable solution but I had trouble implementing</p>
  
  <p><a href="https://stackoverflow.com/questions/21524974/use-another-module-in-our-custom-helper-in-zend-framework-2">Use another module in our custom helper in zend framework 2</a>  </p>
  
  <p>Below is the code I am trying to run in a model.</p>
  
  <pre><code>use Zend\ServiceManager\ServiceLocatorAwareInterface;
  use Zend\ServiceManager\ServiceLocatorInterface;
  
  class FileManager implements ServiceLocatorAwareInterface {
  
  someFunction(){
      $thumbnailer = $this-&gt;getServiceLocator()-&gt;get('WebinoImageThumb');
      }
  }  
  </code></pre>
  
  <p>Thank you
  M</p>