public function __construct(Server $server) { $this->time = time(); $this->server = $server; $this->path = $this->server->getCrashDumpPath() . "CrashDump_" . date("D_M_j-H.i.s-T_Y", $this->time) . ".log"; $this->fp = @fopen($this->path, "wb"); if (!is_resource($this->fp)) { throw new \RuntimeException("Could not create Crash Dump"); } $this->data["time"] = $this->time; $this->addLine($this->server->getName() . " Crash Dump " . date("D M j H:i:s T Y", $this->time)); $this->addLine(); $this->baseCrash(); $this->generalData(); $this->pluginsData(); $this->extraData(); $this->encodeData(); }