Scalr\Model\Entity\FarmRole::getServerImport PHP Method

getServerImport() public method

Return ServerImport class
public getServerImport ( User $user ) : AbstractServerImport
$user Scalr\Model\Entity\Account\User
return Scalr\Server\Import\AbstractServerImport
    public function getServerImport($user)
    {
        $path = sprintf("Scalr/Server/Import/Platforms/%sServerImport", ucfirst(strtolower($this->platform)));
        if (!file_exists(SRCPATH . '/' . $path . '.php')) {
            throw new NotSupportedException(sprintf('Platform "%s" is not supported', $this->platform));
        }
        $cls = str_replace('/', '\\', $path);
        return new $cls($this, $user);
    }