| 148 |
lars |
1 |
# Manifest
|
|
|
2 |
|
|
|
3 |
Component for reading [phar.io](https://phar.io/) manifest information from a [PHP Archive (PHAR)](http://php.net/phar).
|
|
|
4 |
|
|
|
5 |
[](https://travis-ci.org/phar-io/manifest)
|
|
|
6 |
[](https://scrutinizer-ci.com/g/phar-io/manifest/?branch=master)
|
|
|
7 |
[](https://insight.sensiolabs.com/projects/d8cc6035-69ad-477d-bd1a-ccc605480fd7)
|
|
|
8 |
|
|
|
9 |
## Installation
|
|
|
10 |
|
|
|
11 |
You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
|
|
|
12 |
|
|
|
13 |
composer require phar-io/manifest
|
|
|
14 |
|
|
|
15 |
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:
|
|
|
16 |
|
|
|
17 |
composer require --dev phar-io/manifest
|
|
|
18 |
|
|
|
19 |
## Usage
|
|
|
20 |
|
|
|
21 |
```php
|
|
|
22 |
use PharIo\Manifest\ManifestLoader;
|
|
|
23 |
use PharIo\Manifest\ManifestSerializer;
|
|
|
24 |
|
|
|
25 |
$manifest = ManifestLoader::fromFile('manifest.xml');
|
|
|
26 |
|
|
|
27 |
var_dump($manifest);
|
|
|
28 |
|
|
|
29 |
echo (new ManifestSerializer)->serializeToString($manifest);
|
|
|
30 |
```
|