public static function create($package)
    {
        static::_init();
        foreach (static::$_detectors as $name => $callable) {
            $result = $callable($package);
            if ($result instanceof BasePackage) {
                return $result;
            }
        }

        return new GenericPackage($package, '', '');
    }
public static function create($package)
    {
        static::_init();
        foreach (static::$_detectors as $name => $callable) {
            $result = $callable($package);
            if ($result instanceof BasePackage) {
                return $result;
            }
        }

        return new GenericPackage($package, '', '');
    }
public static function create ( $ package ) { static :: _init ( ) ; foreach ( static :: $ _detectors as $ name => $ callable ) { $ result = $ callable ( $ package ) ; if ( $ result instanceof BasePackage ) { return $ result ; } } return new GenericPackage ( $ package , '' , '' ) ; }
Given a full package name, returns an instance of an object representing
that package.

If no matching package is found, `GenericPackage` will be used by default.

@param string $package Full package name. e.g. `vendor-name/package-name`
@return \CMS\Core\Package\BasePackage
Given a full package name returns an instance of an object representing that package .