gmodstore / php-gmad
package / unpackage garry's mod gma files
Installs: 42
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/gmodstore/php-gmad
Requires
- php-64bit: >=7.1
- mdurrant/php-binary-reader: ~1.0
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2025-09-29 02:47:54 UTC
README
PHP Garry's Mod Addon Library (php-gmad) is a PHP library for handling and manipulation of Garry's Mod addon files (.gmad). These files provide a description of the addon and a filesystem of the addon, both can be managed using this library.
Requirements
- PHP >=7.1 (64 bit)
- mdurrant/php-binary-reader
Code Examples
$gma_data = fopen(__DIR__ . '/gmas/test.gma', 'rb'); $reader = new AddonReader($gma_data); $reader->parse(); // throws $addon = $reader->getAddon(); echo $addon . PHP_EOL; echo count($addon->getFileIndex()) . ' file(s): ' . PHP_EOL; foreach ($addon->getFileIndex() as $file) { echo "\t" . $file->getFileNumber() . '. ' . $file->getPath() . ' @ ' . $file->getOffset() . ' : ' . $file->getSize() . ' bytes' . PHP_EOL; }
License
php-gmad is licensed under the MIT License.
Copyright 2018 Matt Stevens