Skip to content
This repository
tree: 689732fe29
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 32 lines (25 sloc) 0.796 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<?php
/**
* This script creates .phar archive with all required dependencies.
* Archive usage:
* include("phar://iron_mq.phar");
* or
* include("phar://".dirname(__FILE__)."/iron_mq.phar");
*/
 
@unlink('iron_mq.phar');

$phar = new Phar('iron_mq.phar');

# Loader
$phar->setStub('<?php
Phar::mapPhar("iron_mq.phar");
require "phar://iron_mq.phar/IronCore.class.php";
require "phar://iron_mq.phar/IronMQ.class.php";
__HALT_COMPILER(); ?>');

# Files
$phar->addFile('../iron_core_php/IronCore.class.php','IronCore.class.php');
$phar->addFile('IronMQ.class.php');
$phar->addFile('LICENSE', 'LICENSE');

echo "\ndone - ".(round(filesize('iron_mq.phar')/1024,2))." KB\n";

# Verification
require "phar://iron_mq.phar";
$worker = new IronMQ('config.ini');

echo "Build finished successfully\n";
Something went wrong with that request. Please try again.