<?php
/**
 * Class ServiceFactory
 * User: Nessandro
 * Date: 2019-09-12
 * Time: 10:21
 * @package ModulesGarden\Servers\ZimbraEmail\App\Libs\Zimbra\Components\Api\Soap\Helpers
 */

namespace ModulesGarden\Servers\ZimbraEmail\App\Libs\Zimbra\Components\Api\Soap\Helpers;


use ModulesGarden\Servers\ZimbraEmail\App\Libs\Zimbra\Components\Api\Soap\Repository\ClassOfServices;
use ModulesGarden\Servers\ZimbraEmail\App\Libs\Zimbra\Components\Api\Soap\Services\Create\CreateConfigOptionAccountOld;
use ModulesGarden\Servers\ZimbraEmail\App\Libs\Zimbra\Components\Api\Soap\Services\Create\CreateCustomAccountOld;

class ServiceFactory
{

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

        return $service;
    }

}