<?php

abstract class AbstractFactoryTrackingMethod{

  public static function getInstance($code){
    $tracking  = null ;  
    require_once(DIR_SYSTEM . 'library/tracking/'.$code.'.php');
    if(class_exists(ucfirst($code))){                   
         switch ($code) {
             case Type_Tracking::Tp_Correios :
                $tracking = new Correios();
             break;
             default:                

             break;        
         }     
     return $tracking;
    }else{
        throw new Exception("Falha ao instanciar o módulo de rastreio: ".$code);
    }
 }
 
}

?>