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

Class: PEAR_PackageFile_v2

Source Location: /PEAR-1.10.0dev2/PEAR/PackageFile/v2.php

Class Overview




Author(s):

Version:

  • Release: 1.10.0dev2

Copyright:

  • 1997-2009 The Authors

Variables

Methods


Child classes:

Inherited Variables

Inherited Methods


Class Details

[line 29]


[ Top ]


Class Variables

$_config =

[line 90]

  • Access: protected

Type:   PEAR_Config


[ Top ]

$_logger =

[line 58]

This is used by file analysis routines to log progress information
  • Access: protected

Type:   PEAR_Common


[ Top ]

$_registry =

[line 84]

  • Access: protected

Type:   PEAR_Registry


[ Top ]

$_stack =

[line 103]

  • Access: protected

Type:   PEAR_ErrorStack


[ Top ]



Method Detail

PEAR_PackageFile_v2 (Constructor)   [line 141]

PEAR_PackageFile_v2 PEAR_PackageFile_v2( )

PHP 4 style constructor for backwards compatibility.

Used by PEAR_PackageFileManager2

  • Access: public

[ Top ]

__construct (Constructor)   [line 131]

PEAR_PackageFile_v2 __construct( )

The constructor merely sets up the private error stack

[ Top ]

analyzeSourceCode   [line 1911]

void analyzeSourceCode( $file, [ $string = false])


Parameters:

   $file   — 
   $string   — 

[ Top ]

dependsOn   [line 1570]

void dependsOn( $package, $channel)


Parameters:

   $package   — 
   $channel   — 

[ Top ]

flattenFilelist   [line 660]

void flattenFilelist( )

Convert a recursive set of <dir> and <file> tags into a single <dir> tag with <file> tags.

[ Top ]

fromArray   [line 806]

void fromArray( array $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


Parameters:

array   $pinfo   — 

[ Top ]

getArchiveFile   [line 793]

void getArchiveFile( )


[ Top ]

getArray   [line 834]

void getArray( [ $forReg = false])


Parameters:

   $forReg   — 

[ Top ]

getBundledPackages   [line 1836]

void getBundledPackages( )


[ Top ]

getChangelog   [line 1799]

array getChangelog( )


[ Top ]

getChannel   [line 901]

void getChannel( )


[ Top ]

getCompatible   [line 1495]

array|false getCompatible( )


[ Top ]

getConfigureOptions   [line 1210]

array|false getConfigureOptions( )

Return configure options array, if any

[ Top ]

getContents   [line 1372]

void getContents( )

Retrieve the contents tag

[ Top ]

getContributors   [line 1026]

void getContributors( )


[ Top ]

getDate   [line 1072]

void getDate( )


[ Top ]

getDefaultGenerator   [line 1902]

void &getDefaultGenerator( )


[ Top ]

getDependencies   [line 1503]

void getDependencies( )


[ Top ]

getDependencyGroup   [line 1618]

array|false getDependencyGroup( string $name)

Get the contents of a dependency group

Parameters:

string   $name   — 

[ Top ]

getDeps   [line 1647]

array|false getDeps( [boolean $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


Parameters:

boolean   $raw   —  return package.xml 2.0 <dependencies> tag
   $nopearinstaller   — 

[ Top ]

getDescription   [line 936]

void getDescription( )


[ Top ]

getDevelopers   [line 1018]

void getDevelopers( )


[ Top ]

getDirtree   [line 1432]

void getDirtree( )


[ Top ]

getExtends   [line 920]

void getExtends( )


[ Top ]

getFileContents   [line 1857]

string getFileContents( string $file)

Get the contents of a file listed within the package.xml

Parameters:

string   $file   — 

[ Top ]

getFilelist   [line 1173]

void getFilelist( [ $preserve = false])

This should only be used to retrieve filenames and install attributes

Parameters:

   $preserve   — 

[ Top ]

getHelpers   [line 1034]

void getHelpers( )


[ Top ]

getInstallationFilelist   [line 1249]

array getInstallationFilelist( [ $forfilecheck = false])

Retrieve a list of files that should be installed on this computer

Parameters:

   $forfilecheck   — 

[ Top ]

getInstalledBinary   [line 178]

void getInstalledBinary( )


[ Top ]

getInstalledLocation   [line 1347]

void getInstalledLocation( $file)


Parameters:

   $file   — 

[ Top ]

getLastInstalledVersion   [line 535]

string|false getLastInstalledVersion( )


[ Top ]

getLastModified   [line 1844]

void getLastModified( )


[ Top ]

getLeads   [line 1010]

void getLeads( )


[ Top ]

getLicense   [line 1115]

void getLicense( [ $raw = false])


Parameters:

   $raw   — 

[ Top ]

getLicenseLocation   [line 1130]

void getLicenseLocation( )


[ Top ]

getMaintainers   [line 944]

void getMaintainers( [ $raw = false])


Parameters:

   $raw   — 

[ Top ]

getName   [line 888]

void getName( )


[ Top ]

getNotes   [line 1138]

void getNotes( )


[ Top ]

getPackage   [line 893]

void getPackage( )


[ Top ]

getPackageFile   [line 788]

void getPackageFile( )


[ Top ]

getPackageType   [line 1758]

php|extsrc|extbin|zendextsrc|zendextbin|bundle|false getPackageType( )


[ Top ]

getPackagexmlVersion   [line 1812]

void getPackagexmlVersion( )


[ Top ]

getPEARDependency2   [line 169]

PEAR_Dependency2 &getPEARDependency2( PEAR_Config &$c, array $o, array $p, [int $s = PEAR_VALIDATE_INSTALLING])

To make unit-testing easier
  • Access: protected

Parameters:

PEAR_Config   &$c   — 
array   $o   —  options
array   $p   —  package name as returned from PEAR_Registry::parsePackageName()
int   $s   —  PEAR_VALIDATE_* constant

[ Top ]

getPEARDownloader   [line 154]

PEAR_Downloader &getPEARDownloader( PEAR_Frontend_* &$i, array $o, PEAR_Config &$c)

To make unit-testing easier
  • Access: protected

Parameters:

PEAR_Frontend_*   &$i   — 
array   $o   —  options
PEAR_Config   &$c   — 

[ Top ]

getProvidesExtension   [line 268]

string|false getProvidesExtension( )

  • Return: Extension name

[ Top ]

getReleases   [line 1784]

array|false getReleases( )


[ Top ]

getRequestedGroup   [line 513]

void getRequestedGroup( )


[ Top ]

getRW   [line 1882]

void &getRW( )


[ Top ]

getSourcePackage   [line 1826]

array|false getSourcePackage( )


[ Top ]

getStability   [line 1099]

void getStability( )


[ Top ]

getState   [line 1107]

void getState( [ $key = 'release'])


Parameters:

   $key   — 

[ Top ]

getSummary   [line 928]

void getSummary( )


[ Top ]

getTask   [line 1966]

boolean getTask( string $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


Parameters:

string   $task   — 

[ Top ]

getTasksNs   [line 1941]

void getTasksNs( )


[ Top ]

getTime   [line 1080]

void getTime( )


[ Top ]

getUri   [line 912]

void getUri( )


[ Top ]

getUsesrole   [line 1150]

array|false getUsesrole( )

Return the <usesrole> tag contents, if any

[ Top ]

getUsestask   [line 1162]

array|false getUsestask( )

Return the <usestask> tag contents, if any

[ Top ]

getValidationWarnings   [line 783]

array getValidationWarnings( [boolean $purge = true])

Wrapper to PEAR_ErrorStack::getErrors()

Parameters:

boolean   $purge   —  determines whether to purge the error stack after retrieving

[ Top ]

getVersion   [line 1091]

void getVersion( [package|api $key = 'release'])


Parameters:

package|api   $key   —  version category to return

[ Top ]

hasDeps   [line 1807]

void hasDeps( )


[ Top ]

initPostinstallScripts   [line 594]

bool 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


[ Top ]

installBinary   [line 190]

array|false installBinary( PEAR_Installer &$installer)

Installation of source package has failed, attempt to download and install the binary version of this package.

Parameters:

PEAR_Installer   &$installer   — 

[ Top ]

installedFile   [line 1359]

void installedFile( $file, $atts)

This is only used at install-time, after all serialization is over.

Overridden in child classes as:

PEAR_PackageFile_v2_rw::installedFile()
This is only used at install-time, after all serialization is over.

Parameters:

   $file   — 
   $atts   — 

[ Top ]

isCompatible   [line 1451]

boolean isCompatible( PEAR_PackageFile_v2|PEAR_PackageFile_v1|PEAR_Downloader_Package $pf)

Determines whether this package claims it is compatible with the version of

the package that has a recommended version dependency


Parameters:


[ Top ]

isEquivalent   [line 298]

bool isEquivalent( PEAR_PackageFile_v1 $pf1)

Tests whether every part of the package.xml 1.0 is represented in

this package.xml 2.0


Parameters:

PEAR_PackageFile_v1   $pf1   — 

[ Top ]

isExtension   [line 283]

bool isExtension( string $extension)


Parameters:

string   $extension   —  Extension name

[ Top ]

isIncomplete   [line 818]

void isIncomplete( )


[ Top ]

isSubpackage   [line 1523]

bool isSubpackage( PEAR_PackageFile_v1|PEAR_PackageFile_v2 $p)

Determines whether the passed in package is a subpackage of this package.

No version checking is done, only name verification.


Parameters:


[ Top ]

isSubpackageOf   [line 1511]

void isSubpackageOf( $p)


Parameters:

   $p   — 

[ Top ]

listPostinstallScripts   [line 547]

array|false listPostinstallScripts( )

Determines whether this package.xml has post-install scripts or not

[ Top ]

packageInfo   [line 861]

void packageInfo( $field)


Parameters:

   $field   — 

[ Top ]

resetDirtree   [line 1440]

void resetDirtree( )


[ Top ]

resetFilelist   [line 1240]

void resetFilelist( )

This is only used at install-time, after all serialization is over.

[ Top ]

runPostinstallScripts   [line 645]

void runPostinstallScripts( )


[ Top ]

setCompatible   [line 767]

void setCompatible( $compat)

WARNING - do not use this function directly unless you know what you're doing

Parameters:

   $compat   — 

[ Top ]

setConfig   [line 742]

void setConfig( &$config)


Parameters:

   &$config   — 

[ Top ]

setDate   [line 1042]

void setDate( $date)


Parameters:

   $date   — 

[ Top ]

setDeps   [line 759]

void setDeps( $deps)

WARNING - do not use this function directly unless you know what you're doing

Parameters:

   $deps   — 

[ Top ]

setDirtree   [line 1424]

void setDirtree( $path)


Parameters:

   $path   — 

[ Top ]

setFileAttribute   [line 1388]

bool setFileAttribute( string $filename, string $attr, string $value, [int $index = false])

  • Return: success of operation

Parameters:

string   $filename   —  full path to file
string   $attr   —  attribute name
string   $value   —  attribute value
int   $index   —  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.

[ Top ]

setInstalledAs   [line 1339]

void setInstalledAs( string $file, string $path)

This is only used at install-time, after all serialization is over.

Overridden in child classes as:

PEAR_PackageFile_v2_rw::setInstalledAs()
This is only used at install-time, after all serialization is over.

Parameters:

string   $file   —  file name
string   $path   —  installed path

[ Top ]

setLastInstalledVersion   [line 527]

void setLastInstalledVersion( string $version)

For saving in the registry.

Set the last version that was installed


Parameters:

string   $version   — 

[ Top ]

setLogger   [line 748]

void setLogger( &$logger)


Parameters:

   &$logger   — 

[ Top ]

setPackagefile   [line 772]

void setPackagefile( $file, [ $archive = false])


Parameters:

   $file   — 
   $archive   — 

[ Top ]

setRawChannel   [line 503]

void setRawChannel( $channel)

WARNING - do not use this function unless you know what you're doing

Parameters:

   $channel   — 

[ Top ]

setRawCompatible   [line 487]

void setRawCompatible( $compatible)

WARNING - do not use this function unless you know what you're doing

Parameters:

   $compatible   — 

[ Top ]

setRawPackage   [line 495]

void setRawPackage( $package)

WARNING - do not use this function unless you know what you're doing

Parameters:

   $package   — 

[ Top ]

setRawState   [line 476]

void setRawState( $state)

WARNING - do not use this function unless you know what you're doing

Parameters:

   $state   — 

[ Top ]

setRequestedGroup   [line 508]

void setRequestedGroup( $group)


Parameters:

   $group   — 

[ Top ]

setTime   [line 1057]

void setTime( $time)


Parameters:

   $time   — 

[ Top ]

toArray   [line 826]

array toArray( [ $forreg = false])


Parameters:

   $forreg   — 

[ Top ]

validate   [line 1923]

void validate( [ $state = PEAR_VALIDATE_NORMAL])


Parameters:

   $state   — 

[ Top ]

_getFlattenedFilelist   [line 702]

array _getFlattenedFilelist( array &$files, array $dir, [string|false $baseinstall = false], [string $path = ''])

  • Access: protected

Parameters:

array   &$files   —  the final flattened file list
array   $dir   —  the current directory being processed
string|false   $baseinstall   —  any recursively inherited baeinstalldir attribute
string   $path   —  private recursion variable

[ Top ]


Documentation generated on Fri, 31 Jul 2015 09:30:27 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.