Source for file rw.php
Documentation is available at rw.php
* <tasks:postinstallscript> - read/write version
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a10
require_once 'PEAR/Task/Postinstallscript.php';
* Abstracts the postinstallscript file task xml.
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 1.9.4
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a10
* parent package file object
* @var PEAR_PackageFile_v2_rw
* Enter description here...
* @param PEAR_PackageFile_v2_rw $pkg
* @param PEAR_Config $config
* @param PEAR_Frontend $logger
* @return PEAR_Task_Postinstallscript_rw
$this->_contents = $fileXml;
$this->_params = array ();
return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents);
return 'postinstallscript';
* add a simple <paramgroup> to the post-install script
* Order is significant, so call this method in the same
* sequence the users should see the paramgroups. The $params
* parameter should either be the result of a call to {@link getParam()}
* or an array of calls to getParam().
* Use {@link addConditionTypeGroup()} to add a <paramgroup> containing
* @param string $id <paramgroup> id as seen by the script
* @param array|false$params array of getParam() calls, or false for no params
* @param string|false$instructions
function addParamGroup($id, $params = false , $instructions = false )
if ($params && isset ($params[0 ]) && !isset ($params[1 ])) {
$this->_pkg->getTasksNs () . ':id' => $id,
$stuff[$this->_pkg->getTasksNs () . ':instructions'] = $instructions;
$stuff[$this->_pkg->getTasksNs () . ':param'] = $params;
$this->_params[$this->_pkg->getTasksNs () . ':paramgroup'][] = $stuff;
* add a complex <paramgroup> to the post-install script with conditions
* This inserts a <paramgroup> with
* Order is significant, so call this method in the same
* sequence the users should see the paramgroups. The $params
* parameter should either be the result of a call to {@link getParam()}
* or an array of calls to getParam().
* Use {@link addParamGroup()} to add a simple <paramgroup>
* @param string $id <paramgroup> id as seen by the script
* @param string $oldgroup <paramgroup> id of the section referenced by
* @param string $param name of the <param> from the older section referenced
* @param string $value value to match of the parameter
* @param string $conditiontype one of '=', '!=', 'preg_match'
* @param array|false$params array of getParam() calls, or false for no params
* @param string|false$instructions
$params = false , $instructions = false )
if ($params && isset ($params[0 ]) && !isset ($params[1 ])) {
$this->_pkg->getTasksNs () . ':id' => $id,
$stuff[$this->_pkg->getTasksNs () . ':instructions'] = $instructions;
$stuff[$this->_pkg->getTasksNs () . ':name'] = $oldgroup . '::' . $param;
$stuff[$this->_pkg->getTasksNs () . ':conditiontype'] = $conditiontype;
$stuff[$this->_pkg->getTasksNs () . ':value'] = $value;
$stuff[$this->_pkg->getTasksNs () . ':param'] = $params;
$this->_params[$this->_pkg->getTasksNs () . ':paramgroup'][] = $stuff;
* Use to set up a param tag for use in creating a paramgroup
function getParam($name, $prompt, $type = 'string', $default = null )
$this->_pkg->getTasksNs () . ':name' => $name,
$this->_pkg->getTasksNs () . ':prompt' => $prompt,
$this->_pkg->getTasksNs () . ':type' => $type,
$this->_pkg->getTasksNs () . ':default' => $default
$this->_pkg->getTasksNs () . ':name' => $name,
$this->_pkg->getTasksNs () . ':prompt' => $prompt,
$this->_pkg->getTasksNs () . ':type' => $type,
Documentation generated on Wed, 06 Jul 2011 23:31:20 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.
|