[ Index ] |
|
Code source de Symfony 1.0.0 |
1 <?php 2 3 /* 4 * This file is part of the symfony package. 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 7 * For the full copyright and license information, please view the LICENSE 8 * file that was distributed with this source code. 9 */ 10 11 pake_task('project_exists'); 12 pake_task('app_exists', 'project_exists'); 13 pake_task('module_exists', 'app_exists'); 14 15 function run_project_exists($task, $args) 16 { 17 if (!file_exists('symfony')) 18 { 19 throw new Exception('you must be in a symfony project directory'); 20 } 21 22 pake_properties('config/properties.ini'); 23 } 24 25 function run_app_exists($task, $args) 26 { 27 if (!count($args)) 28 { 29 throw new Exception('you must provide your application name'); 30 } 31 32 if (!is_dir(getcwd().'/apps/'.$args[0])) 33 { 34 throw new Exception('application "'.$args[0].'" does not exist'); 35 } 36 } 37 38 function run_module_exists($task, $args) 39 { 40 if (count($args) < 2) 41 { 42 throw new Exception('you must provide your module name'); 43 } 44 45 if (!is_dir(getcwd().'/apps/'.$args[0].'/modules/'.$args[1])) 46 { 47 throw new Exception('module "'.$args[1].'" does not exist'); 48 } 49 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |