Development

/tags/RELEASE_0_6_2/bin/symfony.php

You must first sign up to be able to contribute.

root/tags/RELEASE_0_6_2/bin/symfony.php

Revision 1015, 1.3 kB (checked in by fabien, 3 years ago)

fixed a notice in symfony command line (closes #337)

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Rev Date
Line 
1 <?php
2
3 if (ini_get('zend.ze1_compatibility_mode'))
4 {
5   die("symfony cannot run with zend.ze1_compatibility_mode enabled.\nPlease turn zend.ze1_compatibility_mode to Off in your php.ini.\n");
6 }
7
8 // define some PEAR directory constants
9 define('PAKEFILE_LIB_DIR''@PEAR-DIR@');
10 define('PAKEFILE_DATA_DIR', '@DATA-DIR@');
11 define('PAKEFILE_SYMLINK'false);
12 define('SYMFONY_VERSION',   '@SYMFONY-VERSION@');
13
14 require_once 'pake.php';
15
16 // we trap -V before pake
17 require_once 'pake/pakeGetopt.class.php';
18 $OPTIONS = array(
19   array('--version', '-V', pakeGetopt::NO_ARGUMENT, ''),
20   array('--pakefile', '-f', pakeGetopt::OPTIONAL_ARGUMENT, ''),
21   array('--tasks', '-T', pakeGetopt::OPTIONAL_ARGUMENT, ''),
22 );
23 $opt = new pakeGetopt($OPTIONS);
24 try
25 {
26   $opt->parse();
27
28   foreach ($opt->get_options() as $opt => $value)
29   {
30     if ($opt == 'version')
31     {
32       echo 'symfony version '.SYMFONY_VERSION."\n";
33       exit(0);
34     }
35   }
36 }
37 catch (pakeException $e)
38 {
39   print $e->getMessage();
40 }
41
42 // find pakefile (local or PEAR)
43 if (is_readable('lib/symfony'))
44 {
45   // local
46   $pakefile = 'data/symfony/bin/pakefile.php';
47 }
48 else
49 {
50   // PEAR
51   $pakefile = PAKEFILE_DATA_DIR.'/symfony/bin/pakefile.php';
52 }
53
54 $pake = pakeApp::get_instance();
55 try
56 {
57   $pake->run($pakefile);
58 }
59 catch (Exception $e)
60 {
61   echo "ERROR: symfony - ".$e->getMessage()."\n";
62 }
63
64 ?>
Note: See TracBrowser for help on using the browser.