It is possible to create helper class to do this..
<?php
class Zend_View_Helper_GetSiteUrl
{
function getSiteUrl()
{
$site_url = 'http://localhost/zend/';
return $site_url;
}
}
But is there any issue of using this Helper Function in the Controller & Views like :
<td><a href='<?php echo $this->getSiteUrl(); ?>pages/edit/id/<?php echo $this->id; ?>'>Edit</a>
Inside the controller:
$bugReportForm->setAction($this->view->getSiteUrl().'pages/edit');