PEAR
[ class tree: PEAR ] [ index: PEAR ] [ all elements ]

Source for file rw.php

Documentation is available at rw.php

  1. <?php
  2. /**
  3.  * <tasks:replace> - read/write version
  4.  *
  5.  * PHP versions 4 and 5
  6.  *
  7.  * @category   pear
  8.  * @package    PEAR
  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.  * @version    CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $
  13.  * @link       http://pear.php.net/package/PEAR
  14.  * @since      File available since Release 1.4.0a10
  15.  */
  16. /**
  17.  * Base class
  18.  */
  19. require_once 'PEAR/Task/Replace.php';
  20. /**
  21.  * Abstracts the replace task xml.
  22.  * @category   pear
  23.  * @package    PEAR
  24.  * @author     Greg Beaver <cellog@php.net>
  25.  * @copyright  1997-2009 The Authors
  26.  * @license    http://opensource.org/licenses/bsd-license.php New BSD License
  27.  * @version    Release: 1.9.4
  28.  * @link       http://pear.php.net/package/PEAR
  29.  * @since      Class available since Release 1.4.0a10
  30.  */
  31. {
  32.     function PEAR_Task_Replace_rw(&$pkg&$config&$logger$fileXml)
  33.     {
  34.         parent::PEAR_Task_Common($config$loggerPEAR_TASK_PACKAGE);
  35.         $this->_contents $fileXml;
  36.         $this->_pkg &$pkg;
  37.         $this->_params = array();
  38.     }
  39.  
  40.     function validate()
  41.     {
  42.         return $this->validateXml($this->_pkg$this->_params$this->config$this->_contents);
  43.     }
  44.  
  45.     function setInfo($from$to$type)
  46.     {
  47.         $this->_params = array('attribs' => array('from' => $from'to' => $to'type' => $type));
  48.     }
  49.  
  50.     function getName()
  51.     {
  52.         return 'replace';
  53.     }
  54.  
  55.     function getXml()
  56.     {
  57.         return $this->_params;
  58.     }
  59. }
  60. ?>

Documentation generated on Wed, 06 Jul 2011 23:31:24 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.