public function guardar(Supermercat $super, $depenDe)
 {
     $nouid = 0;
     if ($super->getId() != null && $super->getId()->getInteger() != null) {
         $nouid = $this->tablegateway->update(array("nom" => $super->getNom()->getString()), "ID=" . $super->getId()->getInteger());
     } else {
         $nouid = $this->tablegateway->insert(array("nom" => $super->getNom()->getString(), "depen_de" => $depenDe->getInteger()));
     }
     return new Integer($nouid);
 }
 public function convertir(Supermercat $s)
 {
     $this->id = $s->getId()->getInteger();
     $this->nom = $s->getNom()->getString();
 }