3 * <tasks:replace> - read/write version
7 * LICENSE: This source file is subject to version 3.0 of the PHP license
8 * that is available through the world-wide-web at the following URI:
9 * http://www.php.net/license/3_0.txt. If you did not receive a copy of
10 * the PHP License and are unable to obtain it through the web, please
11 * send a note to license@php.net so we can mail you a copy immediately.
15 * @author Greg Beaver <cellog@php.net>
16 * @copyright 1997-2006 The PHP Group
17 * @license http://www.php.net/license/3_0.txt PHP License 3.0
18 * @version CVS: $Id: rw.php,v 1.3 2006/01/06 04:47:37 cellog Exp $
19 * @link http://pear.php.net/package/PEAR
20 * @since File available since Release 1.4.0a10
25 require_once 'PEAR/Task/Replace.php';
27 * Abstracts the replace task xml.
30 * @author Greg Beaver <cellog@php.net>
31 * @copyright 1997-2006 The PHP Group
32 * @license http://www.php.net/license/3_0.txt PHP License 3.0
33 * @version Release: 1.4.11
34 * @link http://pear.php.net/package/PEAR
35 * @since Class available since Release 1.4.0a10
37 class PEAR_Task_Replace_rw
extends PEAR_Task_Replace
39 function PEAR_Task_Replace_rw(&$pkg, &$config, &$logger, $fileXml)
41 parent
::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE
);
42 $this->_contents
= $fileXml;
44 $this->_params
= array();
49 return $this->validateXml($this->_pkg
, $this->_params
, $this->config
, $this->_contents
);
52 function setInfo($from, $to, $type)
54 $this->_params
= array('attribs' => array('from' => $from, 'to' => $to, 'type' => $type));
64 return $this->_params
;