function setNewPasillo($data) { $obj = $this->listPasillo; if (isset($_GET['del'])) { $obj->offsetUnset($_GET['del']); } else { $pasillo = new Pasillo(); $pasillo->setName($data['nomPasillo']); $pasillo->setNumber($data['numPasillo']); $pasillo->setTypeProducts(new SplDoublyLinkedList()); $obj->push($pasillo); } $_SESSION['listPasillo'] = serialize($obj); header("location: " . $_SERVER['HTTP_REFERER'] . " "); }
private function getListPasillos($namePasillo, $numPasillo, &$listTypeProducts, &$list) { $pasillo = new Pasillo(); $pasillo->setName($namePasillo); $pasillo->setNumber($numPasillo); $pasillo->setTypeProducts($listTypeProducts); $list->push($pasillo); $listTypeProducts = new SplDoublyLinkedList(); }