[ Index ] |
|
Code source de SPIP Agora 1.4 |
1 <?php 2 // 3 // +----------------------------------------------------------------------+ 4 // | PHP Version 5 | 5 // +----------------------------------------------------------------------+ 6 // | Copyright (c) 1997-2004 The PHP Group | 7 // +----------------------------------------------------------------------+ 8 // | This source file is subject to version 3.0 of the PHP license, | 9 // | that is bundled with this package in the file LICENSE, and is | 10 // | available through the world-wide-web at the following url: | 11 // | http://www.php.net/license/3_0.txt. | 12 // | If you did not receive a copy of the PHP license and are unable to | 13 // | obtain it through the world-wide-web, please send a note to | 14 // | license@php.net so we can mail you a copy immediately. | 15 // +----------------------------------------------------------------------+ 16 // | Author: Stig Bakken <ssb@php.net> | 17 // | Tomas V.V.Cox <cox@idecnet.com> | 18 // | | 19 // +----------------------------------------------------------------------+ 20 // 21 // $Id: Build.php,v 1.9 2004/01/08 17:33:13 sniper Exp $ 22 23 require_once "PEAR/Command/Common.php"; 24 require_once "PEAR/Builder.php"; 25 26 /** 27 * PEAR commands for building extensions. 28 * 29 */ 30 class PEAR_Command_Build extends PEAR_Command_Common 31 { 32 // {{{ properties 33 34 var $commands = array( 35 'build' => array( 36 'summary' => 'Build an Extension From C Source', 37 'function' => 'doBuild', 38 'shortcut' => 'b', 39 'options' => array(), 40 'doc' => '[package.xml] 41 Builds one or more extensions contained in a package.' 42 ), 43 ); 44 45 // }}} 46 47 // {{{ constructor 48 49 /** 50 * PEAR_Command_Build constructor. 51 * 52 * @access public 53 */ 54 function PEAR_Command_Build(&$ui, &$config) 55 { 56 parent::PEAR_Command_Common($ui, $config); 57 } 58 59 // }}} 60 61 // {{{ doBuild() 62 63 function doBuild($command, $options, $params) 64 { 65 if (sizeof($params) < 1) { 66 $params[0] = 'package.xml'; 67 } 68 $builder = &new PEAR_Builder($this->ui); 69 $this->debug = $this->config->get('verbose'); 70 $err = $builder->build($params[0], array(&$this, 'buildCallback')); 71 if (PEAR::isError($err)) { 72 return $err; 73 } 74 return true; 75 } 76 77 // }}} 78 // {{{ buildCallback() 79 80 function buildCallback($what, $data) 81 { 82 if (($what == 'cmdoutput' && $this->debug > 1) || 83 ($what == 'output' && $this->debug > 0)) { 84 $this->ui->outputData(rtrim($data), 'build'); 85 } 86 } 87 88 // }}} 89 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 14:40:03 2007 | par Balluche grâce à PHPXref 0.7 |