| Methods |
public
static
|
loadPackage(string $package): boolean
Loads a package.
Parameters
| $package |
The id of the package to be loaded.
|
Returns
|
#
|
public
static
|
validatePackageId(string $packageId): boolean
Checks if a string could be a valid package id, this does not check package existance.
Checks if a string could be a valid package id, this does not check package existance.
Parameters
| $packageId |
The string to be tested.
|
Returns
True if the string is valid, false otherwise.
|
#
|
public
static
|
validatePackageInfo(array $info): boolean
Checks if some package info is valid.
Checks if some package info is valid.
Parameters
| $info |
The array to be checked.
|
Returns
Weather the array is valid package info.
|
#
|
public
static
|
getPackageDependencies(array $packageInfo): array|false
Gets the dependencies of a pakage.
Gets the dependencies of a pakage.
Parameters
| $packageInfo |
The package info.
|
Returns
The dependencies on success or false on failure.
|
#
|
public
static
|
doesPackageExist(string $packageId, boolean $online): boolean
Checks weather a package exists.
Checks weather a package exists.
Parameters
| $packageId |
The id to check for.
|
| $online |
Weather to check online or local.
|
Returns
Weather the package exists.
|
#
|
public
static
|
getPackageInfo(string $packageId, boolean $online): array|false
Gets a packages package info, see readme for package info.
Gets a packages package info, see readme for package info.
Parameters
| $packageId |
The if of the package.
|
| $online |
Weather to get the info from online or locally.
|
Returns
The package info on success or false on failure.
|
#
|
public
static
|
getPackageVersionInfo(string $packageId, integer $version): array|false
Checks online for a specific package versions package info.
Checks online for a specific package versions package info.
Parameters
| $packageId |
The id of the package.
|
| $version |
The version to check.
|
Returns
The package info on success or false on failure.
|
#
|
public
static
|
downloadPackage(
string $packageId,
integer|boolean $version = false,
boolean $getDependencies = true,
boolean $load = true,
): boolean
Downloads a package.
Parameters
| $packageId |
The id of the package to download.
|
| $version |
The version to download or false, which makes it download the latest version.
|
| $getDependencies |
Weather to also download the packages dependencies.
|
| $load |
Weather to load the package after it has been downloaded.
|
Returns
|
#
|
public
static
|
updatePackages(): boolean
Updates all the packages.
Updates all the packages.
Returns
|
#
|
public
static
|
getPackageFileDependencies(string $packageId, boolean $getLatestVersions = true): array|false
Reads the main.php file in a package and checks for what classes it uses.
Reads the main.php file in a package and checks for what classes it uses.
Parameters
| $packageId |
The id of the package.
|
| $getLatestVersions |
Weather to check the latest versions of the dependencies online.
|
Returns
An estimation of the dependencies on success or false on failure.
|
#
|
public
static
|
getLoadedPackages(): array
Gets all the loaded packages and their versions.
Gets all the loaded packages and their versions.
|
#
|
public
static
|
getLatestPhpUrl(): string|false
Gets the download url for the latest thread safe x64 windows build of php from windows.php.net.
Gets the download url for the latest thread safe x64 windows build of php from windows.php.net.
Returns
The url of the latest zip or false on failure.
|
#
|
public
static
|
isPhpFileSyntaxOk(string $file): boolean
Checks the syntax of a php file with php -l.
Checks the syntax of a php file with php -l.
Parameters
| $file |
The php file to be checked.
|
Returns
Weather the php file has valid syntax.
|
#
|