<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
class Engine_View_Helper_AbsoluteUrl extends Zend_View_Helper_Abstract
{
  public function absoluteUrl($url)
  {
    $host = parse_url($url, PHP_URL_HOST);
    if( $host !== null ) {
      return $url;
    }

    return $this->view->serverUrl($url);
  }
}
