A small utility library for handling metadata parsing and expansion.
You can install the package via Composer:
composer require nacosvel/package
Nacosvel\Package\Contracts\PackageInterface
- getRootPath(string $path = null): string;
- setRootPath(string $rootPath): static;
- getVendorPath(string $path = null): string;
- setVendorPath(string $vendorPath): static;
- combinePaths(string $basePath, string $relativePath): string;
Nacosvel\Package\Contracts\PackageManifestInterface
- getManifest(string $namespace = null, string ...$args): mixed;
- getPackageManifest(string ...$args): mixed;
- getInstallPath(string $packageName): ?string;
- getInstalledPackages(): array;
$package = new \Nacosvel\Package\PackageManifest();
$package->getRootPath();
$package->getRootPath('composer.json');
$package->getVendorPath();
$package->getVendorPath('composer/installed.json');
$package->getManifest('psr/log', 'extra', 'branch-alias', 'dev-master');
$package->getPackageManifest('name');
$package->getInstalledPackages();
$package->getInstallPath('psr/log');
Nacosvel Package is made available under the MIT License (MIT). Please see License File for more information.