class Import (View source)

Methods

__construct()

No description

array
logs()

Get log

int
auto()

Auto import composer packages

int|false
inAutoload()

Load ./system/boot/namespaces.php classes

int
classmap()

Load autoload_classmap.php classes

int
files()

Load autoload_files.php classes

int
psr4()

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

int
psr0()

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

setItem(string $prefix, string $path)

Associate namespace prefix to folder

array
getLibs()

Return array of libs

bool
save(string $path)

Save imported packages path to file in PHP format

bool
saveFiles(string $path, bool $removeEmpty = false)

Save imported autoload files path to file in PHP format

Details

__construct()

No description

array logs()

Get log

Return Value

array

int auto()

Auto import composer packages

Return Value

int

int|false inAutoload()

Load ./system/boot/namespaces.php classes

Return Value

int|false

Returns the total number of loaded packages, if namespaces.php is not accessible returns false

int classmap()

Load autoload_classmap.php classes

Return Value

int

Return total packages loaded

int files()

Load autoload_files.php classes

Return Value

int

Return total packages loaded

int psr4()

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

Return Value

int

Return total packages loaded

int psr0()

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

Return Value

int

Return total packages loaded, if autoload_namespaces.php

setItem(string $prefix, string $path)

Associate namespace prefix to folder

Parameters

string $prefix
string $path

Exceptions

Exception

array getLibs()

Return array of libs

Return Value

array

bool save(string $path)

Save imported packages path to file in PHP format

Parameters

string $path

File to save packages paths (e.g., /foo/namespaces.php)

Return Value

bool

bool saveFiles(string $path, bool $removeEmpty = false)

Save imported autoload files path to file in PHP format

Parameters

string $path

File to save packages paths (e.g., /foo/files.php)

bool $removeEmpty

Remove the destination file if there are no files to be included

Return Value

bool