Ejemplo n.º 1
0
function unittest_setup()
{
    // Setup the PieCrust environement.
    require dirname(__DIR__) . '/piecrust.php';
    piecrust_setup('test');
    // Include the global utilities.
    require __DIR__ . '/src/util.php';
}
Ejemplo n.º 2
0
<?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);
Ejemplo n.º 3
0
/**
 * 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);
}