PEAR Manual
Prev |  | Next

# PEAR_PackageFile::fromTgzFile()

PEAR_PackageFile::fromTgzFile() -- fromTgzFile

## Synopsis

    require_once '/PackageFile.php';

``PEAR_PackageFile_v1|PEAR_PackageFile_v2|PEAR_Error& PEAR_PackageFile::fromTgzFile` (string $file, int $state)`

## Description

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

## Parameter

string `$file`

  name of packaged .tgz or .tar to extract and parse package.xml from

integer `$state`

  package state (one of `PEAR_VALIDATE_*` constants)

## Return value

returns success of parsing

## Throws

throws no exceptions thrown

## Note

This function can not be called statically.

Prev | Home | Next
PEAR_PackageFile::fromPackageFile() | Up | PEAR_PackageFile::fromXmlString()