pharext\Archive::readManifest PHP Method

readManifest() private method

private readManifest ( )
    private function readManifest()
    {
        $current = ftell($this->fd);
        $header = $this->readFormat("Vlen/Vnum/napi/Vflags", $this->fd, 14);
        $alias = $this->readStringBinary($this->fd);
        $meta = $this->readSerializedBinary($this->fd);
        $entries = [];
        for ($i = 0; $i < $header["num"]; ++$i) {
            $this->readEntry($entries);
        }
        $offset = ftell($this->fd);
        if (($length = $offset - $current - 4) != $header["len"]) {
            throw new Exception("Manifest length read was '{$length}', expected '{$header["len"]}'");
        }
        return $header + compact("alias", "meta", "entries", "offset");
    }