1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tools/cli/bundle.php
romanb d94d5ec1cb - Fixes and changes to Doctrine_Compiler
- Added a small cli script to run the compiler from the command line. The script requires the Doctrine base directory (the directory where Doctrine.php and the Doctrine folder is in) and the target file as its parameters.

Example: ./dev/Doctrine/ ./dev/myproject/BundledClasses.php
2006-09-23 14:31:17 +00:00

25 lines
497 B
PHP

<?php
/**
* Small command line script to bundle Doctrine classes.
*/
if (count($argv) < 2) {
echo "Usage: bundle.php <Doctrine basedir> <Target dir>";
exit(1);
}
$doctrineBaseDir = $argv[1];
$targetDir = $argv[2];
set_include_path(get_include_path() . PATH_SEPARATOR . $doctrineBaseDir);
require_once 'Doctrine.php';
require_once 'Doctrine/Compiler.php';
echo "Bundling classes ..." . PHP_EOL;
Doctrine_Compiler::compile($targetDir);
echo "Bundle complete." . PHP_EOL;
exit(0);
?>