Свойство | Тип | Описание | |
---|---|---|---|
$_downloadDir | string | Temporary directory, or configuration value where downloads will occur | |
$_downloadedPackages | array | Format of each entry:
array('pkg' => 'package_name', 'file' => '/path/to/local/file',
'info' => array() // parsed package.xml
);
|
|
$_errorStack | array | ||
$_installed | array | Format:
array('package1' => 0, 'package2' => 1, );
|
|
$_internalDownload | boolean | ||
$_options | array | Recognized options: - onlyreqdeps : install all required dependencies as well - alldeps : install all dependencies, including optional - installroot : base relative path to install files in - force : force a download even if warnings would prevent it - nocompress : download uncompressed tarballs |
|
$_packageSortTree | array | Temporary variable used in sorting packages by dependency in {@link sortPkgDeps()} | |
$_preferredState | string | null | Preferred Installation State (snapshot, devel, alpha, beta, stable) | |
$_registry | PEAR_Registry | ||
$_toDownload | array | This is used to prevent downloading a package more than once should it be a dependency
for two packages to be installed.
Format of each entry:
array('package_name1' => parsed package.xml, 'package_name2' => parsed package.xml, ); |
Метод | Описание | |
---|---|---|
PEAR_Downloader ( &$ui, $options, &$config ) | ||
_checkDepTree ( $channel, $package, $b, $checked = [] ) | ||
_dependsOn ( $a, $b ) | ||
_detectDepCycle ( &$deplinks ) | Detect recursive links between dependencies and break the cycles | |
_downloadCallback ( $msg, $params = null ) | ||
_getDepPackageDownloadUrl ( $dep, $parr ) | ||
_getPackageDownloadUrl ( $parr ) | ||
_prependPath ( $path, $prepend ) | ||
_setupGraph ( array $t, PEAR_Registry $reg, array &$deplinks, array &$nodes, string $package ) | Set up the dependency for installation parsing | |
_sortInstall ( $a, $b ) | ||
_testCycle ( $test, $deplinks, $dep ) | ||
analyzeDependencies ( &$params, $force = false ) | ||
configSet ( $key, $value, $layer = 'user', $channel = false ) | ||
discover ( $channel ) : boolean | Attempt to discover a channel's remote capabilities from its server name | |
download ( $params ) | ||
downloadHttp ( string $url, object &$ui, string $save_dir = '.', mixed $callback = null, false | string | array $lastmodified = null, false | array $accept = false, false | string $channel = false ) : string | array | Download a file through HTTP. Considers suggested file name in Content-disposition: header and can run a callback function for different events. The callback will be called with two parameters: the callback type, and parameters. The implemented callback types are: | |
getDependency2Object ( &$c, $i, $p, $s ) | For simpler unit-testing | |
getDownloadDir ( ) : string | Retrieve the directory that downloads will happen in | |
getDownloadedPackages ( ) : array | Retrieve a list of downloaded packages after a call to {@link download()}. | |
getErrorMsgs ( ) | ||
getOptions ( ) | ||
getPackageDownloadUrl ( $package, $version = null, $channel = false ) | ||
newDownloaderPackage ( &$t ) : PEAR_Downloader_Package | For simpler unit-testing | |
pushError ( $errmsg, $code ) | ||
setDownloadDir ( $dir ) | ||
setOptions ( $options ) | ||
sortPackagesForInstall ( &$packages ) : array | Sort a list of arrays of array(downloaded packagefilename) by dependency. | |
sortPkgDeps ( &$packages, $uninstall = false ) | for BC |
public _detectDepCycle ( &$deplinks ) |
public downloadHttp ( string $url, object &$ui, string $save_dir = '.', mixed $callback = null, false | string | array $lastmodified = null, false | array $accept = false, false | string $channel = false ) : string | array | ||
$url | string | the URL to download |
$ui | object | PEAR_Frontend_* instance |
$save_dir | string | directory to save file in |
$callback | mixed | function/method to call for status updates |
$lastmodified | false | string | array | header values to check against for caching use false to return the header values from this download |
$accept | false | array | Accept headers to send |
$channel | false | string | Channel to use for retrieving authentication |
Результат | string | array | Returns the full path of the downloaded file or a PEAR error on failure. If the error is caused by socket-related errors, the error object will have the fsockopen error code available through getCode(). If caching is requested, then return the header values. |
public getDependency2Object ( &$c, $i, $p, $s ) |
public getDownloadDir ( ) : string | ||
Результат | string |
public getDownloadedPackages ( ) : array | ||
Результат | array |
public getPackageDownloadUrl ( $package, $version = null, $channel = false ) |
public newDownloaderPackage ( &$t ) : PEAR_Downloader_Package | ||
Результат | PEAR_Downloader_Package |
public sortPackagesForInstall ( &$packages ) : array | ||
Результат | array | array of array(packagefilename, package.xml contents) |
public string $_downloadDir | ||
Результат | string |
array('pkg' => 'package_name', 'file' => '/path/to/local/file',
'info' => array() // parsed package.xml
);
public array $_downloadedPackages | ||
Результат | array |
array('package1' => 0, 'package2' => 1, );
public array $_installed | ||
Результат | array |
public array $_options | ||
Результат | array |
public array $_packageSortTree | ||
Результат | array |
array('package_name1' => parsed package.xml, 'package_name2' => parsed package.xml, );
public array $_toDownload | ||
Результат | array |