<?php

class FormFactory
{
    public static function getForm($formType, $name, $phone, $email = null, $uploadFile = null):FormAbstract
    {
        if ($formType === 'callback'){
            return new CallbackForm($name, $phone);
        }
        elseif($formType === 'EmailForm'){
            return new CallbackEmail($name, $phone, $email, $uploadFile);
        } else {
            return null;
        }
    }
}