Skip to content
PHP Ecosystem
Explore

LocalPackage

API reference › Foxy › Native › LocalPackage

final readonly classFoxy\Native\LocalPackage
Sourcesrc/Native/LocalPackage.php

Represents a local file: package of the root manifest as the resolver selects it: a fixed version and the requirements its own manifest declares.

PropertyTypeDescriptionDefined by
$name readonly constructorstringPackage name, the source of its requirements.LocalPackage
$path readonly constructorstringLocal package directory: the manifest’s file: value without the prefix, as written.LocalPackage
$requirements readonly constructorlist<Requirement>Dependencies, non-optional peers, and optional dependencies it declares.LocalPackage
$version readonly constructorstringVersion declared by its package.json (0.0.0 when absent).LocalPackage
MethodDescriptionDefined by
__construct()Describes a local package selected by the native resolver.LocalPackage
public function __construct(string $name, string $version, string $path, list<Foxy\Native\Requirement> $requirements)

Describes a local package selected by the native resolver.

Parameters

ParameterTypeDescription
$namestringPackage name, the source of its requirements.
$versionstringVersion declared by its package.json (0.0.0 when absent).
$pathstringLocal package directory: the manifest’s file: value without the prefix, as written.
$requirementslist<Requirement>Dependencies, non-optional peers, and optional dependencies it declares.