mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Merge pull request #575 from shama/patch-controller
Remove unused code and correct doc for modelClass
This commit is contained in:
commit
d1cc29f412
1 changed files with 1 additions and 4 deletions
|
@ -265,7 +265,7 @@ class Controller extends Object implements CakeEventListener {
|
||||||
public $methods = array();
|
public $methods = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This controller's primary model class name, the Inflector::classify()'ed version of
|
* This controller's primary model class name, the Inflector::singularize()'ed version of
|
||||||
* the controller's $name property.
|
* the controller's $name property.
|
||||||
*
|
*
|
||||||
* Example: For a controller named 'Comments', the modelClass would be 'Comment'
|
* Example: For a controller named 'Comments', the modelClass would be 'Comment'
|
||||||
|
@ -363,9 +363,6 @@ class Controller extends Object implements CakeEventListener {
|
||||||
foreach ($this->uses as $modelClass) {
|
foreach ($this->uses as $modelClass) {
|
||||||
list($plugin, $class) = pluginSplit($modelClass, true);
|
list($plugin, $class) = pluginSplit($modelClass, true);
|
||||||
if ($name === $class) {
|
if ($name === $class) {
|
||||||
if (!$plugin) {
|
|
||||||
$plugin = $this->plugin ? $this->plugin . '.' : null;
|
|
||||||
}
|
|
||||||
return $this->loadModel($modelClass);
|
return $this->loadModel($modelClass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue