You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.2 KiB

3 years ago
  1. # Manifest
  2. Component for reading [phar.io](https://phar.io/) manifest information from a [PHP Archive (PHAR)](http://php.net/phar).
  3. [![Build Status](https://travis-ci.org/phar-io/manifest.svg?branch=master)](https://travis-ci.org/phar-io/manifest)
  4. [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/phar-io/manifest/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/phar-io/manifest/?branch=master)
  5. [![SensioLabsInsight](https://insight.sensiolabs.com/projects/d8cc6035-69ad-477d-bd1a-ccc605480fd7/mini.png)](https://insight.sensiolabs.com/projects/d8cc6035-69ad-477d-bd1a-ccc605480fd7)
  6. ## Installation
  7. You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
  8. composer require phar-io/manifest
  9. If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
  10. composer require --dev phar-io/manifest
  11. ## Usage
  12. ```php
  13. use PharIo\Manifest\ManifestLoader;
  14. use PharIo\Manifest\ManifestSerializer;
  15. $manifest = ManifestLoader::fromFile('manifest.xml');
  16. var_dump($manifest);
  17. echo (new ManifestSerializer)->serializeToString($manifest);
  18. ```