Handles all the loading, unloading and management of packages.

package Core
subpackage Packages

 Methods

Checks if the given package exists.

exists(string $package) : bool | string

Parameters

$package

string

The package name

Returns

boolstringPath to the package found, or false if not found

Loads the given package.

load(string | array $package, string | null $path) : bool

If a path is not given, if will search through the defined package_paths. If not defined, then PKGPATH is used. It also accepts an array of packages as the first parameter.

Parameters

$package

stringarray

The package name or array of packages.

$path

stringnull

The path to the package

Exceptions

\PackageNotFoundException

Returns

boolTrue on success

Checks if the given package is loaded, if no package is given then all loaded packages are returned.

loaded(string | null $package) : bool | array

Parameters

$package

stringnull

The package name or null

Returns

boolarrayWhether the package is loaded, or all packages

Unloads a package from the stack.

unload(string $package) : void

Parameters

$package

string

The package name

 Properties

 

<p>Holds all the loaded package information.</p>

$packages : array