3 * <tasks:replace> - read/write version
9 * @author Greg Beaver <cellog@php.net>
10 * @copyright 1997-2009 The Authors
11 * @license http://opensource.org/licenses/bsd-license.php New BSD License
12 * @link http://pear.php.net/package/PEAR
13 * @since File available since Release 1.4.0a10
18 require_once 'PEAR/Task/Replace.php';
20 * Abstracts the replace task xml.
23 * @author Greg Beaver <cellog@php.net>
24 * @copyright 1997-2009 The Authors
25 * @license http://opensource.org/licenses/bsd-license.php New BSD License
26 * @version Release: 1.10.1
27 * @link http://pear.php.net/package/PEAR
28 * @since Class available since Release 1.4.0a10
30 class PEAR_Task_Replace_rw extends PEAR_Task_Replace
32 public function __construct(&$pkg, &$config, &$logger, $fileXml)
34 parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
35 $this->_contents = $fileXml;
37 $this->_params = array();
40 public function validate()
42 return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents);
45 public function setInfo($from, $to, $type)
47 $this->_params = array('attribs' => array('from' => $from, 'to' => $to, 'type' => $type));
50 public function getName()
55 public function getXml()
57 return $this->_params;