exit("pantr has not been installed properly!\n"); } // load dependency injection container sfServiceContainerAutoloader::register(); if (file_exists(__DIR__ . '/pantr/core/services.php')) { require_once __DIR__ . '/pantr/core/services.php'; $sc = new pantrContainer(); } else { $sc = new sfServiceContainerBuilder(); $loader = new sfServiceContainerLoaderFileYaml($sc); $loader->load(__DIR__ . '/pantr/core/services.yml'); } // drop script name from args $args = $_SERVER['argv']; array_shift($args); // setup pantr pantr::setTaskRepository($sc->taskRepository); pantr::setApplication($sc->application); pantr::setHomePathProvider($sc->homePathProvider); pantr::loadProperties(); // load pantr.yml // load standard tasks include_once __DIR__ . '/pantr/std_tasks.php'; // include bundles $bundleManager = $sc->bundleManager; $bundleManager->registerIncludePath(); $bundleManager->loadBundles(); pantr::setBundleManager($bundleManager); // display pantr info and run it pantr::writeInfo(); pantr::run($args);
/** * Loads the specified yaml file from PAKE_HOME (if it exists) * and a local file (if it exists). * This mechanism can be used to build config cascades. * * If $onlyLocal is true the cascade mechanism is deactivated. */ function loadProperties($name = 'pantr.yaml', $onlyLocal = false) { pantr::loadProperties($name, $onlyLocal); }