PHP Класс Bolt\Composer\PackageManager

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$app Silex\Application
$started boolean
$useSsl boolean

Открытые методы

Метод Описание
__construct ( Silex\Application $app ) Constructor.
checkPackage ( ) : array Check for packages that need to be installed or updated.
dependsPackage ( string $packageName, string $constraint ) Find which packages cause the given package to be installed.
dumpAutoload ( ) Dump fresh autoloader.
getAllPackages ( ) : Bolt\Composer\PackageCollection Get packages that a properly installed, pending installed and locally installed.
getMessages ( ) : string[] Get the stored messages.
getOutput ( ) : string Return the output from the last IO.
initJson ( string $file, array $data = [] ) Initialise a new JSON file.
installPackages ( ) : integer Install configured packages.
prohibitsPackage ( string $packageName, string $constraint ) Find which packages prevent the given package from being installed.
removePackage ( array $packages ) : integer Remove packages from the root install.
requirePackage ( array $packages ) : integer Require (install) packages.
searchPackage ( array $packages ) : array Search for packages.
showPackage ( string $target, string $package = '', string $version = '', boolean $root = false ) : array Show packages.
updatePackage ( array $packages ) : integer Update packages in the root install.
useSsl ( ) : boolean Check if we can/should use SSL/TLS/HTTP2 or HTTP.

Приватные методы

Метод Описание
linkConfig ( Bolt\Extension\ResolvedExtension $extension ) : string Return the URI for a package's config file edit window.
linkReadMe ( Bolt\Extension\ResolvedExtension $extension ) : string Return the URI for a package's readme.
ping ( boolean $addQuery = false ) Ping site to see if we have a valid connection and it is responding correctly.
setup ( ) Set up function.
updateJson ( ) Set up Composer JSON file.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Silex\Application $app )
$app Silex\Application

checkPackage() публичный Метод

Check for packages that need to be installed or updated.
public checkPackage ( ) : array
Результат array

dependsPackage() публичный Метод

Find which packages cause the given package to be installed.
public dependsPackage ( string $packageName, string $constraint )
$packageName string
$constraint string

dumpAutoload() публичный Метод

Dump fresh autoloader.
public dumpAutoload ( )

getAllPackages() публичный Метод

Get packages that a properly installed, pending installed and locally installed.
public getAllPackages ( ) : Bolt\Composer\PackageCollection
Результат Bolt\Composer\PackageCollection

getMessages() публичный Метод

Get the stored messages.
public getMessages ( ) : string[]
Результат string[]

getOutput() публичный Метод

Return the output from the last IO.
public getOutput ( ) : string
Результат string

initJson() публичный Метод

Initialise a new JSON file.
public initJson ( string $file, array $data = [] )
$file string File to initialise
$data array Data to be added as JSON paramter/value pairs

installPackages() публичный Метод

Install configured packages.
public installPackages ( ) : integer
Результат integer 0 on success or a positive error code on failure

prohibitsPackage() публичный Метод

Find which packages prevent the given package from being installed.
public prohibitsPackage ( string $packageName, string $constraint )
$packageName string
$constraint string

removePackage() публичный Метод

Remove packages from the root install.
public removePackage ( array $packages ) : integer
$packages array array Indexed array of package names to remove
Результат integer 0 on success or a positive error code on failure

requirePackage() публичный Метод

Require (install) packages.
public requirePackage ( array $packages ) : integer
$packages array array Associative array of package names/versions to remove Format: ['name' => '', 'version' => '']
Результат integer 0 on success or a positive error code on failure

searchPackage() публичный Метод

Search for packages.
public searchPackage ( array $packages ) : array
$packages array array Indexed array of package names to search
Результат array List of matching packages

showPackage() публичный Метод

Show packages.
public showPackage ( string $target, string $package = '', string $version = '', boolean $root = false ) : array
$target string
$package string
$version string
$root boolean
Результат array

updatePackage() публичный Метод

Update packages in the root install.
public updatePackage ( array $packages ) : integer
$packages array array Indexed array of package names to update
Результат integer 0 on success or a positive error code on failure

useSsl() публичный Метод

Check if we can/should use SSL/TLS/HTTP2 or HTTP.
public useSsl ( ) : boolean
Результат boolean

Описание свойств

$app защищенное свойство

protected Application,Silex $app
Результат Silex\Application

$started защищенное свойство

protected bool $started
Результат boolean

$useSsl защищенное свойство

protected bool $useSsl
Результат boolean