Пример #1
0
 /**
  * Prepares the build environment classes for use.
  *
  * @author     David Zülke <*****@*****.**>
  * @author     Noah Fontes <*****@*****.**>
  * @since      1.0.0
  */
 public static function bootstrap()
 {
     if (self::$bootstrapped === false) {
         spl_autoload_register(array('AgaviBuild', '__autoload'));
     }
     self::$bootstrapped = true;
 }
Пример #2
0
 /**
  * Initializes the task by bootstrapping Agavi build components.
  */
 public function init()
 {
     if (!class_exists('AgaviBuild')) {
         require_once __DIR__ . '/../../../../../agavi/build.php';
         AgaviBuild::bootstrap();
     }
 }
Пример #3
0
 /**
  * Initializes the task by bootstrapping Agavi build components.
  */
 public function init()
 {
     if (!class_exists('AgaviBuild')) {
         require_once dirname(__FILE__) . '/../../../../../agavi/build.php';
         AgaviBuild::bootstrap();
     }
 }
 public function executeWrite(AgaviRequestDataHolder $request_data)
 {
     $included_files = [];
     // bootstrap the agavi build env, so we can use the autoloader code
     // and have the AgaviModuleCheck class available.
     $root_dir = dirname(AgaviConfig::get('core.app_dir'));
     require $root_dir . '/vendor/honeybee/agavi/src/build/agavi/build.php';
     AgaviBuild::bootstrap();
     $scanner = new ConfigurationScanner();
     foreach ($scanner->scan() as $name => $files) {
         $generator = null;
         switch ($name) {
             case 'routing':
                 $generator = new RoutingXmlConfigGenerator();
                 break;
             case 'autoload_namespaces':
                 $generator = new NamespaceAutoloadGenerator();
                 break;
             case 'aggregate_root_type_map':
                 $generator = new AggregateRootTypeMapGenerator();
                 break;
             case 'projection_type_map':
                 $generator = new ProjectionTypeMapGenerator();
                 break;
             case 'skeleton_map':
                 $generator = new SkeletonValidationMapGenerator();
                 break;
             case 'workflows':
                 $generator = new WorkflowsXmlConfigGenerator();
                 break;
             default:
                 $generator = new DefaultXmlConfigGenerator();
                 break;
         }
         $included_files = array_merge($included_files, $generator->generate($name, $files));
     }
     $this->setAttribute('includes', $included_files);
     return 'Success';
 }
Пример #5
0
 * @subpackage build
 *
 * @author     Noah Fontes <*****@*****.**>
 * @copyright  Authors
 * @copyright  The Agavi Project
 *
 * @since      1.0.0
 *
 * @version    $Id: agavi.php 4667 2011-05-20 12:34:58Z david $
 */
define('BUILD_DIRECTORY', realpath(dirname(__FILE__) . '/../..'));
define('START_DIRECTORY', getcwd());
define('MIN_PHING_VERSION', '2.4.0');
require 'phing/Phing.php';
require dirname(__FILE__) . '/../build.php';
AgaviBuild::bootstrap();
require dirname(__FILE__) . '/AgaviOptionParser.class.php';
$GLOBALS['OUTPUT'] = new OutputStream(fopen('php://stdout', 'w'));
$GLOBALS['ERROR'] = new OutputStream(fopen('php://stderr', 'w'));
$GLOBALS['INPUT'] = new InputStream(fopen('php://stdin', 'r'));
/* Initialize Phing. */
try {
    Phing::startup();
    Phing::setProperty('phing.home', getenv('PHING_HOME'));
    try {
        if (!version_compare(preg_replace('/^Phing(?:\\s*version)?\\s*([0-9\\.]+)/i', '$1', Phing::getPhingVersion()), MIN_PHING_VERSION, 'ge')) {
            $GLOBALS['ERROR']->write(sprintf('Error: Phing version %s or later required', MIN_PHING_VERSION) . PHP_EOL);
            exit(1);
        }
    } catch (Exception $e) {
        $GLOBALS['ERROR']->write(sprintf('Error: Phing version could not be determined; Phing %s or later required', MIN_PHING_VERSION) . PHP_EOL);