<?php
class parent {
function traverseTable($table) {
foreach($table->getElementsByTagName('tr') {
$rowCnt++;
$this->uniqueSearch($rowCnt);
}
}
}
class child1 extends parent {
function search($input) {
//parse input, get $table
$this->traverseTable($table);
}
function uniqueSearch($rowCnt) {
echo 'child1';
//Do different things
}
}
class child2 extends parent {
function search($input) {
//parse input, get $table
$this->traverseTable($table);
}
function uniqueSearch($rowCnt) {
echo 'child2';
//Do different things
}
}
?>