function unittest_setup() { // Setup the PieCrust environement. require dirname(__DIR__) . '/piecrust.php'; piecrust_setup('test'); // Include the global utilities. require __DIR__ . '/src/util.php'; }
<?php require __DIR__ . '/../piecrust.php'; piecrust_setup('compiler'); if (!Phar::canWrite()) { die("Can't create Phar file because 'phar.readonly' is enabled in 'php.ini'." . PHP_EOL); } $pharFile = 'piecrust.phar'; if ($argc > 1) { $pharFile = $argv[1]; } $compiler = new PieCrust\Compiler(); $compiler->compile($pharFile);
/** * Setups and runs a new instance of Chef. */ function piecrust_chef($userArgc = null, $userArgv = null, $profile = 'chef') { piecrust_setup($profile); $chef = new PieCrust\Chef\Chef(); $chef->run($userArgc, $userArgv); }