mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-09 21:12:41 +00:00
Merge branch '2.0-api-doc' into 2.0
This commit is contained in:
commit
7d0250ff47
362 changed files with 2186 additions and 4234 deletions
|
@ -24,6 +24,17 @@ echo "<?php\n";
|
|||
/**
|
||||
* <?php echo $controllerName; ?> Controller
|
||||
*
|
||||
<?php
|
||||
if (!$isScaffold) {
|
||||
$defaultModel = Inflector::singularize($controllerName);
|
||||
echo " * @property {$defaultModel} \${$defaultModel}\n";
|
||||
if (!empty($components)) {
|
||||
foreach ($components as $component) {
|
||||
echo " * @property {$component}Component \${$component}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
*/
|
||||
class <?php echo $controllerName; ?>Controller extends <?php echo $plugin; ?>AppController {
|
||||
|
||||
|
|
|
@ -23,6 +23,15 @@ echo "<?php\n"; ?>
|
|||
/**
|
||||
* <?php echo $name ?> Model
|
||||
*
|
||||
<?php
|
||||
foreach (array('hasOne', 'belongsTo', 'hasMany', 'hasAndBelongsToMany') as $assocType) {
|
||||
if (!empty($associations[$assocType])) {
|
||||
foreach ($associations[$assocType] as $relation) {
|
||||
echo " * @property {$relation['className']} \${$relation['alias']}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
*/
|
||||
class <?php echo $name ?> extends <?php echo $plugin; ?>AppModel {
|
||||
<?php if ($useDbConfig != 'default'): ?>
|
||||
|
|
|
@ -32,7 +32,6 @@ class PagesController extends AppController {
|
|||
* Controller name
|
||||
*
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public $name = 'Pages';
|
||||
|
||||
|
@ -40,7 +39,6 @@ class PagesController extends AppController {
|
|||
* Default helper
|
||||
*
|
||||
* @var array
|
||||
* @access public
|
||||
*/
|
||||
public $helpers = array('Html');
|
||||
|
||||
|
@ -48,7 +46,6 @@ class PagesController extends AppController {
|
|||
* This controller does not use a model
|
||||
*
|
||||
* @var array
|
||||
* @access public
|
||||
*/
|
||||
public $uses = array();
|
||||
|
||||
|
@ -56,7 +53,6 @@ class PagesController extends AppController {
|
|||
* Displays a view
|
||||
*
|
||||
* @param mixed What page to display
|
||||
* @access public
|
||||
*/
|
||||
public function display() {
|
||||
$path = func_get_args();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue