![]() |
Bearsampp 2026.9.23
|
Data Fields | |
| $_archiveFile | |
| $_config | |
| $_filesValid = false | |
| $_incomplete = true | |
| $_isValid = 0 | |
| $_logger | |
| $_packageFile | |
| $_packageInfo = array() | |
| $_registry | |
| $_requestedGroup = false | |
| $_stack | |
| $_tasksNs | |
| $_v2Validator | |
| __construct | ( | ) |
The constructor merely sets up the private error stack
Definition at line 131 of file v2.php.
Referenced by PEAR_PackageFile_v2().
| _differentDescription | ( | $description | ) |
Definition at line 457 of file v2.php.
References getDescription().
Referenced by isEquivalent().
| _differentEmail | ( | $handle, | |
| $email, | |||
| $selfemail ) |
Definition at line 409 of file v2.php.
Referenced by isEquivalent().
| _differentName | ( | $handle, | |
| $name, | |||
| $selfname ) |
Definition at line 416 of file v2.php.
Referenced by isEquivalent().
| _differentNotes | ( | $notes | ) |
Definition at line 437 of file v2.php.
References getNotes().
Referenced by isEquivalent().
| _differentPackage | ( | $package | ) |
Definition at line 381 of file v2.php.
References getPackage().
Referenced by isEquivalent().
| _differentRole | ( | $handle, | |
| $role, | |||
| $selfrole ) |
Definition at line 402 of file v2.php.
Referenced by isEquivalent().
| _differentState | ( | $state | ) |
Definition at line 395 of file v2.php.
References getState().
Referenced by isEquivalent().
| _differentSummary | ( | $summary | ) |
Definition at line 447 of file v2.php.
References getSummary().
Referenced by isEquivalent().
| _differentVersion | ( | $version | ) |
Definition at line 388 of file v2.php.
References getVersion().
Referenced by isEquivalent().
| _getFlattenedFilelist | ( | & | $files, |
| $dir, | |||
| $baseinstall = false, | |||
| $path = '' ) |
| array | the final flattened file list |
| array | the current directory being processed |
| string|false | any recursively inherited baeinstalldir attribute |
| string | private recursion variable |
Definition at line 701 of file v2.php.
References _getFlattenedFilelist().
Referenced by _getFlattenedFilelist(), and flattenFilelist().
| _insertBefore | ( | $array, | |
| $keys, | |||
| $contents, | |||
| $newkey ) |
| array | a list of possible keys, in the order they may occur |
| mixed | contents of the new package.xml tag |
| string | tag name @access private |
Definition at line 2005 of file v2.php.
References _ksplice().
Referenced by _mergeTag(), PEAR_PackageFile_v2_rw\addFile(), PEAR_PackageFile_v2_rw\addMaintainer(), PEAR_PackageFile_v2_rw\clearContents(), PEAR_PackageFile_v2_rw\setChannel(), setDate(), PEAR_PackageFile_v2_rw\setDescription(), PEAR_PackageFile_v2_rw\setExtends(), PEAR_PackageFile_v2_rw\setLicense(), PEAR_PackageFile_v2_rw\setNotes(), PEAR_PackageFile_v2_rw\setPackageType(), PEAR_PackageFile_v2_rw\setProvidesExtension(), PEAR_PackageFile_v2_rw\setSourcePackage(), PEAR_PackageFile_v2_rw\setSummary(), setTime(), and PEAR_PackageFile_v2_rw\setUri().
| _ksplice | ( | $array, | |
| $key, | |||
| $value, | |||
| $newkey ) |
Key-friendly array_splice
| tagname | to splice a value in before |
| mixed | the value to splice in |
| string | the new tag name |
Definition at line 1990 of file v2.php.
Referenced by _insertBefore().
| _mergeTag | ( | $manip, | |
| $contents, | |||
| $order ) |
| subsection | of $_packageInfo |
| array|string | tag contents |
| array | format: array( tagname => array(list of tag names that follow this one), childtagname => array(list of child tag names that follow this one), ) |
This allows construction of nested tags @access private
Definition at line 2030 of file v2.php.
References _insertBefore(), and _mergeTag().
Referenced by PEAR_PackageFile_v2_rw\_addGroupDependency(), _mergeTag(), PEAR_PackageFile_v2_rw\addArchDep(), PEAR_PackageFile_v2_rw\addBinarypackage(), PEAR_PackageFile_v2_rw\addBundledPackage(), PEAR_PackageFile_v2_rw\addCompatiblePackage(), PEAR_PackageFile_v2_rw\addConfigureOption(), PEAR_PackageFile_v2_rw\addConflictingPackageDepWithChannel(), PEAR_PackageFile_v2_rw\addConflictingPackageDepWithUri(), PEAR_PackageFile_v2_rw\addDependencyGroup(), PEAR_PackageFile_v2_rw\addExtensionDep(), PEAR_PackageFile_v2_rw\addExtensionInstallCondition(), PEAR_PackageFile_v2_rw\addIgnore(), PEAR_PackageFile_v2_rw\addInstallAs(), PEAR_PackageFile_v2_rw\addOsDep(), PEAR_PackageFile_v2_rw\addPackageDepWithChannel(), PEAR_PackageFile_v2_rw\addPackageDepWithUri(), PEAR_PackageFile_v2_rw\addRelease(), PEAR_PackageFile_v2_rw\addSubpackageDepWithChannel(), PEAR_PackageFile_v2_rw\addSubpackageDepWithUri(), PEAR_PackageFile_v2_rw\addUsesrole(), PEAR_PackageFile_v2_rw\addUsestask(), PEAR_PackageFile_v2_rw\clearDeps(), PEAR_PackageFile_v2_rw\setAPIStability(), PEAR_PackageFile_v2_rw\setAPIVersion(), PEAR_PackageFile_v2_rw\setArchInstallCondition(), PEAR_PackageFile_v2_rw\setOsInstallCondition(), PEAR_PackageFile_v2_rw\setPearinstallerDep(), PEAR_PackageFile_v2_rw\setPhpDep(), PEAR_PackageFile_v2_rw\setPhpInstallCondition(), PEAR_PackageFile_v2_rw\setReleaseStability(), and PEAR_PackageFile_v2_rw\setReleaseVersion().
| _missingFile | ( | $file | ) |
Definition at line 467 of file v2.php.
Referenced by isEquivalent().
| _unmatchedMaintainers | ( | $my, | |
| $yours ) |
Definition at line 423 of file v2.php.
Referenced by isEquivalent().
| analyzeSourceCode | ( | $file, | |
| $string = false ) |
Definition at line 1910 of file v2.php.
| dependsOn | ( | $package, | |
| $channel ) |
Definition at line 1569 of file v2.php.
References getDependencies().
| flattenFilelist | ( | ) |
Convert a recursive set of <dir> and <file> tags into a single <dir> tag with <file> tags.
Definition at line 659 of file v2.php.
References _getFlattenedFilelist().
Referenced by getFilelist().
| fromArray | ( | $pinfo | ) |
Directly set the array that defines this packagefile
WARNING: no validation. This should only be performed by internal methods inside PEAR or by inputting an array saved from an existing PEAR_PackageFile_v2
| array |
Definition at line 805 of file v2.php.
| getArchiveFile | ( | ) |
| getArray | ( | $forReg = false | ) |
Definition at line 833 of file v2.php.
References $_packageInfo, getDate(), getDeps(), getLicense(), getMaintainers(), getNotes(), getState(), and getVersion().
Referenced by packageInfo(), and toArray().
| getBundledPackages | ( | ) |
| getChangelog | ( | ) |
| getChannel | ( | ) |
Definition at line 900 of file v2.php.
Referenced by getInstallationFilelist().
| getCompatible | ( | ) |
| getConfigureOptions | ( | ) |
Return configure options array, if any
Definition at line 1209 of file v2.php.
References getPackageType(), and getReleases().
| getContents | ( | ) |
Retrieve the contents tag
Definition at line 1371 of file v2.php.
Referenced by getFilelist(), initPostinstallScripts(), and listPostinstallScripts().
| getContributors | ( | ) |
| getDate | ( | ) |
Definition at line 1071 of file v2.php.
Referenced by PEAR_PackageFile_v2_rw\generateChangeLogEntry(), and getArray().
| & getDefaultGenerator | ( | ) |
| getDependencies | ( | ) |
Definition at line 1502 of file v2.php.
Referenced by dependsOn().
| getDependencyGroup | ( | $name | ) |
Get the contents of a dependency group
| string |
Definition at line 1617 of file v2.php.
| getDeps | ( | $raw = false, | |
| $nopearinstaller = false ) |
Retrieve a partial package.xml 1.0 representation of dependencies
a very limited representation of dependencies is returned by this method. The <exclude> tag for excluding certain versions of a dependency is completely ignored. In addition, dependency groups are ignored, with the assumption that all dependencies in dependency groups are also listed in the optional group that work with all dependency groups
| boolean | return package.xml 2.0 <dependencies> tag |
Definition at line 1646 of file v2.php.
References $raw.
Referenced by getArray().
| getDescription | ( | ) |
Definition at line 935 of file v2.php.
Referenced by _differentDescription(), and isEquivalent().
| getDevelopers | ( | ) |
| getDirtree | ( | ) |
| getExtends | ( | ) |
| getFileContents | ( | $file | ) |
Get the contents of a file listed within the package.xml
| string |
Definition at line 1856 of file v2.php.
References getPackage(), getVersion(), and PEAR_ERROR_RETURN.
| getFilelist | ( | $preserve = false | ) |
This should only be used to retrieve filenames and install attributes
Definition at line 1172 of file v2.php.
References flattenFilelist(), and getContents().
Referenced by getInstallationFilelist(), initPostinstallScripts(), isEquivalent(), and listPostinstallScripts().
| getHelpers | ( | ) |
| getInstallationFilelist | ( | $forfilecheck = false | ) |
Retrieve a list of files that should be installed on this computer
Definition at line 1248 of file v2.php.
References getChannel(), getFilelist(), getPackage(), getPEARDependency2(), getReleases(), PEAR_ERROR_RETURN, and PEAR_VALIDATE_INSTALLING.
| getInstalledBinary | ( | ) |
| getInstalledLocation | ( | $file | ) |
| getLastInstalledVersion | ( | ) |
| getLastModified | ( | ) |
| getLeads | ( | ) |
| getLicense | ( | $raw = false | ) |
Definition at line 1114 of file v2.php.
References $raw.
Referenced by PEAR_PackageFile_v2_rw\generateChangeLogEntry(), and getArray().
| getLicenseLocation | ( | ) |
| getMaintainers | ( | $raw = false | ) |
Definition at line 943 of file v2.php.
References $raw.
Referenced by getArray(), and isEquivalent().
| getName | ( | ) |
Definition at line 887 of file v2.php.
References getPackage().
| getNotes | ( | ) |
Definition at line 1137 of file v2.php.
Referenced by _differentNotes(), PEAR_PackageFile_v2_rw\generateChangeLogEntry(), getArray(), and isEquivalent().
| getPackage | ( | ) |
Definition at line 892 of file v2.php.
Referenced by _differentPackage(), getFileContents(), getInstallationFilelist(), and getName().
| getPackageFile | ( | ) |
| getPackageType | ( | ) |
Definition at line 1757 of file v2.php.
Referenced by PEAR_PackageFile_v2_rw\_getCurrentRelease(), PEAR_PackageFile_v2_rw\addBinarypackage(), PEAR_PackageFile_v2_rw\addBundledPackage(), PEAR_PackageFile_v2_rw\addConfigureOption(), PEAR_PackageFile_v2_rw\addExtensionInstallCondition(), PEAR_PackageFile_v2_rw\addFile(), PEAR_PackageFile_v2_rw\addRelease(), PEAR_PackageFile_v2_rw\clearContents(), getConfigureOptions(), getProvidesExtension(), getReleases(), installBinary(), isEquivalent(), isExtension(), PEAR_PackageFile_v2_rw\setArchInstallCondition(), PEAR_PackageFile_v2_rw\setOsInstallCondition(), PEAR_PackageFile_v2_rw\setPhpInstallCondition(), and PEAR_PackageFile_v2_rw\setProvidesExtension().
| getPackagexmlVersion | ( | ) |
| & getPEARDependency2 | ( | & | $c, |
| $o, | |||
| $p, | |||
| $s = PEAR_VALIDATE_INSTALLING ) |
To make unit-testing easier
| PEAR_Config | |
| array | options |
| array | package name as returned from PEAR_Registry::parsePackageName() |
| int | PEAR_VALIDATE_* constant |
Definition at line 169 of file v2.php.
References PEAR_VALIDATE_INSTALLING.
Referenced by getInstallationFilelist().
| & getPEARDownloader | ( | & | $i, |
| $o, | |||
| & | $c ) |
To make unit-testing easier
| PEAR_Frontend_* | |
| array | options |
| PEAR_Config |
Definition at line 154 of file v2.php.
Referenced by installBinary().
| getProvidesExtension | ( | ) |
Definition at line 268 of file v2.php.
References getPackageType().
| getReleases | ( | ) |
Definition at line 1783 of file v2.php.
References getPackageType().
Referenced by getConfigureOptions(), and getInstallationFilelist().
| getRequestedGroup | ( | ) |
Definition at line 513 of file v2.php.
References $_requestedGroup.
| & getRW | ( | ) |
Definition at line 1881 of file v2.php.
| getSourcePackage | ( | ) |
Definition at line 1825 of file v2.php.
| getStability | ( | ) |
Definition at line 1098 of file v2.php.
Referenced by PEAR_PackageFile_v2_rw\generateChangeLogEntry().
| getState | ( | $key = 'release' | ) |
Definition at line 1106 of file v2.php.
Referenced by _differentState(), and getArray().
| getSummary | ( | ) |
Definition at line 927 of file v2.php.
Referenced by _differentSummary().
| getTask | ( | $task | ) |
Determine whether a task name is a valid task. Custom tasks may be defined using subdirectories by putting a "-" in the name, as in <tasks:mycustom-task>
Note that this method will auto-load the task class file and test for the existence of the name with "-" replaced by "_" as in PEAR/Task/mycustom/task.php makes class PEAR_Task_mycustom_task
| string |
Definition at line 1965 of file v2.php.
References getTasksNs().
Referenced by initPostinstallScripts(), and listPostinstallScripts().
| getTasksNs | ( | ) |
Definition at line 1940 of file v2.php.
Referenced by PEAR_PackageFile_v2_rw\addTaskToFile(), and getTask().
| getTime | ( | ) |
| getUri | ( | ) |
| getUsesrole | ( | ) |
| getUsestask | ( | ) |
| getValidationWarnings | ( | $purge = true | ) |
Wrapper to PEAR_ErrorStack::getErrors()
| boolean | determines whether to purge the error stack after retrieving |
Definition at line 782 of file v2.php.
| getVersion | ( | $key = 'release' | ) |
| package|api | version category to return |
Definition at line 1090 of file v2.php.
Referenced by _differentVersion(), PEAR_PackageFile_v2_rw\generateChangeLogEntry(), getArray(), getFileContents(), and installBinary().
| hasDeps | ( | ) |
| initPostinstallScripts | ( | ) |
Initialize post-install scripts for running
This method can be used to detect post-install scripts, as the return value indicates whether any exist
Definition at line 594 of file v2.php.
References $raw, getContents(), getFilelist(), getTask(), and PEAR_TASK_INSTALL.
Referenced by runPostinstallScripts().
| installBinary | ( | & | $installer | ) |
Installation of source package has failed, attempt to download and install the binary version of this package.
| PEAR_Installer |
Definition at line 190 of file v2.php.
References $verbose, getPackageType(), getPEARDownloader(), getVersion(), and PEAR_ERROR_RETURN.
| installedFile | ( | $file, | |
| $atts ) |
This is only used at install-time, after all serialization is over.
Reimplemented in PEAR_PackageFile_v2_rw.
Definition at line 1358 of file v2.php.
| isCompatible | ( | $pf | ) |
Determines whether this package claims it is compatible with the version of the package that has a recommended version dependency
| PEAR_PackageFile_v2|PEAR_PackageFile_v1|PEAR_Downloader_Package |
Definition at line 1450 of file v2.php.
| isEquivalent | ( | $pf1 | ) |
Tests whether every part of the package.xml 1.0 is represented in this package.xml 2.0
| PEAR_PackageFile_v1 |
Definition at line 298 of file v2.php.
References _differentDescription(), _differentEmail(), _differentName(), _differentNotes(), _differentPackage(), _differentRole(), _differentState(), _differentSummary(), _differentVersion(), _missingFile(), _unmatchedMaintainers(), getDescription(), getFilelist(), getMaintainers(), getNotes(), getPackageType(), and PEAR_VALIDATE_NORMAL.
| isExtension | ( | $extension | ) |
| string | Extension name |
Definition at line 283 of file v2.php.
References getPackageType().
| isIncomplete | ( | ) |
| isSubpackage | ( | $p | ) |
Determines whether the passed in package is a subpackage of this package.
No version checking is done, only name verification.
| PEAR_PackageFile_v1|PEAR_PackageFile_v2 |
Definition at line 1522 of file v2.php.
| isSubpackageOf | ( | $p | ) |
| listPostinstallScripts | ( | ) |
Determines whether this package.xml has post-install scripts or not
Definition at line 547 of file v2.php.
References $raw, getContents(), getFilelist(), getTask(), and PEAR_TASK_INSTALL.
| packageInfo | ( | $field | ) |
Definition at line 860 of file v2.php.
References getArray().
PHP 4 style constructor for backwards compatibility. Used by PEAR_PackageFileManager2
Definition at line 141 of file v2.php.
References __construct().
| resetDirtree | ( | ) |
| resetFilelist | ( | ) |
| runPostinstallScripts | ( | ) |
Definition at line 644 of file v2.php.
References $ui, initPostinstallScripts(), and PEAR_Frontend\singleton().
| setCompatible | ( | $compat | ) |
| setConfig | ( | & | $config | ) |
| setDate | ( | $date | ) |
Definition at line 1041 of file v2.php.
References _insertBefore().
| setDeps | ( | $deps | ) |
| setDirtree | ( | $path | ) |
| setFileAttribute | ( | $filename, | |
| $attr, | |||
| $value, | |||
| $index = false ) |
| string | full path to file |
| string | attribute name |
| string | attribute value |
| int | risky but fast - use this to choose a file based on its position in the list of files. Index is zero-based like PHP arrays. |
Definition at line 1387 of file v2.php.
| setInstalledAs | ( | $file, | |
| $path ) |
This is only used at install-time, after all serialization is over.
| string | file name |
| string | installed path |
Reimplemented in PEAR_PackageFile_v2_rw.
Definition at line 1338 of file v2.php.
| setLastInstalledVersion | ( | $version | ) |
| setLogger | ( | & | $logger | ) |
| setPackagefile | ( | $file, | |
| $archive = false ) |
| setRawChannel | ( | $channel | ) |
WARNING - do not use this function unless you know what you're doing
Definition at line 503 of file v2.php.
Referenced by PEAR_Downloader\_getDepPackageDownloadUrl(), and PEAR_Downloader\_getPackageDownloadUrl().
| setRawCompatible | ( | $compatible | ) |
| setRawPackage | ( | $package | ) |
| setRawState | ( | $state | ) |
| setRequestedGroup | ( | $group | ) |
| setTime | ( | $time | ) |
Definition at line 1056 of file v2.php.
References _insertBefore().
| toArray | ( | $forreg = false | ) |
Definition at line 825 of file v2.php.
References getArray(), PEAR_VALIDATE_NORMAL, and validate().
| validate | ( | $state = PEAR_VALIDATE_NORMAL | ) |
Definition at line 1922 of file v2.php.
References PEAR_VALIDATE_NORMAL.
Referenced by toArray().
| $_archiveFile |
Definition at line 44 of file v2.php.
Referenced by getArchiveFile().
| $_filesValid = false |
| $_incomplete = true |
Definition at line 121 of file v2.php.
Referenced by isIncomplete().
| $_packageFile |
Definition at line 51 of file v2.php.
Referenced by getPackageFile().
| $_packageInfo = array() |
Definition at line 37 of file v2.php.
Referenced by getArray().
| $_requestedGroup = false |
Definition at line 97 of file v2.php.
Referenced by getRequestedGroup().
| $_tasksNs |