/** * Determine changes between two routes with the same tag * * @param Route $o - Old value * @param Route $n - New value * @return Array - of changes */ protected function dataUpdated(Route $o, Route $n) { $changes = array(); if ($o->getTitle() != $n->getTitle()) { $changes["title"] = $o->getTitle() . " | " . $n->getTitle(); } if ($o->getShortTitle() != $n->getShortTitle()) { $changes["short title"] = $o->getShortTitle() . " | " . $n->getShortTitle(); } if ($o->getColor() != $n->getColor()) { $changes["color"] = $o->getColor() . " | " . $n->getColor(); } if ($o->getLatMax() != $n->getLatMax()) { $changes["lat max"] = $o->getLatMax() . " | " . $n->getLatMax(); } if ($o->getLatMin() != $n->getLatMin()) { $changes["lat min"] = $o->getLatMin() . " | " . $n->getLatMin(); } if ($o->getLonMax() != $n->getLonMax()) { $changes["lon max"] = $o->getLonMax() . " | " . $n->getLonMax(); } if ($o->getLonMin() != $n->getLonMin()) { $changes["lon min"] = $o->getLonMin() . " | " . $n->getLonMin(); } if ($o->getVehicleType() != $n->getVehicleType()) { $changes["vehicle type"] = $o->getVehicleType() . " | " . $n->getVehicleType(); } /* if($o->getPosition() != $n->getPosition()) { $changes["position"] = $o->getPosition(). " | " .$n->getPosition(); } */ return $changes; }