Example #1
1
<?php

/**
 * Core
 * Platform for rapid application development.
 *
 * @package core
 * @author stefano.azzolini@caffeina.com
 * @copyright Caffeina srl - 2015-2016 - http://caffeina.com
 */
Phar::mapPhar(__FILE__);
require 'phar://' . __FILE__ . '/classes/Loader.php';
__halt_compiler();?>
Example #2
0
#!/usr/bin/env php
<?php 
/*
 * This file is part of the PHP CS utility.
 *
 * (c) Fabien Potencier <*****@*****.**>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */
if (defined('HHVM_VERSION_ID')) {
    if (HHVM_VERSION_ID < 30500) {
        fwrite(STDERR, "HHVM needs to be a minimum version of HHVM 3.5.0\n");
        exit(1);
    }
} elseif (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50306) {
    fwrite(STDERR, "PHP needs to be a minimum version of PHP 5.3.6\n");
    exit(1);
}
set_error_handler(function ($severity, $message, $file, $line) {
    if ($severity & error_reporting()) {
        throw new ErrorException($message, 0, $severity, $file, $line);
    }
});
Phar::mapPhar('php-cs-fixer-checker.phar');
require_once 'phar://php-cs-fixer-checker.phar/vendor/autoload.php';
use Boekkooi\CS\Console\Application;
$application = new Application();
$application->run();
__halt_compiler();
Example #3
0
<?php

require_once 'vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php';
if (!defined('MOJIO_FILE_PREFIX')) {
    define('MOJIO_FILE_PREFIX', 'phar://mojio.phar');
}
Phar::mapPhar('mojio.phar');
$classLoader = new Symfony\Component\ClassLoader\UniversalClassLoader();
$classLoader->registerNamespaces(array('Mojio' => MOJIO_FILE_PREFIX . '/src', 'Guzzle' => MOJIO_FILE_PREFIX . '/vendor/guzzle/guzzle/src', 'Symfony\\Component\\EventDispatcher' => MOJIO_FILE_PREFIX . '/vendor/symfony/event-dispatcher', 'Doctrine' => MOJIO_FILE_PREFIX . '/vendor/doctrine/common/lib', 'Monolog' => MOJIO_FILE_PREFIX . '/vendor/monolog/monolog/src'));
$classLoader->register();
__halt_compiler();
Example #4
0
<?php

Phar::mapPhar('hash.phar');
require 'phar://hash.phar/Autoload.php';
__halt_compiler();

?>
Example #5
0
#!/usr/bin/env php
<?php 
ini_set('memory_limit', '-1');
Phar::mapPhar("git-deploy");
/**
 * PSR-4 autoloader.
 *      
 * @param string $class The fully-qualified class name.
 * @return void
 */
spl_autoload_register(function ($class) {
    // project-specific namespace prefix
    $prefix = 'Brunodebarros\\Gitdeploy\\';
    // base directory for the namespace prefix
    $base_dir = 'phar://git-deploy/src/';
    // does the class use the namespace prefix?
    $len = strlen($prefix);
    if (strncmp($prefix, $class, $len) !== 0) {
        // no, move to the next registered autoloader
        return;
    }
    // get the relative class name
    $relative_class = substr($class, $len);
    // replace the namespace prefix with the base directory, replace namespace
    // separators with directory separators in the relative class name, append
    // with .php
    $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
    // if the file exists, require it
    if (file_exists($file)) {
        require $file;
    }
Example #6
0
#!/usr/bin/env php

<?php 
if (defined('HHVM_VERSION_ID')) {
    if (HHVM_VERSION_ID < 30600) {
        fwrite(STDERR, "HHVM needs to be a minimum version of HHVM 3.6.0\n");
        exit(1);
    }
} elseif (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50600) {
    fwrite(STDERR, "PHP needs to be a minimum version of PHP 5.6.0\n");
    exit(1);
}
set_error_handler(function ($severity, $message, $file, $line) {
    if ($severity & error_reporting()) {
        throw new ErrorException($message, 0, $severity, $file, $line);
    }
});
Phar::mapPhar('phpstd.phar');
require_once 'phar://phpstd.phar/vendor/autoload.php';
use SellerLabs\Standards\Console\Application;
$app = new Application();
$app->run();
__halt_compiler();
Example #7
0
<?php

Phar::mapPhar('/var/lib/jenkins/jobs/t41/workspace/tests/rapports/myproject.phar');
spl_autoload_register(function ($className) {
    $libPath = 'phar://T41.phar/lib/';
    $classFile = str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php';
    $classPath = $libPath . $classFile;
    if (file_exists($classPath)) {
        require $classPath;
    }
});
__halt_compiler();

?>
Example #8
0
#!/usr/bin/env php
<?php 
$appName = 'phpCompatInfo';
Phar::mapPhar(strtolower($appName) . '.phar');
if (!getenv("BARTLETTRC")) {
    putenv("BARTLETTRC=" . strtolower($appName) . '.json');
}
/**
 * Ability to use global composer packages installed, then include_path,
 * for optional dependencies not provided by the phar distribution (e.g: pear/Net_Growl)
 */
$home = getenv('COMPOSER_HOME');
if (!$home) {
    if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
        if (getenv('APPDATA')) {
            $home = strtr(getenv('APPDATA'), '\\', '/') . '/Composer';
        }
    } else {
        if (getenv('HOME')) {
            $home = rtrim(getenv('HOME'), '/') . '/.composer';
        }
    }
}
if ($home) {
    $fallbackNetGrowlDir = $home . '/vendor/pear-pear.php.net/Net_Growl';
    $fallbackClassMap = function ($classMap, $classPrefix) {
        array_walk($classMap, function (&$value, $key, $userData) {
            if (strpos($key, $userData) !== false) {
                // will remove this entry in class map
                $value = null;
            }
Example #9
0
#!/usr/bin/env php
<?php 
/*
 * This file is part of Composer.
 *
 * (c) Nils Adermann <*****@*****.**>
 *     Jordi Boggiano <*****@*****.**>
 *
 * For the full copyright and license information, please view
 * the license that is located at the bottom of this file.
 */
Phar::mapPhar('composer.phar');
define('COMPOSER_DEV_WARNING_TIME', 1380296886);
require 'phar://composer.phar/bin/composer';
__halt_compiler(); ?>
8b1
composer.pharsrc/bootstrap.php��R���2��src/Composer/IO/ConsoleIO.php�R�a�q�src/Composer/IO/NullIO.php%�R%~`��src/Composer/IO/IOInterface.php��R�A&�˶src/Composer/IO/BaseIO.php��R�k+�]�src/Composer/IO/BufferIO.php+�R+]�)src/Composer/Command/RunScriptCommand.phpk�Rk �߶(src/Composer/Command/DiagnoseCommand.php'�R'ģ
��'src/Composer/Command/ArchiveCommand.php{�R{oқ|� src/Composer/Command/Command.php��R��L�v�-src/Composer/Command/CreateProjectCommand.phph,�Rh,W�ʶ%src/Composer/Command/AboutCommand.php��R��M�*�$src/Composer/Command/ShowCommand.php+�R+%�5�&src/Composer/Command/UpdateCommand.php��R�3��&src/Composer/Command/ConfigCommand.php�'�R�'5Xq�'src/Composer/Command/InstallCommand.php��R�����(src/Composer/Command/ValidateCommand.phpG�RG�;r�'src/Composer/Command/DependsCommand.phpo	�Ro	T�.r�&src/Composer/Command/SearchCommand.php]�R]�7�2�*src/Composer/Command/SelfUpdateCommand.phpt	�Rt	�K�
�(src/Composer/Command/LicensesCommand.php�	�R�	��nz�'src/Composer/Command/RequireCommand.php�R�U�$�,src/Composer/Command/DumpAutoloadCommand.phpy�RyR-=Ҷ&src/Composer/Command/GlobalCommand.php��R�����,src/Composer/Command/Helper/DialogHelper.php��R����&�&src/Composer/Command/StatusCommand.php��R�w�tR�$src/Composer/Command/InitCommand.php;1�R;1��T��)src/Composer/Downloader/VcsDownloader.phpM�RM-E&ʶ*src/Composer/Downloader/FileDownloader.php��R�?�[�)src/Composer/Downloader/SvnDownloader.phpx
�Rx
�N[�0src/Composer/Downloader/PearPackageExtractor.phpe�ReסP��+src/Composer/Downloader/DownloadManager.php��R���Ŷ/src/Composer/Downloader/DownloaderInterface.php��R�gs!l�.src/Composer/Downloader/TransportException.php��R��8͊�*src/Composer/Downloader/PharDownloader.php��R����)src/Composer/Downloader/TarDownloader.php��R�͒X?�(src/Composer/Downloader/HgDownloader.php$�R$�c��1src/Composer/Downloader/ChangeReportInterface.php��R��ਿ�-src/Composer/Downloader/ArchiveDownloader.php��R���|��/src/Composer/Downloader/FilesystemException.php�R]T���)src/Composer/Downloader/ZipDownloader.php"
�R"
���3�)src/Composer/Downloader/GitDownloader.php�2�R�2Ӿ��6src/Composer/Repository/InvalidRepositoryException.phpn�Rn��똶+src/Composer/Repository/ArrayRepository.php�Rk�b�0src/Composer/Repository/FilesystemRepository.php��R��Y�z�7src/Composer/Repository/WritableRepositoryInterface.php��R��/s�*src/Composer/Repository/PearRepository.php�Rb�E��-src/Composer/Repository/RepositoryManager.php��R�r�_��3src/Composer/Repository/WritableArrayRepository.php�R�G*�,src/Composer/Repository/Vcs/GitHubDriver.phpf"�Rf"�7�8�2src/Composer/Repository/Vcs/GitBitbucketDriver.php��R���DѶ)src/Composer/Repository/Vcs/GitDriver.php��R�b��¶)src/Composer/Repository/Vcs/SvnDriver.php�R�@��2src/Composer/Repository/Vcs/VcsDriverInterface.phpC�RC�F���(src/Composer/Repository/Vcs/HgDriver.php��R�M�A�)src/Composer/Repository/Vcs/VcsDriver.php��R��xK:�1src/Composer/Repository/Vcs/HgBitbucketDriver.php�
�R�
1�Ӷ4src/Composer/Repository/InstalledArrayRepository.php��R�/�~>�7src/Composer/Repository/RepositorySecurityException.phpo�Ropի��9src/Composer/Repository/StreamableRepositoryInterface.php��R�8���)src/Composer/Repository/VcsRepository.php��R��/ʖ�.src/Composer/Repository/PlatformRepository.php�R��|�9src/Composer/Repository/InstalledFilesystemRepository.php��R�V
�_�/src/Composer/Repository/CompositeRepository.php	�R	4�E�8src/Composer/Repository/InstalledRepositoryInterface.php��R��9p�.src/Composer/Repository/ComposerRepository.php8�R8�<�/src/Composer/Repository/Pear/DependencyInfo.phpq�Rqf�T�8src/Composer/Repository/Pear/PackageDependencyParser.php!�R!=��F�,src/Composer/Repository/Pear/ChannelInfo.php��R�:T*ɶ.src/Composer/Repository/Pear/ChannelReader.phpn�Rn�8�,src/Composer/Repository/Pear/PackageInfo.php��R��
��5src/Composer/Repository/Pear/DependencyConstraint.phpq�Rq9=�4src/Composer/Repository/Pear/ChannelRest11Reader.php&	�R&	�Ub�,src/Composer/Repository/Pear/ReleaseInfo.php��R�o��ö2src/Composer/Repository/Pear/BaseChannelReader.php6�R6.fi!�4src/Composer/Repository/Pear/ChannelRest10Reader.php�	�R�	O��/src/Composer/Repository/RepositoryInterface.php��R��ɶ.src/Composer/Repository/ArtifactRepository.phpF�RF�8��-src/Composer/Repository/PackageRepository.phpG�RG�:k�(src/Composer/Package/CompletePackage.php��R�8Gl]�+src/Composer/Package/Dumper/ArrayDumper.phpe
�Re
�����7src/Composer/Package/Loader/InvalidPackageException.phpE�RExb��*src/Composer/Package/Loader/JsonLoader.php��R�!~�{�/src/Composer/Package/Loader/LoaderInterface.php��R��}�ζ+src/Composer/Package/Loader/ArrayLoader.php��R���0�5src/Composer/Package/Loader/ValidatingArrayLoader.php0)�R0)�_�Ӷ1src/Composer/Package/Loader/RootPackageLoader.php~�R~�#�src/Composer/Package/Locker.php��R��ӬJ�)src/Composer/Package/PackageInterface.phpg�Rg`�XĶ$src/Composer/Package/BasePackage.php[
�R[
$�Ҷ.src/Composer/Package/Version/VersionParser.php�$�R�$8I��1src/Composer/Package/CompletePackageInterface.php��R���2��-src/Composer/Package/RootPackageInterface.php��R��qKж$src/Composer/Package/RootPackage.phpn�Rn�ACO�3src/Composer/Package/Archiver/ArchiverInterface.php��R�<ʸ�7src/Composer/Package/Archiver/ComposerExcludeFilter.php�R�SZ0�.src/Composer/Package/Archiver/PharArchiver.php[�R[�5���3src/Composer/Package/Archiver/BaseExcludeFilter.php��R���#&�2src/Composer/Package/Archiver/GitExcludeFilter.phpw�RwLgU��7src/Composer/Package/Archiver/ArchivableFilesFinder.phpe�ReT�z�0src/Composer/Package/Archiver/ArchiveManager.php
Example #10
0
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * The views and conclusions contained in the software and documentation are
 * those of the authors and should not be interpreted as representing official
 * policies, either expressed or implied, of the copyright holder.
 *
 * @copyright Copyright 2012 Bas de Nooijer <*****@*****.**>
 * @license http://github.com/basdenooijer/solarium/raw/master/COPYING
 * @link http://www.solarium-project.org/
 */
Phar::mapPhar("solarium.phar");
require_once 'phar://solarium.phar/Autoloader.php';
Solarium_Autoloader::register();
if ('cli' === php_sapi_name() && basename(__FILE__) === basename($_SERVER['argv'][0]) && isset($_SERVER['argv'][1])) {
    switch ($_SERVER['argv'][1]) {
        case 'version':
            echo "Solarium version " . Solarium_Version::VERSION . "\n";
            break;
        default:
            echo "Unknown command '" . $_SERVER['argv'][1] . "' (Supported commands: version)\n";
    }
    exit(0);
}
__halt_compiler();
?>
Example #11
0
<?php

/**
 * Stub.
 *
 * @since 150424 Initial release.
 */
namespace WebSharks\CliTools;

\Phar::mapPhar('websharks-cli-tools.phar');
require_once 'phar://websharks-cli-tools.phar/src/includes/stub.php';
__halt_compiler();
Example #12
0
#!/usr/bin/env php
<?php 
set_error_handler(function ($severity, $message, $file, $line) {
    if ($severity & error_reporting()) {
        throw new ErrorException($message, 0, $severity, $file, $line);
    }
});
Phar::mapPhar('jane.phar');
require_once 'phar://jane.phar/vendor/autoload.php';
$application = new \Joli\Jane\Application();
$application->run();
__halt_compiler();
Example #13
0
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Set up default timezone
date_default_timezone_set('GMT');
$newIncludePath = null;
// For non pear packaged versions use relative include path
if (strpos('@php_bin@', '@php_bin') === 0) {
    $newIncludePath = __DIR__ . DIRECTORY_SEPARATOR . 'library';
}
// When being executed inside a valid Phar archive use it instead
if (class_exists('Phar')) {
    try {
        Phar::mapPhar('protobuf.phar');
        $newIncludePath = 'phar://protobuf.phar';
    } catch (PharException $e) {
    }
}
// Modify the include path if needed
if (NULL !== $newIncludePath) {
    set_include_path($newIncludePath . PATH_SEPARATOR . get_include_path());
}
// Disable strict errors for the compiler
error_reporting(error_reporting() & ~E_STRICT);
// Setup autoloader
require_once 'vendor/autoload.php';
try {
    $application = new \DrSlump\Protobuf\Compiler\Cli(__FILE__);
    $status = $application->run();
Example #14
0
<?php

Phar::mapPhar('deep.phar');
require 'phar://deep.phar/vendor/autoload.php';
__halt_compiler();
Example #15
0
<?php

trigger_error('The neo4jphp PHAR archive is no longer supported and will be removed in the future. Use Composer to install the library.', E_USER_DEPRECATED);
Phar::mapPhar('neo4jphp.phar');
spl_autoload_register(function ($className) {
    if (strpos($className, 'Everyman\\Neo4j\\') !== 0) {
        return;
    }
    $libPath = 'phar://neo4jphp.phar/lib/';
    $classFile = str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php';
    $classPath = $libPath . $classFile;
    if (file_exists($classPath)) {
        require $classPath;
    }
});
if ('cli' === php_sapi_name() && basename(__FILE__) === basename($_SERVER['argv'][0])) {
    $command = empty($_SERVER['argv'][1]) ? '-help' : $_SERVER['argv'][1];
    $me = new Phar('neo4jphp.phar');
    $meta = $me->getMetaData();
    if ($command == '-help') {
        echo <<<HELP
Neo4jPHP version {$meta['version']}

{$_SERVER['argv'][0]} [-help|-license|-readme|-version|<host>] <port>
    -help            Display help text
    -license         Display software license
    -readme          Display README
    -version         Display version information
    <host> (<port>)  Test connection to Neo4j instance on host (port defaults to 7474)

HELP;
Example #16
0
#!/usr/bin/env php
<?php 
Phar::mapPhar('aws-console.phar');
require_once 'phar://aws-console.phar/vendor/autoload.php';
use Symfony\Component\Console\Application;
use Corley\AWS\Command\Ec2Start;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
$container = new ContainerBuilder();
$loader = new YamlFileLoader($container, new FileLocator("phar://aws-console.phar"));
$loader->load("config/console.yml");
$loader = new YamlFileLoader($container, new FileLocator(__DIR__));
if (!file_exists(__DIR__ . "/parameters.yml")) {
    echo "Create your configuration file: '" . __DIR__ . "/parameters.yml' and set your configurations \n\r";
    exit;
}
$loader->load("parameters.yml");
$application = $container->get("console");
$application->run();
unset($application, $loader, $container);
__halt_compiler();

Example #17
0
<?php

Phar::mapPhar('phpca.phar');
require_once 'src/phpca.php';
__halt_compiler();

?>
Example #18
0
<?php

// Disable the static web routing of this phar from an including file by defining NO_STATIC_WEB, if necessary
if (defined('NO_STATIC_WEB')) {
    Phar::mapPhar('microsite.phar');
} else {
    /**
     * Rewrite a direct request to an internal file
     * @return string The rewritten URL filename
     */
    function microsite_rewrite()
    {
        $r = $_SERVER['REQUEST_URI'];
        if (strpos($r, '/microsite.phar') !== false) {
            $r = preg_replace('#^.*/microsite.phar#', '', $r);
        }
        if (file_exists("phar://microsite.phar{$r}")) {
            return $r;
        } else {
            return 'index.php';
        }
    }
    $index = str_replace('\\', DIRECTORY_SEPARATOR, 'index.php');
    $fourohfour = str_replace('\\', DIRECTORY_SEPARATOR, '404.php');
    $mimes = array('phps' => Phar::PHPS, 'c' => 'text/plain', 'cc' => 'text/plain', 'cpp' => 'text/plain', 'c++' => 'text/plain', 'dtd' => 'text/plain', 'h' => 'text/plain', 'log' => 'text/plain', 'rng' => 'text/plain', 'txt' => 'text/plain', 'xsd' => 'text/plain', 'php' => Phar::PHP, 'inc' => Phar::PHP, 'avi' => 'video/avi', 'bmp' => 'image/bmp', 'css' => 'text/css', 'gif' => 'image/gif', 'htm' => 'text/html', 'html' => 'text/html', 'htmls' => 'text/html', 'ico' => 'image/x-ico', 'jpe' => 'image/jpeg', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'js' => 'application/x-javascript', 'midi' => 'audio/midi', 'mid' => 'audio/midi', 'mod' => 'audio/mod', 'mov' => 'movie/quicktime', 'mp3' => 'audio/mp3', 'mpg' => 'video/mpeg', 'mpeg' => 'video/mpeg', 'pdf' => 'application/pdf', 'png' => 'image/png', 'swf' => 'application/shockwave-flash', 'tif' => 'image/tiff', 'tiff' => 'image/tiff', 'wav' => 'audio/wav', 'xbm' => 'image/xbm', 'xml' => 'text/xml');
    Phar::webPhar("microsite.phar", 'index.php', '404.php', $mimes, 'microsite_rewrite');
}
// Make sure the autoloader is loaded
include 'phar://microsite.phar/lib/Microsite/Autoloader.php';
// Initialize the autoloader class
\Microsite\Autoloader::init();
Example #19
0
*/
if (version_compare(phpversion(), '5.3.1', '<')) {
    if (substr(phpversion(), 0, 5) !== '5.3.1') {
        // this small hack is because of running RCs of 5.3.1
        echo basename(__FILE__) . " requires PHP 5.3.1 or newer." . PHP_EOL;
        exit(1);
    }
}
foreach (array('phar', 'reflection', 'json', 'pcre') as $ext) {
    if (!extension_loaded($ext)) {
        echo "Extension {$ext} is required." . PHP_EOL;
        exit(1);
    }
}
try {
    Phar::mapPhar();
    if (realpath($_SERVER['SCRIPT_FILENAME']) !== realpath(__FILE__)) {
        $phar = new Phar(__FILE__);
        $md = $phar->getMetadata();
        $metadata = json_decode(file_get_contents("phar://" . __FILE__ . DIRECTORY_SEPARATOR . "composer.lock"), TRUE);
        $module = json_decode(file_get_contents("phar://" . __FILE__ . DIRECTORY_SEPARATOR . "composer.json"), TRUE);
        $module['version'] = $md['version'];
        $metadata['packages'][] = $module;
        return $metadata;
    }
} catch (Exception $e) {
    echo "Cannot process " . basename(__FILE__) . ":" . PHP_EOL;
    echo $e->getMessage() . PHP_EOL;
    exit(1);
}
if (realpath($_SERVER['SCRIPT_FILENAME']) === realpath(__FILE__)) {
Example #20
0
#!/usr/bin/env php
<?php 
// Alias the phar to phar://storyplayer for include paths
Phar::mapPhar('storyplayer');
// Boot the app
require 'phar://storyplayer/src/bin/storyplayer';
__halt_compiler();
Example #21
0
<?php

Phar::mapPhar('mycars.phar');
require_once 'phar://' . __FILE__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
__halt_compiler();
Example #22
0
<?php

Phar::mapPhar('hio');
__halt_compiler(); ?>2hioaÀŒDC¾·è¶a
Example #23
0
#!/usr/bin/env php
<?php 
/*
 * This file is part of the PHP CS utility.
 *
 * (c) Fabien Potencier <*****@*****.**>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */
if (defined('HHVM_VERSION_ID')) {
    if (HHVM_VERSION_ID < 30500) {
        fwrite(STDERR, "HHVM needs to be a minimum version of HHVM 3.5.0\n");
        exit(1);
    }
} elseif (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50306) {
    fwrite(STDERR, "PHP needs to be a minimum version of PHP 5.3.6\n");
    exit(1);
}
set_error_handler(function ($severity, $message, $file, $line) {
    if ($severity & error_reporting()) {
        throw new ErrorException($message, 0, $severity, $file, $line);
    }
});
Phar::mapPhar('php-cs-fixer.phar');
require_once 'phar://php-cs-fixer.phar/vendor/autoload.php';
use PhpCsFixer\Console\Application;
$application = new Application();
$application->run();
__halt_compiler();
Example #24
0
#!/usr/bin/env php
<?php 
Phar::mapPhar('n98-magerun2.phar');
$application = (require_once 'phar://n98-magerun2.phar/src/bootstrap.php');
$application->setPharMode(true);
$application->run();
__halt_compiler();
Example #25
0
#!/usr/bin/env php
<?php 
/**
 * Koch Framework
 * Jens-André Koch © 2005 - onwards.
 *
 * This file is part of "Koch Framework".
 *
 * License: GNU/GPL v2 or any later version, see LICENSE file.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
Phar::mapPhar('koch-framework.phar');
require_once 'phar://koch-framework.phar/vendor/autoload.php';
// rely on composers autoloader
__halt_compiler();
Example #26
0
<?php

Phar::mapPhar('%s');
set_include_path('phar://%s' . PATH_SEPARATOR . get_include_path());
set_include_path('phar://%s/vendor/photon/photon/src' . PATH_SEPARATOR . get_include_path());
include 'phar://%s/vendor/photon/photon/src/photon.php';
__halt_compiler();
Example #27
0
<?php

/**
 * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 *
 * http://aws.amazon.com/apache2.0
 *
 * or in the "license" file accompanying this file. This file is distributed
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
Phar::mapPhar('aws.phar');
define('AWS_PHAR', true);
define('AWS_FILE_PREFIX', 'phar://aws.phar');
// Copy the cacert.pem file from the phar if it is not in the temp folder.
$from = 'phar://aws.phar/Guzzle/Http/Resources/cacert.pem';
$certFile = sys_get_temp_dir() . '/guzzle-cacert.pem';
// Only copy when the file size is different
if (!file_exists($certFile) || filesize($certFile) != filesize($from)) {
    if (!copy($from, $certFile)) {
        throw new RuntimeException("Could not copy {$from} to {$certFile}: " . var_export(error_get_last(), true));
    }
}
return require 'phar://aws.phar/aws-autoloader.php';
__halt_compiler();
Example #28
0
<?php

if (class_exists('Phar')) {
    Phar::mapPhar('phpunit-growlprinter.phar');
}
require "phar://phpunit-growlprinter.phar/src/iakio/phpunit/GrowlPrinter.php";
require "phar://phpunit-growlprinter.phar/vendor/iakio/gntp-notify/src/iakio/GntpNotify/GNTP.php";
require "phar://phpunit-growlprinter.phar/vendor/iakio/gntp-notify/src/iakio/GntpNotify/GNTPRequest.php";
require "phar://phpunit-growlprinter.phar/vendor/iakio/gntp-notify/src/iakio/GntpNotify/GNTPResponse.php";
require "phar://phpunit-growlprinter.phar/vendor/iakio/gntp-notify/src/iakio/GntpNotify/IO.php";
require "phar://phpunit-growlprinter.phar/vendor/iakio/gntp-notify/src/iakio/GntpNotify/IOException.php";
require "phar://phpunit-growlprinter.phar/vendor/iakio/gntp-notify/src/iakio/GntpNotify/NotificationRequest.php";
require "phar://phpunit-growlprinter.phar/vendor/iakio/gntp-notify/src/iakio/GntpNotify/RegisterRequest.php";
require "phar://phpunit-growlprinter.phar/vendor/iakio/gntp-notify/src/iakio/GntpNotify/Resource.php";
__halt_compiler(); ?>
Example #29
0
<?php

Phar::mapPhar('openssl.phar');
spl_autoload_register(function ($class) {
    // project-specific namespace prefix
    $prefix = 'charlycoste\\openssl\\';
    // base directory for the namespace prefix
    $base_dir = __DIR__ . '/src/';
    // does the class use the namespace prefix?
    $len = strlen($prefix);
    if (strncmp($prefix, $class, $len) !== 0) {
        // no, move to the next registered autoloader
        return;
    }
    // get the relative class name
    $relative_class = substr($class, $len);
    // replace the namespace prefix with the base directory, replace namespace
    // separators with directory separators in the relative class name, append
    // with .php
    $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
    // if the file exists, require it
    if (file_exists($file)) {
        require $file;
    }
});
__halt_compiler();
Example #30
0
<?php

Phar::mapPhar('hooray.phar');
require_once 'phar://hooray.phar/hooray.php';
__halt_compiler();