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

Class: package

Source Location: /pearweb-1.1.5/include/pear-database.php

Class Overview


Class to handle packages


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 340]
Class to handle packages


[ Top ]


Method Detail

add   [line 350]

mixed add( array $data)

Add new package
  • Return: ID of new package or PEAR error object

Parameters:

array   $data     

[ Top ]

allowTrackbacks   [line 1234]

void allowTrackbacks( int $name, $allow)

Enable or disable trackbacks for a package
  • Access: public

Parameters:

int   $name     ID of the package
   $allow     

[ Top ]

getDepDownloadURL   [line 551]

bool|array getDepDownloadURL( string $xsdversion, array $dependency, array $deppackage, [string $prefstate = 'stable'], [string $installed = false])

Get a download URL for a dependency, or an array containing the latest version and its release info.

If a bundle is specified, then an array of information will be returned


Parameters:

string   $xsdversion     package.xml version for the dependency (1.0 or 2.0)
array   $dependency     dependency information
array   $deppackage     dependent package information
string   $prefstate     preferred state
string   $installed     installed version of this dependency

[ Top ]

getDependants   [line 1140]

array getDependants( string $package)

Get packages that depend on the given package
  • Return: List of package that depend on $package

Parameters:

string   $package     Name of the package

[ Top ]

getDownloadURL   [line 428]

bool|array getDownloadURL( array $packageinfo, [string $prefstate = 'stable'], [string|false $installed = false])

Get a download URL, or an array containing the latest version and its release info.

If a bundle is specified, then an array of information from getDownloadURL() will be returned


Parameters:

array   $packageinfo     an array in format: array( 'channel' => channel name (not used in pear), 'package' => package name, ['version' => specific version to retrieve,] ['state' => specific state to retrieve,] ['bundle' => specific bundle to retrieve,] )
string   $prefstate     preferred_state configuration value
string|false   $installed     installed version of this package

[ Top ]

getNotes   [line 1217]

array getNotes( int $package)

Get all notes for given package
  • Access: public

Parameters:

int   $package     ID of the package

[ Top ]

getPackageFile   [line 500]

string|PEAR_Error|null getPackageFile( string|int $package, string $version)

  • Return: package.xml contents from this release

Parameters:

string|int   $package     package name or id
string   $version     release version

[ Top ]

getRecent   [line 1164]

array getRecent( int $n, string $package)

Get list of recent releases for the given package

Parameters:

int   $n     Number of releases to return
string   $package     Name of the package

[ Top ]

info   [line 680]

mixed info( mixed $pkg, [string $field = null], [boolean $allow_pecl = false])

Get package information

Parameters:

mixed   $pkg     Name of the package or it's ID
string   $field     Single field to fetch
boolean   $allow_pecl     Should PECL packages also be taken into account?

[ Top ]

isValid   [line 1199]

boolean isValid( string $package)

Determines if the given package is valid
  • Access: public

Parameters:

string   $package     Name of the package

[ Top ]

listAll   [line 852]

array listAll( [boolean $released_only = true], [boolean $stable_only = true], [boolean $include_pecl = null])

List all packages

Parameters:

boolean   $released_only     Only list released packages?
boolean   $stable_only     If listing released packages only, only list stable releases?
boolean   $include_pecl     List also PECL packages

[ Top ]

listAllNames   [line 833]

array listAllNames( )

Lists the IDs and names of all approved PEAR packages

Returns an associative array where the key of each element is a package ID, while the value is the name of the corresponding package.


[ Top ]

listAllwithReleases   [line 974]

array listAllwithReleases( )

Get list of packages and their releases
  • Access: public

[ Top ]

listLatestReleases   [line 1011]

array listLatestReleases( [string $state = ''])

List latest releases

Parameters:

string   $state     Only list release with specific state (Optional)

[ Top ]

listUpgrades   [line 1059]

array listUpgrades( array $currently_installed)

List available upgrades

Parameters:

array   $currently_installed     Array containing the currently installed packages

[ Top ]

search   [line 799]

void search( $fragment, [ $summary = false], [ $released_only = true], [ $stable_only = true], [ $include_pecl = false])


Parameters:

   $fragment     
   $summary     
   $released_only     
   $stable_only     
   $include_pecl     

[ Top ]

updateInfo   [line 1097]

mixed updateInfo( int $pkgid, array $data)

Updates fields of an existant package
  • Return: True or PEAR_Error

Parameters:

int   $pkgid     The package ID to update
array   $data     Assoc in the form 'field' => 'value'.

[ Top ]


Documentation generated on Sat, 06 Jan 2007 00:32:37 -0500 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.