Class PEAR_Builder

Description

Class to handle building (compiling) extensions.

Located in /maintenance/libraries/pear/PEAR/Builder.php (line 28)

PEAR
   |
   --PEAR_Common
      |
      --PEAR_Builder
Variable Summary
Method Summary
 PEAR_Builder PEAR_Builder (object &$ui)
 array build (string $descfile, [mixed $callback = null])
 void log (mixed $level, mixed $msg)
 void msdevCallback (mixed $what, mixed $data)
 void phpizeCallback (string $what, mixed $data)
 void _build_win32 (mixed $descfile, [mixed $callback = null])
 bool _runCommand (string $command, [mixed $callback = null])
Variables
mixed $current_callback = null (line 38)
mixed $extensions_built = array() (line 36)
mixed $php_api_version = 0 (line 32)
mixed $zend_extension_api_no = 0 (line 34)
mixed $zend_module_api_no = 0 (line 33)
mixed $_firstline = null (line 42)
mixed $_lastline = null (line 41)

Inherited Variables

Inherited from PEAR_Common

PEAR_Common::$config
PEAR_Common::$current_attributes
PEAR_Common::$current_element
PEAR_Common::$current_path
PEAR_Common::$element_stack
PEAR_Common::$pkginfo
PEAR_Common::$source_analyzer
PEAR_Common::$ui
PEAR_Common::$_validPackageFile
Methods
Constructor PEAR_Builder (line 53)

PEAR_Builder constructor.

  • access: public
PEAR_Builder PEAR_Builder (object &$ui)
  • object $ui: user interface object (instance of PEAR_Frontend_*)
build (line 178)

Build an extension from source. Runs "phpize" in the source directory, but compiles in a temporary directory (/var/tmp/pear-build-USER/PACKAGE-VERSION).

  • return: an array of associative arrays with built files, format: array( array( 'file' => '/path/to/ext.so', 'php_api' => YYYYMMDD, 'zend_mod_api' => YYYYMMDD, 'zend_ext_api' => YYYYMMDD ), ... )
  • see: PEAR_Common::infoFromDescriptionFile
  • see: PEAR_Builder::_runCommand
  • access: public
array build (string $descfile, [mixed $callback = null])
  • string $descfile: path to XML package description file
  • mixed $callback: callback function used to report output, see PEAR_Builder::_runCommand for details
log (line 378)
void log (mixed $level, mixed $msg)

Redefinition of:
PEAR_Common::log()
Logging method.
msdevCallback (line 145)
void msdevCallback (mixed $what, mixed $data)
phpizeCallback (line 309)

Message callback function used when running the "phpize" program. Extracts the API numbers used. Ignores other message types than "cmdoutput".

  • access: public
void phpizeCallback (string $what, mixed $data)
  • string $what: the type of message
  • mixed $data: the message
_build_win32 (line 67)

Build an extension from source on windows.

requires msdev

void _build_win32 (mixed $descfile, [mixed $callback = null])
_runCommand (line 349)

Run an external command, using a message callback to report output. The command will be run through popen and output is reported for every line with a "cmdoutput" message with the line string, including newlines, as payload.

  • return: whether the command was successful (exit code 0 means success, any other means failure)
  • access: private
bool _runCommand (string $command, [mixed $callback = null])
  • string $command: the command to run
  • mixed $callback: (optional) function to use as message callback

Inherited Methods

Inherited From PEAR_Common

 PEAR_Common::PEAR_Common()
 PEAR_Common::addTempFile()
 PEAR_Common::analyzeSourceCode()
 PEAR_Common::betterStates()
 PEAR_Common::buildProvidesArray()
 PEAR_Common::detectDependencies()
 PEAR_Common::downloadHttp()
 PEAR_Common::getDependencyRelations()
 PEAR_Common::getDependencyTypes()
 PEAR_Common::getFileRoles()
 PEAR_Common::getProvideTypes()
 PEAR_Common::getReleaseStates()
 PEAR_Common::getReplacementTypes()
 PEAR_Common::getScriptPhases()
 PEAR_Common::getUserRoles()
 PEAR_Common::infoFromAny()
 PEAR_Common::infoFromDescriptionFile()
 PEAR_Common::infoFromString()
 PEAR_Common::infoFromTgzFile()
 PEAR_Common::log()
 PEAR_Common::mkDirHier()
 PEAR_Common::mkTempDir()
 PEAR_Common::setFrontendObject()
 PEAR_Common::sortPkgDeps()
 PEAR_Common::validatePackageInfo()
 PEAR_Common::validPackageName()
 PEAR_Common::validPackageVersion()
 PEAR_Common::xmlFromInfo()
 PEAR_Common::_element_end()
 PEAR_Common::_element_end_1_0()
 PEAR_Common::_element_start()
 PEAR_Common::_element_start_1_0()
 PEAR_Common::_getPkgDeps()
 PEAR_Common::_getPkgDepTree()
 PEAR_Common::_getRevPkgDeps()
 PEAR_Common::_makeReleaseXml()
 PEAR_Common::_PEAR_Common()
 PEAR_Common::_pkginfo_cdata_1_0()
 PEAR_Common::_removedDependency()
 PEAR_Common::_sortPkgDeps()
 PEAR_Common::_sortPkgDepsRev()
 PEAR_Common::_unIndent()

Documentation generated on Fri, 24 Dec 2004 13:01:39 +0000 by phpDocumentor 1.3.0RC3