cvs: pear /Net_GameServerQuery/GameServerQuery Process.php

From: Date: Sun, 04 Jul 2004 00:33:10 +0000
Subject: cvs: pear /Net_GameServerQuery/GameServerQuery Process.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-21477@lists.php.net to get a copy of this message
ortega Sat Jul 3 20:33:10 2004 EDT Modified files: /pear/Net_GameServerQuery/GameServerQuery Process.php Log: Small changes http://cvs.php.net/diff.php/pear/Net_GameServerQuery/GameServerQuery/Process.php?r1=1.2&r2=1.3&ty=u Index: pear/Net_GameServerQuery/GameServerQuery/Process.php diff -u pear/Net_GameServerQuery/GameServerQuery/Process.php:1.2 pear/Net_GameServerQuery/GameServerQuery/Process.php:1.3 --- pear/Net_GameServerQuery/GameServerQuery/Process.php:1.2 Sat Jul 3 19:46:56 2004 +++ pear/Net_GameServerQuery/GameServerQuery/Process.php Sat Jul 3 20:33:10 2004 @@ -12,7 +12,8 @@ // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ -// | Author: Tom Buskens <ortega@php.net> | +// | Authors: Aidan Lister <aidan@php.net> | +// | Tom Buskens <ortega@php.net> | // +----------------------------------------------------------------------+ // // $id$ @@ -53,15 +54,18 @@ * @access public * @param string $string Input string * @param array $rules Processing rules + * @return array Processed string */ public function process($string, $rules) { + // Initialize variables $this->_string = $string; + $this->_Encap = new Net_GameServerQuery_Process_Encapsulate; - $this->_Encap = new Net_GameServerQuery_Process_Encapsulate; - + // Process input $this->_processString($rules); + // Return processed input return $this->_Encap->getOutput(); } @@ -186,7 +190,7 @@ // Encapsulate variable and function names case 'process': - $string = preg_replace('/\$(\w+)(?!->)/', "\$this->_Encap->vars['\\1']", $string); + $string = preg_replace('/\$(\w+)/', "\$this->_Encap->vars['\\1']", $string); $string = preg_replace('/([^ ]+)\(/', "\$this->_Encap->\\1(", $string); break;

« previous php.pear.cvs (#21477) next »