original_string: protected static function generate_base_url()
  	{
  		$base_url = '';
  		if(\Input::server('http_host'))
  		{
  			$base_url .= \Input::protocol().'://'.\Input::server('http_host');
  		}
  		if (\Input::server('script_name'))
  		{
  			$common = get_common_path(array(\Input::server('request_uri'), \Input::server('script_name')));
  			$base_url .= $common;
  		}
  
  		// Add a slash if it is missing and return it
  		return rtrim($base_url, '/').'/';
  	}
code: protected static function generate_base_url()
  	{
  		$base_url = '';
  		if(\Input::server('http_host'))
  		{
  			$base_url .= \Input::protocol().'://'.\Input::server('http_host');
  		}
  		if (\Input::server('script_name'))
  		{
  			$common = get_common_path(array(\Input::server('request_uri'), \Input::server('script_name')));
  			$base_url .= $common;
  		}
  
  		// Add a slash if it is missing and return it
  		return rtrim($base_url, '/').'/';
  	}
code_tokens: protected static function generate_base_url ( ) { $ base_url = '' ; if ( \ Input :: server ( 'http_host' ) ) { $ base_url .= \ Input :: protocol ( ) . '://' . \ Input :: server ( 'http_host' ) ; } if ( \ Input :: server ( 'script_name' ) ) { $ common = get_common_path ( array ( \ Input :: server ( 'request_uri' ) , \ Input :: server ( 'script_name' ) ) ) ; $ base_url .= $ common ; } // Add a slash if it is missing and return it return rtrim ( $ base_url , '/' ) . '/' ; }
docstring: Generates a base url.
  
  @return  string  the base url
docstring_tokens: Generates a base url .