public static function setDriver($driver)
    {

        if (!self::isInstanceOf($driver, YamlInterface::class)) {
            if (self::isString($driver) || self::isStringObject($driver)) {
                $driver = StdObjectWrapper::toString($driver);
                $driver = new $driver;
                if (self::isInstanceOf($driver, YamlInterface::class)) {
                    self::$customDriver = $driver;

                    return;
                }
            }
            throw new YamlException(AbstractException::MSG_INVALID_ARG, ['$driver', YamlInterface::class]);
        }
        self::$customDriver = $driver;

        return;
    }