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

Class: PEAR_PackageFile_v2_rw

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

Class Overview

PEAR_PackageFile_v2
   |
   --PEAR_PackageFile_v2_rw



Author(s):

Version:

  • Release: 1.10.0dev2

Copyright:

  • 1997-2009 The Authors

Methods


Inherited Variables

Inherited Methods

Class: PEAR_PackageFile_v2

PEAR_PackageFile_v2::PEAR_PackageFile_v2()
PHP 4 style constructor for backwards compatibility.
PEAR_PackageFile_v2::__construct()
The constructor merely sets up the private error stack
PEAR_PackageFile_v2::analyzeSourceCode()
PEAR_PackageFile_v2::dependsOn()
PEAR_PackageFile_v2::flattenFilelist()
Convert a recursive set of <dir> and <file> tags into a single <dir> tag with <file> tags.
PEAR_PackageFile_v2::fromArray()
Directly set the array that defines this packagefile
PEAR_PackageFile_v2::getArchiveFile()
PEAR_PackageFile_v2::getArray()
PEAR_PackageFile_v2::getBundledPackages()
PEAR_PackageFile_v2::getChangelog()
PEAR_PackageFile_v2::getChannel()
PEAR_PackageFile_v2::getCompatible()
PEAR_PackageFile_v2::getConfigureOptions()
Return configure options array, if any
PEAR_PackageFile_v2::getContents()
Retrieve the contents tag
PEAR_PackageFile_v2::getContributors()
PEAR_PackageFile_v2::getDate()
PEAR_PackageFile_v2::getDefaultGenerator()
PEAR_PackageFile_v2::getDependencies()
PEAR_PackageFile_v2::getDependencyGroup()
Get the contents of a dependency group
PEAR_PackageFile_v2::getDeps()
Retrieve a partial package.xml 1.0 representation of dependencies
PEAR_PackageFile_v2::getDescription()
PEAR_PackageFile_v2::getDevelopers()
PEAR_PackageFile_v2::getDirtree()
PEAR_PackageFile_v2::getExtends()
PEAR_PackageFile_v2::getFileContents()
Get the contents of a file listed within the package.xml
PEAR_PackageFile_v2::getFilelist()
This should only be used to retrieve filenames and install attributes
PEAR_PackageFile_v2::getHelpers()
PEAR_PackageFile_v2::getInstallationFilelist()
Retrieve a list of files that should be installed on this computer
PEAR_PackageFile_v2::getInstalledBinary()
PEAR_PackageFile_v2::getInstalledLocation()
PEAR_PackageFile_v2::getLastInstalledVersion()
PEAR_PackageFile_v2::getLastModified()
PEAR_PackageFile_v2::getLeads()
PEAR_PackageFile_v2::getLicense()
PEAR_PackageFile_v2::getLicenseLocation()
PEAR_PackageFile_v2::getMaintainers()
PEAR_PackageFile_v2::getName()
PEAR_PackageFile_v2::getNotes()
PEAR_PackageFile_v2::getPackage()
PEAR_PackageFile_v2::getPackageFile()
PEAR_PackageFile_v2::getPackageType()
PEAR_PackageFile_v2::getPackagexmlVersion()
PEAR_PackageFile_v2::getPEARDependency2()
To make unit-testing easier
PEAR_PackageFile_v2::getPEARDownloader()
To make unit-testing easier
PEAR_PackageFile_v2::getProvidesExtension()
PEAR_PackageFile_v2::getReleases()
PEAR_PackageFile_v2::getRequestedGroup()
PEAR_PackageFile_v2::getRW()
PEAR_PackageFile_v2::getSourcePackage()
PEAR_PackageFile_v2::getStability()
PEAR_PackageFile_v2::getState()
PEAR_PackageFile_v2::getSummary()
PEAR_PackageFile_v2::getTask()
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>
PEAR_PackageFile_v2::getTasksNs()
PEAR_PackageFile_v2::getTime()
PEAR_PackageFile_v2::getUri()
PEAR_PackageFile_v2::getUsesrole()
Return the <usesrole> tag contents, if any
PEAR_PackageFile_v2::getUsestask()
Return the <usestask> tag contents, if any
PEAR_PackageFile_v2::getValidationWarnings()
Wrapper to PEAR_ErrorStack::getErrors()
PEAR_PackageFile_v2::getVersion()
PEAR_PackageFile_v2::hasDeps()
PEAR_PackageFile_v2::initPostinstallScripts()
Initialize post-install scripts for running
PEAR_PackageFile_v2::installBinary()
Installation of source package has failed, attempt to download and install the binary version of this package.
PEAR_PackageFile_v2::installedFile()
This is only used at install-time, after all serialization is over.
PEAR_PackageFile_v2::isCompatible()
Determines whether this package claims it is compatible with the version of
PEAR_PackageFile_v2::isEquivalent()
Tests whether every part of the package.xml 1.0 is represented in
PEAR_PackageFile_v2::isExtension()
PEAR_PackageFile_v2::isIncomplete()
PEAR_PackageFile_v2::isSubpackage()
Determines whether the passed in package is a subpackage of this package.
PEAR_PackageFile_v2::isSubpackageOf()
PEAR_PackageFile_v2::listPostinstallScripts()
Determines whether this package.xml has post-install scripts or not
PEAR_PackageFile_v2::packageInfo()
PEAR_PackageFile_v2::resetDirtree()
PEAR_PackageFile_v2::resetFilelist()
This is only used at install-time, after all serialization is over.
PEAR_PackageFile_v2::runPostinstallScripts()
PEAR_PackageFile_v2::setCompatible()
WARNING - do not use this function directly unless you know what you're doing
PEAR_PackageFile_v2::setConfig()
PEAR_PackageFile_v2::setDate()
PEAR_PackageFile_v2::setDeps()
WARNING - do not use this function directly unless you know what you're doing
PEAR_PackageFile_v2::setDirtree()
PEAR_PackageFile_v2::setFileAttribute()
PEAR_PackageFile_v2::setInstalledAs()
This is only used at install-time, after all serialization is over.
PEAR_PackageFile_v2::setLastInstalledVersion()
For saving in the registry.
PEAR_PackageFile_v2::setLogger()
PEAR_PackageFile_v2::setPackagefile()
PEAR_PackageFile_v2::setRawChannel()
WARNING - do not use this function unless you know what you're doing
PEAR_PackageFile_v2::setRawCompatible()
WARNING - do not use this function unless you know what you're doing
PEAR_PackageFile_v2::setRawPackage()
WARNING - do not use this function unless you know what you're doing
PEAR_PackageFile_v2::setRawState()
WARNING - do not use this function unless you know what you're doing
PEAR_PackageFile_v2::setRequestedGroup()
PEAR_PackageFile_v2::setTime()
PEAR_PackageFile_v2::toArray()
PEAR_PackageFile_v2::validate()
PEAR_PackageFile_v2::_getFlattenedFilelist()

Class Details

[line 29]


[ Top ]


Method Detail

addArchDep   [line 1187]

void addArchDep( string $pattern, [boolean $conflicts = false])


Parameters:

string   $pattern   —  Architecture matching pattern
boolean   $conflicts   —  true if this package cannot be installed on this architecture

[ Top ]

addBinarypackage   [line 1335]

void addBinarypackage( string $package)

Add an extension binary package for this extension source code release

Note that the package must be from the same channel as the extension source package


Parameters:

string   $package   — 

[ Top ]

addBundledPackage   [line 467]

void addBundledPackage( string $path)


Parameters:

string   $path   —  relative path of the bundled package.

[ Top ]

addCompatiblePackage   [line 594]

void addCompatiblePackage( string $name, string $channel, string $min, string $max, [string $exclude = false])


Parameters:

string   $name   —  Dependent package name
string   $channel   —  Dependent package's channel name
string   $min   —  minimum version of specified package that this release is guaranteed to be compatible with
string   $max   —  maximum version of specified package that this release is guaranteed to be compatible with
string   $exclude   —  versions of specified package that this release is not compatible with

[ Top ]

addConfigureOption   [line 1357]

void addConfigureOption( string $name, string $prompt, [string $default = null])

Add a configureoption to an extension source package

Parameters:

string   $name   — 
string   $prompt   — 
string   $default   — 

[ Top ]

addConflictingPackageDepWithChannel   [line 788]

void addConflictingPackageDepWithChannel( string $name, string $channel, [string $providesextension = false], [string|false $min = false], [string|false $max = false], [array|false $exclude = false])

Mark a package as conflicting with this package

Parameters:

string   $name   —  package name
string   $channel   —  package channel
string   $providesextension   —  extension this package provides, if any
string|false   $min   —  minimum version required
string|false   $max   —  maximum version allowed
array|false   $exclude   —  versions to exclude from installation

[ Top ]

addConflictingPackageDepWithUri   [line 810]

void addConflictingPackageDepWithUri( string $name, string $uri, [string $providesextension = false])

Mark a package as conflicting with this package

Parameters:

string   $name   —  package name
string   $uri   —  package channel
string   $providesextension   —  extension this package provides, if any

[ Top ]

addDependencyGroup   [line 832]

void addDependencyGroup( $name, $hint)


Parameters:

   $name   — 
   $hint   — 

[ Top ]

addExtensionDep   [line 1143]

void addExtensionDep( optional|required $type, string $name, [string $min = false], [string $max = false], [string $recommended = false], [array $exclude = false])


Parameters:

optional|required   $type   —  optional, required
string   $name   —  extension name
string   $min   —  minimum version
string   $max   —  maximum version
string   $recommended   —  recommended version
array   $exclude   —  incompatible versions

[ Top ]

addExtensionInstallCondition   [line 1427]

void addExtensionInstallCondition( optional|required $name, [string $min = false], [string $max = false], [string $recommended = false], [string $exclude = false], array 5)


Parameters:

array   5   —  incompatible versions
optional|required   $name   —  optional, required
string   $min   —  extension name
string   $max   —  minimum version
string   $recommended   —  maximum version
string   $exclude   —  recommended version

[ Top ]

addFile   [line 552]

void addFile( string $dir, string $file, array $attrs)


Parameters:

string   $dir   —  path to the file
string   $file   —  filename
array   $attrs   —  extra attributes

[ Top ]

addGroupExtensionDep   [line 958]

void addGroupExtensionDep( string $groupname, string $name, [string $min = false], [string $max = false], [string $recommended = false], [array $exclude = false])


Parameters:

string   $groupname   —  group name (must be pre-existing)
string   $name   —  extension name
string   $min   —  minimum version allowed
string   $max   —  maximum version allowed
string   $recommended   —  recommended version
array   $exclude   —  incompatible versions

[ Top ]

addGroupPackageDepWithChannel   [line 916]

bool addGroupPackageDepWithChannel( package|subpackage $type, string $groupname, string $name, string $channel, [string $min = false], [string $max = false], [string $recommended = false], [array|false $exclude = false], [string $providesextension = false], [bool $nodefault = false])

  • Return: false if the dependency group has not been initialized with addDependencyGroup(), or a subpackage is added with a providesextension

Parameters:

package|subpackage   $type   — 
string   $groupname   —  group name
string   $name   —  package name
string   $channel   —  package channel
string   $min   —  minimum version
string   $max   —  maximum version
string   $recommended   —  recommended version
array|false   $exclude   —  optional excluded versions
string   $providesextension   —  extension this package provides, if any
bool   $nodefault   —  if true, tells the installer to ignore the default optional dependency group when installing this package

[ Top ]

addGroupPackageDepWithURI   [line 939]

bool addGroupPackageDepWithURI( package|subpackage $type, string $groupname, string $name, string $uri, [string $providesextension = false], [bool $nodefault = false])


Parameters:

package|subpackage   $type   — 
string   $groupname   —  group name
string   $name   —  package name
string   $uri   —  package uri
string   $providesextension   —  extension this package provides, if any
bool   $nodefault   —  if true, tells the installer to ignore the default optional dependency group when installing this package

[ Top ]

addIgnore   [line 1315]

bool addIgnore( string $path)

Add a file to the current release that should be ignored
  • Return: success of operation

Parameters:

string   $path   —  <contents> path to file

[ Top ]

addInstallAs   [line 1296]

void addInstallAs( string $path, string $as)

Add a file to the current release that should be installed under a different name

Parameters:

string   $path   —  <contents> path to file
string   $as   —  name the file should be installed as

[ Top ]

addMaintainer   [line 184]

void addMaintainer( $role, $handle, $name, $email, [ $active = 'yes'])

Adds a new maintainer - no checking of duplicates is performed, use updatemaintainer for that purpose.

Parameters:

   $role   — 
   $handle   — 
   $name   — 
   $email   — 
   $active   — 

[ Top ]

addOsDep   [line 1166]

void addOsDep( string $name, [boolean $conflicts = false])


Parameters:

string   $name   —  Operating system name
boolean   $conflicts   —  true if this package cannot be installed on this OS

[ Top ]

addPackageDepWithChannel   [line 1026]

void addPackageDepWithChannel( optional|required $type, string $name, string $channel, [string $min = false], [string $max = false], [string $recommended = false], [string $exclude = false], [bool $providesextension = false], [array|false $nodefault = false])


Parameters:

optional|required   $type   — 
string   $name   —  package name
string   $channel   —  package channel
string   $min   —  minimum version
string   $max   —  maximum version
string   $recommended   —  recommended version
string   $exclude   —  extension this package provides, if any
bool   $providesextension   —  if true, tells the installer to ignore the default optional dependency group when installing this package
array|false   $nodefault   —  optional excluded versions

[ Top ]

addPackageDepWithUri   [line 1058]

void addPackageDepWithUri( optional|required $type, string $name, string $uri, [string $providesextension = false], [bool $nodefault = false])


Parameters:

optional|required   $type   — 
string   $name   —  name of the package
string   $uri   —  uri of the package
string   $providesextension   —  extension this package provides, if any
bool   $nodefault   —  if true, tells the installer to ignore the default optional dependency group when installing this package

[ Top ]

addRelease   [line 1250]

bool addRelease( )

  • Return: true if package type is set up

[ Top ]

addSubpackageDepWithChannel   [line 1089]

void addSubpackageDepWithChannel( optional|required $type, string $name, string $channel, [string $min = false], [string $max = false], [string $recommended = false], [array $exclude = false], [bool $nodefault = false])


Parameters:

optional|required   $type   —  optional, required
string   $name   —  package name
string   $channel   —  package channel
string   $min   —  minimum version
string   $max   —  maximum version
string   $recommended   —  recommended version
array   $exclude   —  incompatible versions
bool   $nodefault   —  if true, tells the installer to ignore the default optional dependency group when installing this package

[ Top ]

addSubpackageDepWithUri   [line 1117]

void addSubpackageDepWithUri( optional|required $type, string $name, string $uri, [bool $nodefault = false])


Parameters:

optional|required   $type   —  optional, required
string   $name   —  package name
string   $uri   —  package uri for download
bool   $nodefault   —  if true, tells the installer to ignore the default optional dependency group when installing this package

[ Top ]

addTaskToFile   [line 486]

void addTaskToFile( string $filename, PEAR_Task_Common $task)


Parameters:

string   $filename   —  file name
PEAR_Task_Common   $task   —  a read/write task

[ Top ]

addUsesrole   [line 629]

void addUsesrole( string $role, string $packageOrUri, [string $channel = false])


Parameters:

string   $role   — 
string   $packageOrUri   —  package name or uri
string   $channel   —  channel name if non-uri

[ Top ]

addUsestask   [line 661]

void addUsestask( string $task, string $packageOrUri, [string $channel = false])


Parameters:

string   $task   — 
string   $packageOrUri   —  package name or uri
string   $channel   —  channel name if non-uri

[ Top ]

clearChangeLog   [line 1599]

void clearChangeLog( )

Remove the changelog entirely

[ Top ]

clearCompatible   [line 680]

void clearCompatible( )

Remove all compatible tags

[ Top ]

clearContents   [line 441]

void clearContents( [string $baseinstall = false])

Reset the listing of package contents

Parameters:

string   $baseinstall   —  base installation dir for the whole package, if any

[ Top ]

clearDeps   [line 688]

void clearDeps( )

Reset dependencies prior to adding new ones

[ Top ]

deleteMaintainer   [line 265]

void deleteMaintainer( $handle)


Parameters:

   $handle   — 

[ Top ]

generateChangeLogEntry   [line 1547]

void generateChangeLogEntry( [string|false $notes = false])

Generate a valid change log entry from the current package.xml

Parameters:

string|false   $notes   — 

[ Top ]

installedFile   [line 427]

void installedFile( $file, $atts)

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

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

Parameters:

   $file   — 
   $atts   — 

[ Top ]

resetUsesrole   [line 617]

void resetUsesrole( )

Removes the <usesrole> tag entirely

[ Top ]

resetUsestask   [line 648]

void resetUsestask( )

Removes the <usestask> tag entirely

[ Top ]

setAPIStability   [line 355]

void setAPIStability( devel|alpha|beta|stable $state)


Parameters:

devel|alpha|beta|stable   $state   — 

[ Top ]

setAPIVersion   [line 319]

void setAPIVersion( $version)


Parameters:

   $version   — 

[ Top ]

setArchInstallCondition   [line 1492]

void setArchInstallCondition( string $pattern, [bool $conflicts = false])

Set an installation condition based on architecture for the current release set

Parameters:

string   $pattern   —  architecture pattern
bool   $conflicts   —  whether this arch is incompatible with the current release

[ Top ]

setChangelogEntry   [line 1567]

void setChangelogEntry( string $releaseversion, array $contents)


Parameters:

string   $releaseversion   —  release version to set change log notes for
array   $contents   —  output of generateChangeLogEntry()

[ Top ]

setChannel   [line 115]

void setChannel( $channel)


Parameters:

   $channel   — 

[ Top ]

setDescription   [line 164]

void setDescription( $desc)


Parameters:

   $desc   — 

[ Top ]

setExtends   [line 132]

void setExtends( $extends)


Parameters:

   $extends   — 

[ Top ]

setInstalledAs   [line 415]

void setInstalledAs( string $file, string $path)

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

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

Parameters:

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

[ Top ]

setLicense   [line 370]

void setLicense( $license, [ $uri = false], [ $filesource = false])


Parameters:

   $license   — 
   $uri   — 
   $filesource   — 

[ Top ]

setNotes   [line 395]

void setNotes( $notes)


Parameters:

   $notes   — 

[ Top ]

setOsInstallCondition   [line 1457]

void setOsInstallCondition( string $name, [bool $conflicts = false])

Set an installation condition based on operating system for the current release set

Parameters:

string   $name   —  OS name
bool   $conflicts   —  whether this OS is incompatible with the current release

[ Top ]

setPackage   [line 53]

void setPackage( $package)


Parameters:

   $package   — 

[ Top ]

setPackageType   [line 1216]

bool setPackageType( php|extbin|extsrc|zendextsrc|zendextbin|bundle $type)

Set the kind of package, and erase all release tags

  • a php package is a PEAR-style package
  • an extbin package is a PECL-style extension binary
  • an extsrc package is a PECL-style source for a binary
  • an zendextbin package is a PECL-style zend extension binary
  • an zendextsrc package is a PECL-style source for a zend extension binary
  • a bundle package is a collection of other pre-packaged packages

  • Return: success

Parameters:

php|extbin|extsrc|zendextsrc|zendextbin|bundle   $type   — 

[ Top ]

setPearinstallerDep   [line 744]

void setPearinstallerDep( string $min, [string $max = false], [string $recommended = false], [array $exclude = false])


Parameters:

string   $min   —  minimum allowed PEAR installer version
string   $max   —  maximum allowed PEAR installer version
string   $recommended   —  recommended PEAR installer version
array   $exclude   —  incompatible version of the PEAR installer

[ Top ]

setPhpDep   [line 705]

void setPhpDep( string $min, [string $max = false], [array $exclude = false])


Parameters:

array   $exclude   —  incompatible PHP versions
string   $min   —  minimum PHP version allowed
string   $max   —  maximum PHP version allowed

[ Top ]

setPhpInstallCondition   [line 1386]

void setPhpInstallCondition( string $min, string $max, [false|array $exclude = false])

Set an installation condition based on php version for the current release set

Parameters:

string   $min   —  minimum version
string   $max   —  maximum version
false|array   $exclude   —  incompatible versions of PHP

[ Top ]

setProvidesExtension   [line 35]

bool setProvidesExtension( string $extension)

  • Return: success of operation

Parameters:

string   $extension   —  Extension name

[ Top ]

setReleaseStability   [line 337]

void setReleaseStability( $state)

snapshot|devel|alpha|beta|stable

Parameters:

   $state   — 

[ Top ]

setReleaseVersion   [line 304]

void setReleaseVersion( $version)


Parameters:

   $version   — 

[ Top ]

setSourcePackage   [line 1528]

void setSourcePackage( string $packageOrUri)

For extension binary releases, this is used to specify either the static URI to a source package, or the package name and channel of the extsrc/zendextsrc package it is based on.

Parameters:

string   $packageOrUri   —  Package name, or full URI to source package (extsrc/zendextsrc type)

[ Top ]

setSummary   [line 148]

void setSummary( $summary)


Parameters:

   $summary   — 

[ Top ]

setUri   [line 98]

void setUri( $uri)


Parameters:

   $uri   — 

[ Top ]

updateMaintainer   [line 229]

void updateMaintainer( $newrole, $handle, $name, $email, [ $active = 'yes'])


Parameters:

   $newrole   — 
   $handle   — 
   $name   — 
   $email   — 
   $active   — 

[ Top ]


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