<?php
/**
 * Class ServiceFactory
 * User: ThurData
 * Date: 2019-09-12
 * Time: 10:21
 * @package ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Helpers
 */

namespace ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Helpers;


use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Repository\ClassOfServices;
use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Services\Create\CreateConfigOptionAccountOld;
use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Services\Create\CreateCustomAccountOld;

class ServiceFactory
{

    /**
     * @param $type
     * @return CreateCustomAccountOld
     */
    public static function createAccount($type)
    {
        switch ($type)
        {
            case ClassOfServices::CUSTOM_KERIO:
                $service = new CreateCustomAccountOld();
                break;
            case ClassOfServices::KERIO_CONFIG_OPTIONS:
                $service = new CreateConfigOptionAccountOld();
                break;
        }

        return $service;
    }

}