Authentication fixes: grant_type and json response handling
[shpub.git] / src / phar-stub.php
1 #!/usr/bin/env php
2 <?php
3 /**
4  * Phar stub file for shpub. Handles startup of the .phar file.
5  *
6  * PHP version 5
7  *
8  * @category  Tools
9  * @package   shpub
10  * @author    Christian Weiske <cweiske@cweiske.de>
11  * @copyright 2016 Christian Weiske
12  * @license   http://www.gnu.org/licenses/agpl.html GNU AGPL v3
13  * @link      http://cweiske.de/shpub.htm
14  */
15 if (!in_array('phar', stream_get_wrappers()) || !class_exists('Phar', false)) {
16     echo "Phar extension not avaiable\n";
17     exit(255);
18 }
19
20 //Phar::interceptFileFuncs();
21 set_include_path(
22     'phar://' . __FILE__
23     . PATH_SEPARATOR . 'phar://' . __FILE__ . '/lib/'
24 );
25
26 require 'phar://' . __FILE__ . '/bin/phar-shpub.php';
27 __HALT_COMPILER();
28 ?>