Bearsampp
2026.9.23
Toggle main menu visibility
Loading...
Searching...
No Matches
Build.php
Go to the documentation of this file.
1
<?php
17
21
require_once
'PEAR/Command/Common.php'
;
22
37
class
PEAR_Command_Build
extends
PEAR_Command_Common
38
{
39
var
$commands
= array(
40
'build'
=> array(
41
'summary'
=>
'Build an Extension From C Source'
,
42
'function'
=>
'doBuild'
,
43
'shortcut'
=>
'b'
,
44
'options'
=> array(
45
'configureoptions'
=> array(
46
'shortopt'
=>
'D'
,
47
'arg'
=>
'OPTION1=VALUE[ OPTION2=VALUE]'
,
48
'doc'
=>
'space-delimited list of configure options'
,
49
),
50
),
51
'doc'
=>
'[package.xml]
52
Builds one or more extensions contained in a package.'
53
),
54
);
55
61
function
__construct
(&
$ui
, &
$config
)
62
{
63
parent::__construct(
$ui
,
$config
);
64
}
65
66
function
doBuild
(
$command
,
$options
, $params)
67
{
68
require_once
'PEAR/Builder.php'
;
69
if
(
sizeof
($params) < 1) {
70
$params[0] =
'package.xml'
;
71
}
72
73
$configureoptions = empty(
$options
[
'configureoptions'
]) ?
''
:
$options
[
'configureoptions'
];
74
$builder =
new
PEAR_Builder
($configureoptions, $this->ui);
75
$this->debug = $this->config->get(
'verbose'
);
76
$err = $builder->build($params[0], array(&$this,
'buildCallback'
));
77
if
(
PEAR::isError
($err)) {
78
return
$err;
79
}
80
81
return
true
;
82
}
83
84
function
buildCallback
($what, $data)
85
{
86
if
(($what ==
'cmdoutput'
&& $this->debug > 1) ||
87
($what ==
'output'
&& $this->debug > 0)) {
88
$this->ui->outputData(rtrim($data),
'build'
);
89
}
90
}
91
}
PEAR_Builder
Definition
Builder.php:42
PEAR_Command_Build
Definition
Build.php:38
PEAR_Command_Build\__construct
__construct(&$ui, &$config)
Definition
Build.php:61
PEAR_Command_Build\buildCallback
buildCallback($what, $data)
Definition
Build.php:84
PEAR_Command_Build\$commands
$commands
Definition
Build.php:39
PEAR_Command_Build\doBuild
doBuild($command, $options, $params)
Definition
Build.php:66
PEAR_Command_Common
Definition
Common.php:36
PEAR_Command_Common\$config
$config
Definition
Common.php:43
PEAR_Command_Common\$ui
$ui
Definition
Common.php:54
PEAR\isError
static isError($data, $code=null)
Definition
PEAR.php:306
$options
$options
Definition
pearcmd.php:145
$command
if( $raw) foreach($opts as $opt) if( $store_system_config) if($store_user_config) $command
Definition
pearcmd.php:322
sandbox
core
libs
php
pear
pear
PEAR
Command
Build.php
Generated by
1.17.0