IRefillOil.php 602 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace refill;
  3. use mtopcard;
  4. use Log;
  5. abstract class IRefillOil extends IRefill
  6. {
  7. public function __construct($cfgs)
  8. {
  9. parent::__construct($cfgs);
  10. foreach ($cfgs['card_type'] as $ctype)
  11. {
  12. $ctype = strtolower($ctype);
  13. if ($ctype == "petrochina") {
  14. $this->mCardType[] = mtopcard\PetroChinaCard;
  15. } elseif ($ctype == "sinopec") {
  16. $this->mCardType[] = mtopcard\SinopecCard;
  17. } else {
  18. Log::record("Oil Provider has no name", Log::ERR);
  19. }
  20. }
  21. }
  22. }