PEAR_PackageFile::fromPackageFile() – Returns information about a package file. Expects the name of a package.xml file as input.


require_once '/PackageFile.php';

array& PEAR_PackageFile::fromPackageFile ( string $descfile , int $state , string|false $archive = false )


parse and return a package.xml object from a package.xml file, or a PEAR_Error object upon error.


string $descfile

name of package.xml file

integer $state

package state (one of PEAR_VALIDATE_* constants)

string|FALSE $archive

full path to the full package .tgz file containing the package.xml, or false for none.

Return value

returns array with package information


throws no exceptions thrown


This function should be called statically.

Return a packagefile object from its toArray() method (Previous) fromTgzFile (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.