Exemplo n.º 1
0
 private static function init()
 {
     self::$ranges = array(0 => 2, 2 => 3, 3 => 5, 5 => 10, 10 => 11, 11 => 12, 12 => 13, 13 => 14, 14 => 15);
     $historyTable = SeurLib::getSeurCarriers();
     if (!empty($historyTable)) {
         foreach ($historyTable as $historyCarrier) {
             switch ($historyCarrier['type']) {
                 case 'SEN':
                     self::$carrier_seur = new Carrier((int) $historyCarrier['id']);
                     self::$carrier_seur->active = 1;
                     self::$carrier_seur->deleted = 0;
                     break;
                 case 'SEP':
                     self::$carrier_pos = new Carrier((int) $historyCarrier['id']);
                     self::$carrier_pos->active = 0;
                     self::$carrier_pos->deleted = 0;
                     break;
                 case 'SCN':
                     self::$carrier_canarias_m = new Carrier((int) $historyCarrier['id']);
                     self::$carrier_canarias_m->active = 1;
                     self::$carrier_canarias_m->deleted = 0;
                     break;
                 case 'SCE':
                     self::$carrier_canarias_48 = new Carrier((int) $historyCarrier['id']);
                     self::$carrier_canarias_48->active = 1;
                     self::$carrier_canarias_48->deleted = 0;
                     break;
                 default:
             }
         }
     }
 }