Свойство | Тип | Описание | |
---|---|---|---|
$_downloadedPackages | array | array of PEAR_Downloader_Packages | |
$debug | integer | debug level | |
$docdir | string | directory where documentation goes | |
$extdir | string | directory where PHP extension files go | |
$file_operations | array | Format: array( 0 => array("rename => array("from-file", "to-file")), 1 => array("delete" => array("file-to-delete")), ... ) | |
$installroot | string | installation root directory (ala PHP's INSTALL_ROOT or automake's DESTDIR | |
$phpdir | string | directory where PHP code files go | |
$pkgdir | string | name of the package directory, for example Foo-1.0 | |
$registry | PEAR_Registry | PEAR_Registry object used by the installer | |
$tmpdir | string | temporary directory |
Метод | Описание | |
---|---|---|
PEAR_Installer ( object &$ui ) | PEAR_Installer constructor. | |
_buildCallback ( $what, $data ) | {{{ _buildCallback() | |
_compileSourceFiles ( $savechannel, &$filelist ) | ||
_deletePackageFiles ( $package, $channel = false, $backup = false ) : boolean | Delete a package's installed files, does not remove empty directories. | |
_installFile ( $file, $atts, $tmp_path, $options ) | ||
_installFile2 ( &$pkg, $file, &$real_atts, $tmp_path, $options ) | ||
_parsePackageXml ( &$descfile ) | {{{ _parsePackageXml() | |
_removeBackups ( $files ) | }}} | |
_sortDirs ( $a, $b ) | {{{ _sortDirs() | |
_sortUninstall ( $a, $b ) | ||
addFileOperation ( string $type, array $data ) | Add a file operation to the current file transaction. | |
commitFileTransaction ( ) | {{{ commitFileTransaction() | |
download ( $packages, $options, &$config, &$installpackages, &$errors, $installed = false, $willinstall = false, $state = false ) | Download any files and their dependencies, if necessary | |
getInstallPackages ( ) | ||
getUninstallPackages ( ) | }}} | |
install ( string | PEAR_Downloader_Package $pkgfile, array $options = [] ) : array | PEAR_Error | Installs the files within the package file specified. | |
mkDirHier ( $dir ) | {{{ mkDirHier($dir) | |
rollbackFileTransaction ( ) | {{{ rollbackFileTransaction() | |
setConfig ( &$config ) | ||
setDownloadedPackages ( &$pkgs ) | Set the list of PEAR_Downloader_Package objects to allow more sane dependency validation | |
setOptions ( $options ) | ||
setUninstallPackages ( &$pkgs ) | Set the list of PEAR_Downloader_Package objects to allow more sane dependency validation | |
sortPackagesForUninstall ( &$packages ) : array | PEAR_Error | Sort a list of arrays of array(downloaded packagefilename) by dependency. | |
startFileTransaction ( $rollback_in_case = false ) | {{{ startFileTransaction() | |
uninstall ( $package, $options = [] ) | Uninstall a package |
public PEAR_Installer ( object &$ui ) | ||
$ui | object | user interface object (instance of PEAR_Frontend_*) |
public _deletePackageFiles ( $package, $channel = false, $backup = false ) : boolean | ||
Результат | boolean | TRUE on success, or a PEAR error on failure |
public _installFile2 ( &$pkg, $file, &$real_atts, $tmp_path, $options ) |
public addFileOperation ( string $type, array $data ) | ||
$type | string | This can be one of: - rename: rename a file ($data has 3 values) - backup: backup an existing file ($data has 1 value) - removebackup: clean up backups created during install ($data has 1 value) - chmod: change permissions on a file ($data has 2 values) - delete: delete a file ($data has 1 value) - rmdir: delete a directory if empty ($data has 1 value) - installed_as: mark a file as installed ($data has 4 values). |
$data | array | For all file operations, this array must contain the full path to the file or directory that is being operated on. For the rename command, the first parameter must be the file to rename, the second its new name, the third whether this is a PHP extension. The installed_as operation contains 4 elements in this order: 1. Filename as listed in the filelist element from package.xml 2. Full path to the installed file 3. Full path from the php_dir configuration variable used in this installation 4. Relative path from the php_dir that this file is installed in |
public commitFileTransaction ( ) |
public download ( $packages, $options, &$config, &$installpackages, &$errors, $installed = false, $willinstall = false, $state = false ) |
public install ( string | PEAR_Downloader_Package $pkgfile, array $options = [] ) : array | PEAR_Error | ||
$pkgfile | string | PEAR_Downloader_Package | path to the package file, or a pre-initialized packagefile object |
$options | array | recognized options: - installroot : optional prefix directory for installation - force : force installation - register-only : update registry but don't install files - upgrade : upgrade existing install - soft : fail silently - nodeps : ignore dependency conflicts/missing dependencies - alldeps : install all dependencies - onlyreqdeps : install only required dependencies |
Результат | array | PEAR_Error | package info if successful |
public rollbackFileTransaction ( ) |
public setDownloadedPackages ( &$pkgs ) |
public setUninstallPackages ( &$pkgs ) |
public sortPackagesForUninstall ( &$packages ) : array | PEAR_Error | ||
Результат | array | PEAR_Error | array of array(packagefilename, package.xml contents) |
public startFileTransaction ( $rollback_in_case = false ) |
public uninstall ( $package, $options = [] ) |
public array $_downloadedPackages | ||
Результат | array |
public string $docdir | ||
Результат | string |
public string $extdir | ||
Результат | string |
public array $file_operations | ||
Результат | array |
public string $installroot | ||
Результат | string |
public string $pkgdir | ||
Результат | string |
public PEAR_Registry $registry | ||
Результат | PEAR_Registry |