{369} - 3.5.2.1 $name

PHP4 users should start out their controller definitions using the $name attribute. The $name attribute should be set to the name of the controller. Usually this is just the plural form of the primary model the This takes care of some PHP4 classname oddities and helps CakePHP resolve naming.

<?php

#   $name controller attribute usage example

class RecipesController extends AppController {
   var $name = 'Recipes';
}

?>	
  1. <?php
  2. # $name controller attribute usage example
  3. class RecipesController extends AppController {
  4. var $name = 'Recipes';
  5. }
  6. ?>

{5216} - 3.5.2.1 $name

PHP4 users should start out their controller definitions using the $name attribute. The $name attribute should be set to the name of the controller. Usually this is just the plural form of the primary model the controller uses. This takes care of some PHP4 classname oddities and helps CakePHP resolve naming.

<?php

#   $name controller attribute usage example

class RecipesController extends AppController {
   var $name = 'Recipes';
}

?>	
  1. <?php
  2. # $name controller attribute usage example
  3. class RecipesController extends AppController {
  4. var $name = 'Recipes';
  5. }
  6. ?>

Differences

Lines: 1-6Lines: 1-6
 <title>$name</title> <title>$name</title>
-<p>PHP4 users should start out their controller definitions using the $name attribute. The $name attribute should be set to the name of the controller. Usually this is just the plural form of the primary model the This takes care of some PHP4 classname oddities and helps CakePHP resolve naming.</p> +<p>PHP4 users should start out their controller definitions using the <code>$name</code> attribute. The <code>$name</code> attribute should be set to the name of the controller. Usually this is just the plural form of the primary model the controller uses. This takes care of some PHP4 classname oddities and helps CakePHP resolve naming.</p>
 <pre> <pre>
 &lt;?php &lt;?php