Spaces:
Sleeping
Sleeping
File size: 1,549 Bytes
07c3cdd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | <?php
/**
* @package pake
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @copyright 2004-2005 Fabien Potencier <fabien.potencier@symfony-project.com>
* @license see the LICENSE file included in the distribution
* @version SVN: $Id: pakePhingTask.class.php 4977 2007-09-05 09:14:45Z noel $
*/
include_once 'phing/Phing.php';
if (!class_exists('Phing'))
{
throw new pakeException('You must install Phing to use this task. (pear install http://phing.info/pear/phing-current.tgz)');
}
class pakePhingTask
{
public static function import_default_tasks()
{
}
public static function call_phing($task, $target, $build_file = '', $options = array())
{
$args = array();
foreach ($options as $key => $value)
{
$args[] = "-D$key=$value";
}
if ($build_file)
{
$args[] = '-f';
$args[] = realpath($build_file);
}
if (!$task->is_verbose())
{
$args[] = '-q';
}
if (is_array($target))
{
$args = array_merge($args, $target);
}
else
{
$args[] = $target;
}
if (DIRECTORY_SEPARATOR != '\\' && (function_exists('posix_isatty') && @posix_isatty(STDOUT)))
{
$args[] = '-logger';
$args[] = 'phing.listener.AnsiColorLogger';
}
Phing::startup();
Phing::setProperty('phing.home', getenv('PHING_HOME'));
$m = new pakePhing();
$m->execute($args);
$m->runBuild();
}
}
class pakePhing extends Phing
{
function getPhingVersion()
{
return 'pakePhing';
}
}
|