<?php

class Pampa_Util_Link {

  /**
   * Pprepara a URL validando se existe
   * http:// na frente do link
   * @param String $str
   * @return String
   */
  public static function prep($str = '') {
    if ($str == 'http://' OR $str == '') {
      return '';
    }

    if (substr($str, 0, 7) != 'http://' && substr($str, 0, 8) != 'https://') {
      $str = 'http://'.$str;
    }

    return $str;
  }
  

}