public static function create($name)
    {
        $name = strtolower($name);
        $classname = self::__getClassName($name);
        $path = self::__getDriverPath($name);

        if (!is_file($path)) {
            throw new Exception(
                __('Could not find Email Gateway %s.', array('<code>' . $name . '</code>'))
                . ' ' . __('If it was provided by an Extension, ensure that it is installed, and enabled.')
            );
        }

        if (!class_exists($classname)) {
            require_once $path;
        }

        return new $classname;
    }
public static function create($name)
    {
        $name = strtolower($name);
        $classname = self::__getClassName($name);
        $path = self::__getDriverPath($name);

        if (!is_file($path)) {
            throw new Exception(
                __('Could not find Email Gateway %s.', array('<code>' . $name . '</code>'))
                . ' ' . __('If it was provided by an Extension, ensure that it is installed, and enabled.')
            );
        }

        if (!class_exists($classname)) {
            require_once $path;
        }

        return new $classname;
    }
public static function create ( $ name ) { $ name = strtolower ( $ name ) ; $ classname = self :: __getClassName ( $ name ) ; $ path = self :: __getDriverPath ( $ name ) ; if ( ! is_file ( $ path ) ) { throw new Exception ( __ ( 'Could not find Email Gateway %s.' , array ( '<code>' . $ name . '</code>' ) ) . ' ' . __ ( 'If it was provided by an Extension, ensure that it is installed, and enabled.' ) ) ; } if ( ! class_exists ( $ classname ) ) { require_once $ path ; } return new $ classname ; }
Creates a new object from a gateway name.

@param string $name
The gateway to look for
@throws Exception
@return EmailGateway
If the gateway is found, an instantiated object is returned.
If the gateway is not found, an error is triggered.
Creates a new object from a gateway name .