cvs: pear /HTML_QuickForm_Livesearch/example myfunction.php

From: Date: Fri, 23 Jun 2006 09:54:23 +0000
Subject: cvs: pear /HTML_QuickForm_Livesearch/example myfunction.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-40874@lists.php.net to get a copy of this message
thesee Fri Jun 23 09:54:23 2006 UTC Modified files: /pear/HTML_QuickForm_Livesearch/example myfunction.php Log: update myfunction example to work with php4 http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm_Livesearch/example/myfunction.php?r1=1.2&r2=1.3&diff_format=u Index: pear/HTML_QuickForm_Livesearch/example/myfunction.php diff -u pear/HTML_QuickForm_Livesearch/example/myfunction.php:1.2 pear/HTML_QuickForm_Livesearch/example/myfunction.php:1.3 --- pear/HTML_QuickForm_Livesearch/example/myfunction.php:1.2 Thu May 25 09:24:41 2006 +++ pear/HTML_QuickForm_Livesearch/example/myfunction.php Fri Jun 23 09:54:23 2006 @@ -1,30 +1,34 @@ <?php -// $Id: myfunction.php,v 1.2 2006/05/25 09:24:41 thesee Exp $ +// $Id: myfunction.php,v 1.3 2006/06/23 09:54:23 thesee Exp $ class Test { - static $livesearch = array( - 1 => 'Orange', - 2 => 'Apple', - 3 => 'Pear', - 4 => 'Banana', - 5 => 'Blueberry' - ); - static $livesearch2 = array( + var $livesearch = array(); + var $livesearch2 = array(); + function Test() { + $this->livesearch2 = array( 1 => 'Orange-2', 2 => 'Apple-2', 3 => 'Pear-2', 4 => 'Banana-2', 5 => 'Blueberry-2' ); + $this->livesearch = array( + 1 => 'Orange', + 2 => 'Apple', + 3 => 'Pear', + 4 => 'Banana', + 5 => 'Blueberry' + ); + } function getTestName($dbh, $id) { if ($id > 0) { - return self::$livesearch[$id]; + return $this->livesearch[$id]; } } function getTestName2($dbh, $id) { if ($id > 0) { - return self::$livesearch2[$id]; + return $this->livesearch2[$id]; } } }

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