![]() |
Bearsampp 2026.9.23
|
Public Member Functions | |
| __construct (&$downloader) | |
| _analyzeDownloadURL ($info, $param, $pname, $params=null, $optional=false, $isdependency=false) | |
| _detect1 ($deps, $pname, $options, $params) | |
| _detect2 ($deps, $pname, $options, $params) | |
| _detect2Dep ($dep, $pname, $group, $params) | |
| _fromFile (&$param) | |
| _fromString ($param) | |
| _fromUrl ($param, $saveparam='') | |
| alreadyValidated () | |
| canDefault () | |
| detectDependencies ($params) | |
| & | download () |
| explicitState () | |
| fromDepURL ($dep) | |
| getChannel () | |
| getDeps () | |
| & | getDownloader () |
| getDownloadURL () | |
| getGroup () | |
| getPackage () | |
| & | getPackageFile () |
| & | getPackagefileObject (&$c, $d) |
| getPackageType () | |
| getPackageXmlVersion () | |
| getParsedPackage () | |
| getShortName () | |
| getType () | |
| getURI () | |
| getVersion () | |
| initialize ($param) | |
| isBundle () | |
| isCompatible ($pf) | |
| isEqual ($param) | |
| isExtension ($name) | |
| isInstalled ($dep, $oper='==') | |
| isSubpackage (&$pf) | |
| setDownloadURL ($pkg) | |
| setExplicitState ($s) | |
| setGroup ($group) | |
| setPackageFile (&$pkg) | |
| setValidated () | |
Static Public Member Functions | |
| static | detectStupidDuplicates ($params, &$errorparams) |
| static | mergeDependencies (&$params) |
| static | removeDuplicates (&$params, $ignoreGroups=false) |
| static | removeInstalled (&$params) |
| static | willDownload ($param, $params) |
Data Fields | |
| $_analyzed = false | |
| $_config | |
| $_downloadDeps = array() | |
| $_downloader | |
| $_downloadURL | |
| $_explicitGroup = false | |
| $_explicitState = false | |
| $_installRegistry | |
| $_packagefile | |
| $_parsedname | |
| $_rawpackagefile | |
| $_registry | |
| $_type | |
| $_valid = false | |
| $_validated = false | |
Definition at line 56 of file Package.php.
| __construct | ( | & | $downloader | ) |
| PEAR_Downloader |
Definition at line 132 of file Package.php.
References $_registry, and $options.
| _analyzeDownloadURL | ( | $info, | |
| $param, | |||
| $pname, | |||
| $params = null, | |||
| $optional = false, | |||
| $isdependency = false ) |
| array | output of package.getDownloadURL |
| string|array|object | information for detecting packages to be downloaded, and for errors |
| array | name information of the package |
| array|null | packages to be downloaded |
| bool | is this an optional dependency? |
| bool | is this any kind of dependency? @access private |
Definition at line 1750 of file Package.php.
References $options, PEAR_Dependency2\_getExtraString(), PEAR_Common\betterStates(), getChannel(), getPackage(), isInstalled(), PEAR_DOWNLOADER_PACKAGE_PHPVERSION, PEAR_DOWNLOADER_PACKAGE_STATE, and willDownload().
Referenced by _detect1(), _detect2Dep(), and _fromString().
| _detect1 | ( | $deps, | |
| $pname, | |||
| $options, | |||
| $params ) |
Definition at line 686 of file Package.php.
References $_explicitState, $options, _analyzeDownloadURL(), getShortName(), isInstalled(), PEAR_Dependency2\normalizeDep(), PEAR_ERROR_RETURN, PEAR_PackageFile_v1\setPackage(), and willDownload().
Referenced by detectDependencies().
| _detect2 | ( | $deps, | |
| $pname, | |||
| $options, | |||
| $params ) |
Definition at line 442 of file Package.php.
References $_explicitGroup, $options, _detect2Dep(), canDefault(), and getGroup().
Referenced by detectDependencies().
| _detect2Dep | ( | $dep, | |
| $pname, | |||
| $group, | |||
| $params ) |
Definition at line 607 of file Package.php.
References $_explicitState, $options, _analyzeDownloadURL(), getShortName(), isInstalled(), PEAR_ERROR_RETURN, and willDownload().
Referenced by _detect2().
| _fromFile | ( | & | $param | ) |
This will retrieve from a local file if possible, and parse out a group name as well. The original parameter will be modified to reflect this.
| string|array | can be a parsed package name as well @access private |
Definition at line 1507 of file Package.php.
References $options, getGroup(), getPackagefileObject(), PEAR_ERROR_RETURN, PEAR_VALIDATE_INSTALLING, and setGroup().
Referenced by initialize().
| _fromString | ( | $param | ) |
| string|array | pass in an array of format array( 'package' => 'pname', ['channel' => 'channame',] ['version' => 'version',] ['state' => 'state',]) or a string of format [channame/]pname[-version|-state] |
Definition at line 1644 of file Package.php.
References $options, _analyzeDownloadURL(), and PEAR_ERROR_RETURN.
Referenced by initialize().
| _fromUrl | ( | $param, | |
| $saveparam = '' ) |
FIXME need to pass back some error code that we can use to match with to cancel all further operations At least stop all deps of this package from being installed
Definition at line 1544 of file Package.php.
References $options, getChannel(), getPackage(), getPackagefileObject(), PEAR_ERROR_RETURN, PEAR_VALIDATE_INSTALLING, and setGroup().
Referenced by download(), fromDepURL(), and initialize().
| alreadyValidated | ( | ) |
| canDefault | ( | ) |
Definition at line 921 of file Package.php.
Referenced by _detect2().
| detectDependencies | ( | $params | ) |
Definition at line 357 of file Package.php.
References $options, _detect1(), _detect2(), getDeps(), and getParsedPackage().
|
static |
Detect duplicate package names with differing versions
If a user requests to install Date 1.4.6 and Date 1.4.7, for instance, this is a logic error. This method detects this situation.
| array | $params | array of PEAR_Downloader_Package objects |
| array | $errorparams | empty array |
Definition at line 1244 of file Package.php.
Referenced by PEAR_Downloader\download().
| & download | ( | ) |
Retrieve any non-local packages
Definition at line 248 of file Package.php.
References $_packagefile, _fromUrl(), and getParsedPackage().
| explicitState | ( | ) |
Definition at line 1334 of file Package.php.
References $_explicitState.
Referenced by mergeDependencies().
| fromDepURL | ( | $dep | ) |
Like initialize(), but operates on a dependency
Definition at line 319 of file Package.php.
References $options, _fromUrl(), getChannel(), getPackage(), and PEAR_ERROR_RETURN.
| getChannel | ( | ) |
Definition at line 986 of file Package.php.
Referenced by _analyzeDownloadURL(), _fromUrl(), fromDepURL(), getParsedPackage(), getShortName(), and isEqual().
| getDeps | ( | ) |
Definition at line 1059 of file Package.php.
Referenced by detectDependencies().
| & getDownloader | ( | ) |
Definition at line 306 of file Package.php.
References $_downloader.
Referenced by mergeDependencies().
| getDownloadURL | ( | ) |
| getGroup | ( | ) |
Definition at line 1035 of file Package.php.
Referenced by _detect2(), and _fromFile().
| getPackage | ( | ) |
Definition at line 930 of file Package.php.
Referenced by _analyzeDownloadURL(), _fromUrl(), fromDepURL(), getParsedPackage(), getShortName(), and isEqual().
| & getPackageFile | ( | ) |
Definition at line 301 of file Package.php.
References $_packagefile.
| & getPackagefileObject | ( | & | $c, |
| $d ) |
For simpler unit-testing
| PEAR_Config | |
| int | |
| string |
Definition at line 1495 of file Package.php.
Referenced by _fromFile(), and _fromUrl().
| getPackageType | ( | ) |
Definition at line 955 of file Package.php.
| getPackageXmlVersion | ( | ) |
Definition at line 975 of file Package.php.
| getParsedPackage | ( | ) |
Definition at line 905 of file Package.php.
References getChannel(), getPackage(), and getVersion().
Referenced by detectDependencies(), and download().
| getShortName | ( | ) |
Definition at line 899 of file Package.php.
References getChannel(), and getPackage().
Referenced by _detect1(), and _detect2Dep().
| getType | ( | ) |
Definition at line 311 of file Package.php.
References $_type.
| getURI | ( | ) |
Definition at line 997 of file Package.php.
Referenced by isEqual().
| getVersion | ( | ) |
Definition at line 1008 of file Package.php.
Referenced by getParsedPackage(), and isEqual().
| initialize | ( | $param | ) |
Parse the input and determine whether this is a local file, a remote uri, or an abstract package name.
This is the heart of the PEAR_Downloader_Package(), and is used in PEAR_Downloader::download()
| string |
Definition at line 157 of file Package.php.
References $options, _fromFile(), _fromString(), _fromUrl(), and PEAR_DOWNLOADER_PACKAGE_STATE.
| isBundle | ( | ) |
Definition at line 966 of file Package.php.
| isCompatible | ( | $pf | ) |
Definition at line 1019 of file Package.php.
| isEqual | ( | $param | ) |
| array | Parsed array from PEAR_Registry::parsePackageName() or a dependency returned from getDepDownloadURL() |
Definition at line 1084 of file Package.php.
References getChannel(), getPackage(), getURI(), getVersion(), and PEAR_Dependency2\normalizeDep().
| isExtension | ( | $name | ) |
Definition at line 1044 of file Package.php.
| isInstalled | ( | $dep, | |
| $oper = '==' ) |
Definition at line 1170 of file Package.php.
References $options.
Referenced by _analyzeDownloadURL(), _detect1(), and _detect2Dep().
| isSubpackage | ( | & | $pf | ) |
| PEAR_PackageFile_v1|PEAR_PackageFile_v2 |
Definition at line 944 of file Package.php.
|
static |
Definition at line 1346 of file Package.php.
References $options, explicitState(), getDownloader(), PEAR_ERROR_RETURN, removeDuplicates(), and willDownload().
Referenced by PEAR_Downloader\download().
|
static |
| array | |
| bool | ignore install groups - for final removal of dupe packages |
Definition at line 1283 of file Package.php.
Referenced by PEAR_Downloader\analyzeDependencies(), PEAR_Downloader\download(), mergeDependencies(), and removeInstalled().
|
static |
Remove packages to be downloaded that are already installed
| array | of PEAR_Downloader_Package objects |
Definition at line 400 of file Package.php.
References $options, and removeDuplicates().
Referenced by PEAR_Downloader\download().
| setDownloadURL | ( | $pkg | ) |
Definition at line 884 of file Package.php.
| setExplicitState | ( | $s | ) |
Definition at line 1339 of file Package.php.
| setGroup | ( | $group | ) |
Definition at line 1030 of file Package.php.
Referenced by _fromFile(), and _fromUrl().
| setPackageFile | ( | & | $pkg | ) |
Set the package.xml object for this downloaded package
| PEAR_PackageFile_v1 | PEAR_PackageFile_v2 | $pkg |
Definition at line 894 of file Package.php.
| setValidated | ( | ) |
Definition at line 386 of file Package.php.
|
static |
Definition at line 1474 of file Package.php.
Referenced by _analyzeDownloadURL(), _detect1(), _detect2Dep(), and mergeDependencies().
| $_analyzed = false |
Definition at line 98 of file Package.php.
| $_config |
Definition at line 65 of file Package.php.
| $_downloadDeps = array() |
Definition at line 90 of file Package.php.
| $_downloader |
Definition at line 61 of file Package.php.
Referenced by getDownloader().
| $_downloadURL |
Definition at line 86 of file Package.php.
Referenced by getDownloadURL().
| $_explicitGroup = false |
If this package is invoked with Package#group, this variable will be true
Definition at line 111 of file Package.php.
Referenced by _detect2().
| $_explicitState = false |
Definition at line 107 of file Package.php.
Referenced by _detect1(), _detect2Dep(), and explicitState().
| $_installRegistry |
Definition at line 74 of file Package.php.
| $_packagefile |
Definition at line 78 of file Package.php.
Referenced by download(), and getPackageFile().
| $_parsedname |
Definition at line 82 of file Package.php.
| $_rawpackagefile |
Definition at line 122 of file Package.php.
| $_registry |
Definition at line 69 of file Package.php.
Referenced by __construct().
| $_type |
Definition at line 116 of file Package.php.
Referenced by getType().
| $_valid = false |
Definition at line 94 of file Package.php.
| $_validated = false |
Definition at line 127 of file Package.php.
Referenced by alreadyValidated().