Esempio n. 1
0
 protected function addZoneImpl(Zone $zone)
 {
     $zone->setId($this->nextId());
     $this->getMain()->getServer()->getScheduler()->scheduleAsyncTask(new FileWriteTask($this->dir . "zones/" . $zone->getId() . ".weaz", json_encode(["Id" => $zone->getId(), "Space" => serialize($zone->getSpace()), "Type" => $zone->getType()])));
 }
 protected function addZoneImpl(Zone $zone)
 {
     $this->stream->addQuery(new QueryRequest($this->getMain(), "INSERT INTO wea_zones (type, space)" . "VALUES ({$zone->getType()}, {$this->esc(serialize($zone->getSpace()))})", new InsertZoneListener($zone)));
 }