![]() |
Bearsampp 2026.9.23
|
Public Member Functions | |
| __construct (&$packagefile) | |
| _addDir (&$dirs, $dir, $file=null, $attributes=null) | |
| _convertDependencies2_0 (&$release, $internal=false) | |
| _convertFilelist2_0 (&$package) | |
| _convertRelease2_0 (&$release, $package) | |
| _fixXmlEncoding ($string) | |
| _formatDir ($dirs, $indent='', $curdir='') | |
| _formatFile ($file, $attributes, $indent) | |
| _makeReleaseXml ($pkginfo, $changelog=false, $state=PEAR_VALIDATE_NORMAL) | |
| _processDep ($dep) | |
| _processMultipleDepsName ($deps) | |
| _processPhpDeps ($deps) | |
| _unIndent ($str) | |
| dependenciesToV2 () | |
| getPackagerVersion () | |
| recursiveXmlFilelist ($list) | |
| toPackageFile ($where=null, $state=PEAR_VALIDATE_NORMAL, $name='package.xml', $nofilechecking=false) | |
| toTgz (&$packager, $compress=true, $where=null) | |
| & | toV2 ($class='PEAR_PackageFile_v2', $strict=false) |
| toXml ($state=PEAR_VALIDATE_NORMAL, $nofilevalidation=false) | |
Data Fields | |
| $_packagefile | |
| __construct | ( | & | $packagefile | ) |
| _addDir | ( | & | $dirs, |
| $dir, | |||
| $file = null, | |||
| $attributes = null ) |
| array | |
| array | |
| string|null | |
| array|null | @access private |
Definition at line 374 of file v1.php.
References _addDir().
Referenced by _addDir(), and recursiveXmlFilelist().
| _convertDependencies2_0 | ( | & | $release, |
| $internal = false ) |
| array | |
| bool | @access private |
Definition at line 707 of file v1.php.
References _processDep(), _processMultipleDepsName(), and _processPhpDeps().
Referenced by dependenciesToV2(), and toV2().
| _convertFilelist2_0 | ( | & | $package | ) |
| array | @access private |
Definition at line 798 of file v1.php.
Referenced by toV2().
| _convertRelease2_0 | ( | & | $release, |
| $package ) |
Post-process special files with install-as/platform attributes and make the release tag.
This complex method follows this work-flow to create the release tags:
- if any install-as/platform exist, create a generic release and fill it with o <install as=..>> tags for <file name=... install-as=...>> o <install as=..>> tags for <file name=... platform=!... install-as=..>> o <ignore> tags for <file name=... platform=...>> o <ignore> tags for <file name=... platform=... install-as=..>> - create a release for each platform encountered and fill with o <install as..> tags for <file name=... install-as=...>> o <install as..> tags for <file name=... platform=this platform install-as=..>> o <install as..> tags for <file name=... platform=!other platform install-as=..>> o <ignore> tags for <file name=... platform=!this platform> o <ignore> tags for <file name=... platform=other platform> o <ignore> tags for <file name=... platform=other platform install-as=..>> o <ignore> tags for <file name=... platform=!this platform install-as=..>>
It does this by accessing the $package parameter, which contains an array with indices:
| array | |
| array | @access private |
Definition at line 878 of file v1.php.
Referenced by toV2().
| _fixXmlEncoding | ( | $string | ) |
fix both XML encoding to be UTF8, and replace standard XML entities < > " & '
| string | $string |
Definition at line 168 of file v1.php.
Referenced by _formatFile(), _makeReleaseXml(), and toXml().
| _formatDir | ( | $dirs, | |
| $indent = '', | |||
| $curdir = '' ) |
| array | |
| string | |
| string | @access private |
Definition at line 393 of file v1.php.
References _formatDir(), and _formatFile().
Referenced by _formatDir(), and recursiveXmlFilelist().
| _formatFile | ( | $file, | |
| $attributes, | |||
| $indent ) |
| string | |
| array | |
| string | @access private |
Definition at line 423 of file v1.php.
References _fixXmlEncoding().
Referenced by _formatDir().
| _makeReleaseXml | ( | $pkginfo, | |
| $changelog = false, | |||
| $state = PEAR_VALIDATE_NORMAL ) |
Generate part of an XML description with release information.
| array | $pkginfo | array with release information |
| bool | $changelog | whether the result will be in a changelog element |
@access private
Definition at line 243 of file v1.php.
References _fixXmlEncoding(), PEAR_VALIDATE_NORMAL, PEAR_VALIDATE_PACKAGING, and recursiveXmlFilelist().
Referenced by toXml().
| _processDep | ( | $dep | ) |
| array |
Definition at line 1097 of file v1.php.
Referenced by _convertDependencies2_0(), _processMultipleDepsName(), and _processPhpDeps().
| _processMultipleDepsName | ( | $deps | ) |
process multiple dependencies that have a name, like package deps
| array |
Definition at line 1216 of file v1.php.
References _processDep().
Referenced by _convertDependencies2_0().
| _processPhpDeps | ( | $deps | ) |
| array |
Definition at line 1152 of file v1.php.
References _processDep().
Referenced by _convertDependencies2_0().
| _unIndent | ( | $str | ) |
Unindent given string (?)
| string | $str | The string that has to be unindented. |
Definition at line 466 of file v1.php.
| dependenciesToV2 | ( | ) |
Definition at line 486 of file v1.php.
References _convertDependencies2_0().
| recursiveXmlFilelist | ( | $list | ) |
| array | @access protected |
Definition at line 358 of file v1.php.
References _addDir(), and _formatDir().
Referenced by _makeReleaseXml().
| toPackageFile | ( | $where = null, | |
| $state = PEAR_VALIDATE_NORMAL, | |||
| $name = 'package.xml', | |||
| $nofilechecking = false ) |
| string|null | directory to place the package.xml in, or null for a temporary dir |
| int | one of the PEAR_VALIDATE_* constants |
| string | name of the generated file |
| bool | if true, then no analysis will be performed on role="php" files |
Definition at line 135 of file v1.php.
References PEAR_VALIDATE_NORMAL, and toXml().
Referenced by toTgz().
| toTgz | ( | & | $packager, |
| $compress = true, | |||
| $where = null ) |
| PEAR_Packager | |
| bool | if true, a .tgz is written, otherwise a .tar is written |
| string|null | directory in which to save the .tgz |
Definition at line 57 of file v1.php.
References PEAR_ERROR_RETURN, PEAR_VALIDATE_PACKAGING, and toPackageFile().
| & toV2 | ( | $class = 'PEAR_PackageFile_v2', | |
| $strict = false ) |
Convert a package.xml version 1.0 into version 2.0
Note that this does a basic conversion, to allow more advanced features like bundles and multiple releases
| string | the classname to instantiate and return. This must be PEAR_PackageFile_v2 or a descendant |
| boolean | if true, only valid, deterministic package.xml 1.0 as defined by the strictest parameters will be converted |
Definition at line 504 of file v1.php.
References _convertDependencies2_0(), _convertFilelist2_0(), and _convertRelease2_0().
| toXml | ( | $state = PEAR_VALIDATE_NORMAL, | |
| $nofilevalidation = false ) |
Return an XML document based on the package info (as returned by the PEAR_Common::infoFrom* methods).
Definition at line 184 of file v1.php.
References _fixXmlEncoding(), _makeReleaseXml(), and PEAR_VALIDATE_NORMAL.
Referenced by toPackageFile().