MMOframework
Why AI Playground Libraries Developers Agency
FR EN
Build a project live
Index

Zip

MMO\core\helpers · 1 symbol · generated 30 Nov 2026

class

Zip

Zip.php:13

Reads the members of a ZIP archive held in memory -- hand-rolled, no ext-zip dependency (Stored, Deflated and BZIP2 entries). What an Office file is made of: an .xlsx (Document) or a .docx (Document).

class MMO\core\helpers\Zip
Namespace
MMO\core\helpers
foreach (Zip::Entries(file_get_contents('a.docx')) as $name => $entry) {if (!($entry instanceof \Throwable)) {[$content, $date] = $entry;}}

Methods1

Entries($data, $source)

staticZip.php:22

Each member of the archive, directories left out. A corrupt member does not stop the others: its exception is yielded in place of its content.

static function Entries(string $data, mixed $source = null): Generator
$datastringthe archive's raw bytes.
$source = nullmixedwhat the exceptions are about (the document reading the archive).
returnsGeneratorstring $filename => array{string, \DateTime} (content, date) or \Throwable.
throwsif $data isn't a recognizable ZIP archive at all (on the first iteration).