PHP Class PEAR_Builder

Author: Stig Sæther Bakken ([email protected])
Inheritance: extends PEAR_Common
显示文件 Open project: sourcefabric/newscoop Class Usage Examples

Public Properties

Property Type Description
$_firstline
$_lastline used for msdev builds
$current_callback Used for reporting when it is not possible to pass function via extra parameter, e.g. log, msdevCallback
$extensions_built
$php_api_version
$zend_extension_api_no
$zend_module_api_no

Public Methods

Method Description
PEAR_Builder ( object &$ui ) PEAR_Builder constructor.
_build_win32 ( $descfile, $callback = null ) Build an extension from source on windows.
_harvestInstDir ( $dest_prefix, $dirname, &$built_files )
_runCommand ( string $command, mixed $callback = null ) : boolean 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.
build ( $descfile, mixed $callback = null ) : array Build an extension from source. Runs "phpize" in the source directory, but compiles in a temporary directory (TMPDIR/pear-build-USER/PACKAGE-VERSION).
log ( $level, $msg )
msdevCallback ( $what, $data ) {{{ msdevCallback()
phpizeCallback ( string $what, mixed $data ) : void Message callback function used when running the "phpize" program. Extracts the API numbers used. Ignores other message types than "cmdoutput".

Method Details

PEAR_Builder() public method

PEAR_Builder constructor.
public PEAR_Builder ( object &$ui )
$ui object user interface object (instance of PEAR_Frontend_*)

_build_win32() public method

requires msdev
public _build_win32 ( $descfile, $callback = null )

_harvestInstDir() public method

public _harvestInstDir ( $dest_prefix, $dirname, &$built_files )

_runCommand() public method

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.
public _runCommand ( string $command, mixed $callback = null ) : boolean
$command string the command to run
$callback mixed (optional) function to use as message callback
return boolean whether the command was successful (exit code 0 means success, any other means failure)

build() public method

Build an extension from source. Runs "phpize" in the source directory, but compiles in a temporary directory (TMPDIR/pear-build-USER/PACKAGE-VERSION).
See also: PEAR_Builder::_runCommand
public build ( $descfile, mixed $callback = null ) : array
$callback mixed callback function used to report output, see PEAR_Builder::_runCommand for details
return array 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 ), ... )

log() public method

public log ( $level, $msg )

msdevCallback() public method

{{{ msdevCallback()
public msdevCallback ( $what, $data )

phpizeCallback() public method

Message callback function used when running the "phpize" program. Extracts the API numbers used. Ignores other message types than "cmdoutput".
public phpizeCallback ( string $what, mixed $data ) : void
$what string the type of message
$data mixed the message
return void

Property Details

$_firstline public_oe property

public $_firstline

$_lastline public_oe property

used for msdev builds
public $_lastline

$current_callback public_oe property

Used for reporting when it is not possible to pass function via extra parameter, e.g. log, msdevCallback
public $current_callback

$extensions_built public_oe property

public $extensions_built

$php_api_version public_oe property

public $php_api_version

$zend_extension_api_no public_oe property

public $zend_extension_api_no

$zend_module_api_no public_oe property

public $zend_module_api_no