title: Zend Framework: get public path, get application url
body: <p>Are there some proper Zend methods for:</p>
  
  <p>a) receiving path to /public directory</p>
  
  <p>b) receiving application url</p>
  
  <p>Actually I'm using methods defined in Controller, but it feel right to use ready methods if they exits.</p>
  
  <pre><code>protected function _getApplicationUrl() {
      return $_SERVER['SERVER_NAME'];
  }
  
  protected function _getPublicPath() {
      return realpath(APPLICATION_PATH . '/../public/');
  }
  </code></pre>