BIMFactory.php 498 B

1234567891011121314151617181920
  1. <?php
  2. namespace App\Libraries\BIM;
  3. use App\Libraries\BIM\BlackHole\BlackHole;
  4. use App\Libraries\BIM\Contacts\BIMContact;
  5. use App\Libraries\BIM\Glendale\Glendale;
  6. class BIMFactory
  7. {
  8. public static function make(string $driver = null): BIMContact
  9. {
  10. $driver = $driver ? $driver : config("bim.default");
  11. return match ($driver) {
  12. BIMDriverEnum::BLACK_HOLE->value => new BlackHole(),
  13. BIMDriverEnum::GLENDALE->value => new Glendale(),
  14. };
  15. }
  16. }