Skip to content

A small utility library for handling metadata parsing and expansion.

License

Notifications You must be signed in to change notification settings

nacosvel/package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nacosvel Package

A small utility library for handling metadata parsing and expansion.

GitHub Tag Total Downloads Packagist Version Packagist PHP Version Support Packagist License

Installation

You can install the package via Composer:

composer require nacosvel/package

Interface Reference

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;

Quick Examples

$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');

License

Nacosvel Package is made available under the MIT License (MIT). Please see License File for more information.

About

A small utility library for handling metadata parsing and expansion.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages