Skip to content

Commit

Permalink
Added PHAR creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jaytaph committed Feb 6, 2012
1 parent ad6bcdb commit fc23e05
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions phar/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The buildphar.php will generate a solarium.phar PHAR file that is ready for distribution.
12 changes: 12 additions & 0 deletions phar/buildphar.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

// Create a new htrouter phar file
@unlink('solarium.phar');
$phar = new Phar('solarium.phar', 0, 'solarium.phar');

$phar->setStub(file_get_contents("stub.php"));

$basePath = realpath(__DIR__."/../library/Solarium");
$phar->buildFromDirectory($basePath, '/\.php$/');


7 changes: 7 additions & 0 deletions phar/stub.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
Phar::mapPhar("solarium.phar");
require_once 'phar://solarium.phar/Autoloader.php';
Solarium_Autoloader::register();

__HALT_COMPILER();
?>

0 comments on commit fc23e05

Please sign in to comment.