title: How get basepath from model or helper en Zend Framework 3
body: <p>I recently decided to use Zend Framework 3 after 3 years of using Zend Framework 1. This decision has given me headaches, Zend 3 instead of making things easier made things more difficult.</p>
  
  <p>In Zend 1, I customize the url for the selected template in the database as follows:</p>
  
  <pre><code>public function getUrl(string $file = '')
  {
      if($this-&gt;_helperBaseUrl === null) {
          $this-&gt;_helperBaseUrl = new Zend_View_Helper_BaseUrl();
      }
      return $this-&gt;_helperBaseUrl-&gt;baseUrl($file);
  }
  
  public function getSkinUrl(string $file = '')
  {
      $themePath = 'themes/my-theme/'; //get from database
      return $this-&gt;getUrl($themePath . ltrim($file, '/\\'));
  }
  </code></pre>
  
  <p>Then in any part of the application (models, helpers, plugins and views) I can access this function like this:</p>
  
  <pre><code>//view/scripts/index/index.phtml
  $url_logo = My::app()-&gt;getSkinUrl('logo.jpg');
  //this return http://example.com/themes/my-theme/logo.jpg
  </code></pre>
  
  <p>In Zend 3 it has been very difficult for me. Does anyone know of any way to do it in Zend 3? Or How to get the baseUrl from a model in Zend 3?</p>