Source for file Parser.php
Documentation is available at Parser.php
// +----------------------------------------------------------------------+
// | PEAR :: System :: ProcWatch :: Config :: Parser |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is available at http://www.php.net/license/3_0.txt |
// | If you did not receive a copy of the PHP license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003-2004 Michael Wallner <mike@iworks.at> |
// +----------------------------------------------------------------------+
// $Id: Parser.php 304228 2010-10-10 03:05:12Z clockwerx $
require_once 'XML/Parser.php';
* System_ProcWatch_Config_Parser
* Parses an XML configuration string into a configuration array.
* @author Michael Wallner <mike@php.net>
* @package System_ProcWatch
* @version $Revision: 304228 $
parent ::__construct (null , 'func', null );
* Get Configuration from XML data
* @param string $xml XML configuration data
$error = $this->parseString ($xml);
if (PEAR ::isError ($error)) {
if (!empty ($cdata) || $cdata === '0') {
$this->_pos .= trim($d, "\r\n");
$this->_conf[$job] = array (
'execute' => array ('shell' => array (), 'php' => array ())
$this->_cur = &$this->_conf[$job];
$this->_pos = &$this->_cur['pattern'][$a['MATCH']];
$type = strToLower (trim($a['TYPE']));
if ($type == 'presence') {
$this->_cur['condition']['presence'] = array ();
$this->_cur = &$this->_cur['condition']['presence'];
} elseif ($type == 'attr') {
$this->_cur['condition']['attr'] = array ();
$this->_cur = &$this->_cur['condition']['attr'][$a['ATTR']];
$this->_cur = &$this->_conf[$this->_job];
$count = count($this->_cur['execute'][$a['TYPE']]);
$this->_pos = &$this->_cur['execute'][$a['TYPE']][$count];
$this->_pos = &$this->_cur['max'];
$this->_pos = &$this->_cur['min'];
$this->_pos = &$this->_cur['sum'];
$this->_pos = &$this->_cur['is'];
$this->_pos = &$this->_cur['isnot'];
Documentation generated on Mon, 11 Mar 2019 15:39:51 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|