class Packages (View source)

Methods

void
__construct(string $path = null)

Create a Inphinit\Packages instance.

array
logs()

Get log

int
auto()

Auto import composer packages

int|bool
inAutoload()

Load ./system/boot/namespaces.php classes

int|bool
classmap()

Load autoload_classmap.php classes

int|bool
psr0()

Load autoload_namespaces.php classes, used by PSR-0 packages

int|bool
psr4()

Load autoload_psr4.php classes, used by PSR-4 packages

bool
save(string $path)

Save imported packages path to file in PHP format

array
getLibs()

Return array of libs

static string|null
version(string $name)

Get package version from composer.lock file

__destruct()

No description

Details

void __construct(string $path = null)

Create a Inphinit\Packages instance.

Parameters

string $path

Define composer path, like ./vendor/composer (if null or not defined, assume ./system/vender)

Return Value

void

Exceptions

Exception

array logs()

Get log

Return Value

array

int auto()

Auto import composer packages

Return Value

int

int|bool inAutoload()

Load ./system/boot/namespaces.php classes

Return Value

int|bool

Return total packages loaded, if namespaces.php is not accessible return false

int|bool classmap()

Load autoload_classmap.php classes

Return Value

int|bool

Return total packages loaded, if autoload_classmap.php is not accessible return false

int|bool psr0()

Load autoload_namespaces.php classes, used by PSR-0 packages

Return Value

int|bool

Return total packages loaded, if autoload_namespaces.php is not accessible return false

int|bool psr4()

Load autoload_psr4.php classes, used by PSR-4 packages

Return Value

int|bool

Return total packages loaded, if autoload_psr4.php is not accessible return false

bool save(string $path)

Save imported packages path to file in PHP format

Parameters

string $path

File to save packages paths, eg. /foo/namespaces.php

Return Value

bool

Exceptions

Exception

array getLibs()

Return array of libs

Return Value

array

static string|null version(string $name)

Get package version from composer.lock file

Parameters

string $name

set package for detect version

Return Value

string|null

__destruct()

No description