src/LdapTools/Factory/AttributeConverterFactory.php
protected static function getInstanceOfConverter($name)
    {
        try {
            $converter = new self::$converterMap[$name]();
        } catch (\Exception $e) {
            throw new \RuntimeException(
                sprintf('Unable to load attribute converter "%s": %s', $name, $e->getMessage())
            );
        }
        if (!($converter instanceof AttributeConverterInterface)) {
            throw new \RuntimeException(sprintf(
                'The attribute converter "%s" must implement \LdapTools\AttributeConverter\AttributeConverterInterface.',
                $name
            ));
        }

        return $converter;
    }
protected static function getInstanceOfConverter($name)
    {
        try {
            $converter = new self::$converterMap[$name]();
        } catch (\Exception $e) {
            throw new \RuntimeException(
                sprintf('Unable to load attribute converter "%s": %s', $name, $e->getMessage())
            );
        }
        if (!($converter instanceof AttributeConverterInterface)) {
            throw new \RuntimeException(sprintf(
                'The attribute converter "%s" must implement \LdapTools\AttributeConverter\AttributeConverterInterface.',
                $name
            ));
        }

        return $converter;
    }
protected static function getInstanceOfConverter ( $ name ) { try { $ converter = new self :: $ converterMap [ $ name ] ( ) ; } catch ( \ Exception $ e ) { throw new \ RuntimeException ( sprintf ( 'Unable to load attribute converter "%s": %s' , $ name , $ e -> getMessage ( ) ) ) ; } if ( ! ( $ converter instanceof AttributeConverterInterface ) ) { throw new \ RuntimeException ( sprintf ( 'The attribute converter "%s" must implement \LdapTools\AttributeConverter\AttributeConverterInterface.' , $ name ) ) ; } return $ converter ; }
Load a specific converter if needed and send it back.

@param string $name
@return AttributeConverterInterface
Load a specific converter if needed and send it back .