Class providing common functionality for PEAR administration classes.
Located in /maintenance/libraries/pear/PEAR/Common.php (line 105)
PEAR | --PEAR_Common
Class | Description |
---|---|
![]() |
Administration class used to make a PEAR release tarball. |
![]() |
Administration class used to download PEAR packages and maintain the installed package database. |
![]() |
Class to handle building (compiling) extensions. |
Configuration object (PEAR_Config).
array of attributes of the currently parsed XML element
name of currently parsed XML element
stack of elements, gives some sort of XML context
assoc with information about a package
PEAR_SourceAnalyzer instance
User Interface object (PEAR_Frontend_* class). If null, the log() method uses print.
Flag variable used to mark a valid package file
PEAR_Common constructor
Register a temporary file or directory. When the destructor is executed, all registered temporary files and directories are removed.
Analyze the source code of the given PHP file
Return an array containing all of the states that are more stable than or equal to the passed in state
Build a "provides" array from data returned by analyzeSourceCode(). The format of the built array is like this:
array( 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'), ... )
Download a file through HTTP. Considers suggested file name in
Content-disposition: header and can run a callback function for different events. The callback will be called with two parameters: the callback type, and parameters. The implemented callback types are:
'setup' called at the very beginning, parameter is a UI object that should be used for all output 'message' the parameter is a string with an informational message 'saveas' may be used to save with a different file name, the parameter is the filename that is about to be used. If a 'saveas' callback returns a non-empty string, that file name will be used as the filename instead. Note that $save_dir will not be affected by this, only the basename of the file. 'start' download is starting, parameter is number of bytes that are expected, or -1 if unknown 'bytesread' parameter is the number of bytes read so far 'done' download is complete, parameter is the total number of bytes read 'connfailed' if the TCP connection fails, this callback is called with array(host,port,errno,errmsg) 'writefailed' if writing to disk fails, this callback is called with array(destfile,errmsg)
If an HTTP proxy has been configured (http_proxy PEAR_Config setting), the proxy will be used.
Get the implemented dependency relations (has, lt, ge etc.)
Get the implemented dependency types (php, ext, pkg etc.)
Get the implemented file roles
Get the implemented file replacement types in
Get the valid package release states of packages
Get the implemented file replacement types in
Get the implemented file replacement types in
Get the valid roles for a PEAR package maintainer
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.
Returns information about a package file. Expects the name of a package xml file as input.
Returns information about a package file. Expects the contents of a package xml file as input.
Returns information about a package file. Expects the name of a gzipped tar file as input.
Logging method.
Wrapper to System::mkDir(), creates a directory as well as any necessary parent directories.
Create and register a temporary directory.
Set object that represents the frontend to be used.
Sort a list of arrays of array(downloaded packagefilename) by dependency.
It also removes duplicate dependencies
Validate XML package definition file.
Test whether a string contains a valid package name.
Test whether a string contains a valid package version.
Return an XML document based on the package info (as returned by the PEAR_Common::infoFrom* methods).
XML parser callback for ending elements. Used while package format version is not yet known.
XML parser callback for ending elements. Used for version 1.0 packages.
XML parser callback for starting elements. Used while package format version is not yet known.
XML parser callback for ending elements. Used for version 1.0 packages.
get an array of package dependency names
get an array representation of the package dependency tree
get an array of package dependency names for uninstall
Generate part of an XML description with release information.
PEAR_Common destructor
XML parser callback for character data. Used for version 1.0 packages.
get an array of package dependency names for uninstall
Compare two package's package.xml, and sort so that dependencies are installed first
This is a crude compare, real dependency checking is done on install. The only purpose this serves is to make the command-line order-independent (you can list a dependent package first, and installation occurs in the order required)
Compare two package's package.xml, and sort so that dependencies are uninstalled last
This is a crude compare, real dependency checking is done on uninstall. The only purpose this serves is to make the command-line order-independent (you can list a dependency first, and uninstallation occurs in the order required)
Unindent given string (?)
Documentation generated on Fri, 24 Dec 2004 13:01:43 +0000 by phpDocumentor 1.3.0RC3