PEAR
[ class tree: PEAR ] [ index: PEAR ] [ all elements ]

Class: PEAR_PackageFile

Source Location: /PEAR-1.4.0b1/PEAR/PackageFile.php

Class Overview


Abstraction for the package.xml package description file


Author(s):

Version:

  • Release: 1.4.0b1

Copyright:

  • 1997-2005 The PHP Group

Methods


Inherited Variables

Inherited Methods


Class Details

[line 48]
Abstraction for the package.xml package description file


[ Top ]


Method Detail

PEAR_PackageFile (Constructor)   [line 55]

PEAR_PackageFile PEAR_PackageFile( &$config, [ $debug = false], [ $tmpdir = false])


Parameters:

   &$config   — 
   $debug   — 
   $tmpdir   — 

[ Top ]

addTempFile   [line 246]

void addTempFile( string $file)

Register a temporary file or directory. When the destructor is executed, all registered temporary files and directories are removed.

Parameters:

string   $file   —  name of file or directory

[ Top ]

factory   [line 99]

void &factory( $version)


Parameters:

   $version   — 

[ Top ]

fromAnyFile   [line 360]

string &fromAnyFile( $info, $state)

Returns package information from different sources

This method is able to extract information about a package from a .tgz archive or from a XML package definition file.

  • Access: public

Parameters:

   $info   — 
   $state   — 

[ Top ]

fromArray   [line 120]

PEAR_PackageFileManager_v1|PEAR_PackageFileManager_v2 &fromArray( array $arr)

Return a packagefile object from its toArray() method

WARNING: no validation is performed, the array is assumed to be valid, always parse from xml if you want validation.


Parameters:

array   $arr   — 

[ Top ]

fromPackageFile   [line 324]

array &fromPackageFile( string $descfile, $state, [ $archive = false])

Returns information about a package file. Expects the name of a package xml file as input.
  • Return: array with package information
  • Access: public

Parameters:

string   $descfile   —  name of package xml file
   $state   — 
   $archive   — 

[ Top ]

fromTgzFile   [line 256]

bool &fromTgzFile( string $file, int $state)

  • Return: success of parsing

Parameters:

string   $file   —  contents of package.xml file
int   $state   —  package state (one of PEAR_VALIDATE_* constants)

[ Top ]

fromXmlString   [line 151]

PEAR_PackageFileManager_v1|PEAR_PackageFileManager_v2 &fromXmlString( string $data, int $state, string $file, [ $archive = false])


Parameters:

string   $data   —  contents of package.xml file
int   $state   —  package state (one of PEAR_VALIDATE_* constants)
string   $file   —  full path to the package.xml file (and the files it references)
   $archive   — 

[ Top ]

getClassPrefix   [line 94]

string getClassPrefix( )

For simpler unit-testing

[ Top ]

parserFactory   [line 77]

void &parserFactory( $version)


Parameters:

   $version   — 

[ Top ]

rawReturn   [line 67]

void rawReturn( )

Turn off validation - return a parsed package.xml without checking it

This is used by the package-validate command


[ Top ]

setLogger   [line 72]

void setLogger( &$l)


Parameters:

   &$l   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:15:33 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.