Update Models\Model
Now accessing the model property starting with A-Z will return the external method (Models\Method) specified in the engine configuration for current model or an exception. This behavior is similar to ManagerModel.
This commit is contained in:
parent
d5d271491d
commit
ecb87a9696
1 changed files with 9 additions and 1 deletions
|
@ -129,8 +129,16 @@ class Model
|
|||
&& isset($this->zAttrs[$root = \lcfirst(\substr($name, 6))])
|
||||
) {
|
||||
return $this->zAttrsCalc[$name] = $this->c->censorship->censor($this->zAttrs[$root]);
|
||||
} else {
|
||||
}
|
||||
|
||||
$x = \ord($name);
|
||||
|
||||
if ($x > 90 || $x < 65) {
|
||||
return null;
|
||||
} else {
|
||||
$key = \str_replace(['ForkBB\\Models\\', 'ForkBB\\', '\\'], '', \get_class($this));
|
||||
|
||||
return $this->c->{$key . $name}->setModel($this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue