WA_AltClassIterator has a deprecated constructor
Hello,
I'm trying to update an old control panel (built with an old version of DataBridge) but I've a problem with this code (see the php page in the private message, raws 57-84):
--------
<?php
//WA AltClass Iterator
class WA_AltClassIterator {
var $DisplayIndex;
var $DisplayArray;
function WA_AltClassIterator($theDisplayArray = array(1)) {
$this->ClassCounter = 0;
$this->ClassArray = $theDisplayArray;
}
function getClass($incrementClass) {
if (sizeof($this->ClassArray) == 0) return "";
if ($incrementClass) {
if ($this->ClassCounter >= sizeof($this->ClassArray)) $this->ClassCounter = 0;
$this->ClassCounter++;
}
if ($this->ClassCounter > 0)
return $this->ClassArray[$this->ClassCounter-1];
else
return $this->ClassArray[0];
}
}
?>
<?php
//WA Alternating Class
$WARRT_AltClass1 = new WA_AltClassIterator(explode("|", "|WADAResultsRowDark"));
?>
--------
When I open the browser, I see this alert:
------------
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; WA_AltClassIterator has a deprecated constructor in /Applications/MAMP/htdocs/website/index.php on line 59
------------
Is possible to update this code with the new version or is better rebuild from scratch all the pages (I mean delete/insert/update behaviours)?
Thanks.