~tsep-dev/tsep/0.9-beta

« back to all changes in this revision

Viewing changes to branches/symfony/cake/console/templates/default/classes/controller.ctp

  • Committer: geoffreyfishing
  • Date: 2011-01-11 23:46:12 UTC
  • Revision ID: svn-v4:ae0de26e-ed09-4cbe-9a20-e40b4c60ac6c::125
Created a symfony branch for future migration to symfony

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Controller bake template file
 
4
 *
 
5
 * Allows templating of Controllers generated from bake.
 
6
 *
 
7
 * PHP versions 4 and 5
 
8
 *
 
9
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 
10
 * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
 
11
 *
 
12
 * Licensed under The MIT License
 
13
 * Redistributions of files must retain the above copyright notice.
 
14
 *
 
15
 * @copyright     Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
 
16
 * @link          http://cakephp.org CakePHP(tm) Project
 
17
 * @package       cake
 
18
 * @subpackage    cake.
 
19
 * @since         CakePHP(tm) v 1.3
 
20
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 
21
 */
 
22
 
 
23
echo "<?php\n";
 
24
?>
 
25
class <?php echo $controllerName; ?>Controller extends <?php echo $plugin; ?>AppController {
 
26
 
 
27
        var $name = '<?php echo $controllerName; ?>';
 
28
<?php if ($isScaffold): ?>
 
29
        var $scaffold;
 
30
<?php else: ?>
 
31
<?php
 
32
if (count($helpers)):
 
33
        echo "\tvar \$helpers = array(";
 
34
        for ($i = 0, $len = count($helpers); $i < $len; $i++):
 
35
                if ($i != $len - 1):
 
36
                        echo "'" . Inflector::camelize($helpers[$i]) . "', ";
 
37
                else:
 
38
                        echo "'" . Inflector::camelize($helpers[$i]) . "'";
 
39
                endif;
 
40
        endfor;
 
41
        echo ");\n";
 
42
endif;
 
43
 
 
44
if (count($components)):
 
45
        echo "\tvar \$components = array(";
 
46
        for ($i = 0, $len = count($components); $i < $len; $i++):
 
47
                if ($i != $len - 1):
 
48
                        echo "'" . Inflector::camelize($components[$i]) . "', ";
 
49
                else:
 
50
                        echo "'" . Inflector::camelize($components[$i]) . "'";
 
51
                endif;
 
52
        endfor;
 
53
        echo ");\n";
 
54
endif;
 
55
 
 
56
echo $actions;
 
57
 
 
58
endif; ?>
 
59
 
 
60
}
 
61
<?php echo "?>"; ?>
 
 
b'\\ No newline at end of file'