public static function create(array $config)
    {
        if (false === array_key_exists('transport', $config)) {
            throw new MisconfigurationException(sprintf('Can not create Transport : missing classname.'));
        }

        $classname = $config['transport'];
        if (false === class_exists($classname)) {
            throw new MisconfigurationException(sprintf('Can not create Transport : unknown classname %s.', $classname));
        }

        return new $classname($config);
    }
public static function create(array $config)
    {
        if (false === array_key_exists('transport', $config)) {
            throw new MisconfigurationException(sprintf('Can not create Transport : missing classname.'));
        }

        $classname = $config['transport'];
        if (false === class_exists($classname)) {
            throw new MisconfigurationException(sprintf('Can not create Transport : unknown classname %s.', $classname));
        }

        return new $classname($config);
    }
public static function create ( array $ config ) { if ( false === array_key_exists ( 'transport' , $ config ) ) { throw new MisconfigurationException ( sprintf ( 'Can not create Transport : missing classname.' ) ) ; } $ classname = $ config [ 'transport' ] ; if ( false === class_exists ( $ classname ) ) { throw new MisconfigurationException ( sprintf ( 'Can not create Transport : unknown classname %s.' , $ classname ) ) ; } return new $ classname ( $ config ) ; }
Creates a new AbstractTransport instance.

@param array $config An array containing the key 'transport' with the classname to use
and optional options depending on the transport to start

@return \BackBee\Util\Transport\AbstractTransport

@throws MisconfigurationException occures if $config is not valid
Creates a new AbstractTransport instance .