Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/waltertamboer/pharcompiler
A compiler to create PHAR files.
https://github.com/waltertamboer/pharcompiler
compiler phar php
Last synced: 26 days ago
JSON representation
A compiler to create PHAR files.
- Host: GitHub
- URL: https://github.com/waltertamboer/pharcompiler
- Owner: waltertamboer
- Created: 2013-01-06T16:37:31.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-12-11T19:47:15.000Z (almost 11 years ago)
- Last Synced: 2024-04-22T00:59:56.164Z (7 months ago)
- Topics: compiler, phar, php
- Language: PHP
- Size: 264 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PharCompiler
============[![Build Status](https://travis-ci.org/WalterTamboer/pharcompiler.png)](https://travis-ci.org/WalterTamboer/pharcompiler)
PharCompiler is a compiler to easily create PHAR files. The concept is that you create a
new instance of the compiler to which you give the name of the PHAR file. Next you add the
files that should be packed into the archive and last you call `compile`.Compiling
---------
Compiling a .phar file is easy.
```
setVariable('package_version', '1.0.0');
$compiler->addFile(__DIR__ . '/src/test.php');
$compiler->compile();
```By using `addFile` and `addDirectory` you can add a list of files to the archive.
Meta Data Variables
-------------------
It's possible to add meta data to the compiler. This meta data is injected in the source
files. For example:```
setVariable('package_version', '1.0.0');
$compiler->addFile(__DIR__ . '/src/test.php');
$compiler->compile();
``````