class Packages (View source)

Methods

void
__construct(string $path)

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
get()

Get libs

static string|null
version(string $name)

Get package version from composer.lock file

Details

void __construct(string $path)

Create a Inphinit\Packages instance.

Parameters

string $path Setup composer path, like ./vendor/composer

Return Value

void

Exceptions

InvalidArgumentException

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

InvalidArgumentException

array get()

Get 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