ServiceFactory.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Class ServiceFactory
  4. * User: ThurData
  5. * Date: 2019-09-12
  6. * Time: 10:21
  7. * @package ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Helpers
  8. */
  9. namespace ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Helpers;
  10. use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Repository\ClassOfServices;
  11. use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Services\Create\CreateConfigOptionAccountOld;
  12. use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Services\Create\CreateCustomAccountOld;
  13. class ServiceFactory
  14. {
  15. /**
  16. * @param $type
  17. * @return CreateCustomAccountOld
  18. */
  19. public static function createAccount($type)
  20. {
  21. switch ($type)
  22. {
  23. case ClassOfServices::CUSTOM_KERIO:
  24. $service = new CreateCustomAccountOld();
  25. break;
  26. case ClassOfServices::KERIO_CONFIG_OPTIONS:
  27. $service = new CreateConfigOptionAccountOld();
  28. break;
  29. }
  30. return $service;
  31. }
  32. }