public static function createType($type)
    {
        if (!isset(static::$typeClasses[$type])) {
            throw new InvalidArgumentException('The asset type "'.$type.'" does not exist, only "'.implode('", "', static::getTypes()).'" are accepted');
        }

        $class = static::$typeClasses[$type];

        return new $class();
    }
public static function createType($type)
    {
        if (!isset(static::$typeClasses[$type])) {
            throw new InvalidArgumentException('The asset type "'.$type.'" does not exist, only "'.implode('", "', static::getTypes()).'" are accepted');
        }

        $class = static::$typeClasses[$type];

        return new $class();
    }
public static function createType ( $ type ) { if ( ! isset ( static :: $ typeClasses [ $ type ] ) ) { throw new InvalidArgumentException ( 'The asset type "' . $ type . '" does not exist, only "' . implode ( '", "' , static :: getTypes ( ) ) . '" are accepted' ) ; } $ class = static :: $ typeClasses [ $ type ] ; return new $ class ( ) ; }
Creates asset type.

@param string $type

@throws InvalidArgumentException When the asset type does not exist

@return AssetTypeInterface
Creates asset type .