Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ManifestLoader.php

class ManifestLoader

Hierarchy

  • class \PharIo\Manifest\ManifestLoader

Expanded class hierarchy of ManifestLoader

1 file declares its use of ManifestLoader
PharLoader.php in vendor/phpunit/phpunit/src/Runner/Extension/PharLoader.php

File

vendor/phar-io/manifest/src/ManifestLoader.php, line 15

Namespace

PharIo\Manifest
View source
class ManifestLoader {
    public static function fromFile(string $filename) : Manifest {
        try {
            return (new ManifestDocumentMapper())->map(ManifestDocument::fromFile($filename));
        } catch (Exception $e) {
            throw new ManifestLoaderException(sprintf('Loading %s failed.', $filename), (int) $e->getCode(), $e);
        }
    }
    public static function fromPhar(string $filename) : Manifest {
        return self::fromFile('phar://' . $filename . '/manifest.xml');
    }
    public static function fromString(string $manifest) : Manifest {
        try {
            return (new ManifestDocumentMapper())->map(ManifestDocument::fromString($manifest));
        } catch (Exception $e) {
            throw new ManifestLoaderException('Processing string failed', (int) $e->getCode(), $e);
        }
    }

}

Members

Title Sort descending Modifiers Object type Summary
ManifestLoader::fromFile public static function
ManifestLoader::fromPhar public static function
ManifestLoader::fromString public static function

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal