Subversion Repositories Applications.gtt

Rev

Rev 94 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 187
Line 2... Line 2...
2
/**
2
/**
3
 * <tasks:replace> - read/write version
3
 * <tasks:replace> - read/write version
4
 *
4
 *
5
 * PHP versions 4 and 5
5
 * PHP versions 4 and 5
6
 *
6
 *
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.
-
 
12
 *
-
 
13
 * @category   pear
7
 * @category  pear
14
 * @package    PEAR
8
 * @package   PEAR
15
 * @author     Greg Beaver <cellog@php.net>
9
 * @author    Greg Beaver <cellog@php.net>
16
 * @copyright  1997-2006 The PHP Group
10
 * @copyright 1997-2009 The Authors
17
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
11
 * @license   http://opensource.org/licenses/bsd-license.php New BSD License
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
12
 * @link      http://pear.php.net/package/PEAR
20
 * @since      File available since Release 1.4.0a10
13
 * @since     File available since Release 1.4.0a10
21
 */
14
 */
22
/**
15
/**
23
 * Base class
16
 * Base class
24
 */
17
 */
25
require_once 'PEAR/Task/Replace.php';
18
require_once 'PEAR/Task/Replace.php';
26
/**
19
/**
27
 * Abstracts the replace task xml.
20
 * Abstracts the replace task xml.
28
 * @category   pear
21
 * @category   pear
29
 * @package    PEAR
22
 * @package    PEAR
30
 * @author     Greg Beaver <cellog@php.net>
23
 * @author     Greg Beaver <cellog@php.net>
31
 * @copyright  1997-2006 The PHP Group
24
 * @copyright  1997-2009 The Authors
32
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
25
 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
33
 * @version    Release: 1.5.1
26
 * @version    Release: 1.10.1
34
 * @link       http://pear.php.net/package/PEAR
27
 * @link       http://pear.php.net/package/PEAR
35
 * @since      Class available since Release 1.4.0a10
28
 * @since      Class available since Release 1.4.0a10
36
 */
29
 */
37
class PEAR_Task_Replace_rw extends PEAR_Task_Replace
30
class PEAR_Task_Replace_rw extends PEAR_Task_Replace
38
{
31
{
39
    function PEAR_Task_Replace_rw(&$pkg, &$config, &$logger, $fileXml)
32
    public function __construct(&$pkg, &$config, &$logger, $fileXml)
40
    {
33
    {
41
        parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE);
34
        parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
42
        $this->_contents = $fileXml;
35
        $this->_contents = $fileXml;
43
        $this->_pkg = &$pkg;
36
        $this->_pkg = &$pkg;
44
        $this->_params = array();
37
        $this->_params = array();
45
    }
38
    }
Line 46... Line 39...
46
 
39
 
47
    function validate()
40
    public function validate()
48
    {
41
    {
49
        return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents);
42
        return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents);
Line 50... Line 43...
50
    }
43
    }
51
 
44
 
52
    function setInfo($from, $to, $type)
45
    public function setInfo($from, $to, $type)
53
    {
46
    {
Line 54... Line 47...
54
        $this->_params = array('attribs' => array('from' => $from, 'to' => $to, 'type' => $type));
47
        $this->_params = array('attribs' => array('from' => $from, 'to' => $to, 'type' => $type));
55
    }
48
    }
56
 
49
 
57
    function getName()
50
    public function getName()
Line 58... Line 51...
58
    {
51
    {
59
        return 'replace';
52
        return 'replace';
60
    }
53
    }
61
 
54
 
62
    function getXml()
55
    public function getXml()
63
    {
-
 
64
        return $this->_params;
56
    {