src/components/RbacValidateComponent.php 1 location
|
@@ 30-34 (lines=5) @@
|
| 27 |
|
*/ |
| 28 |
|
public function setModel(Model $model): ModelInterface |
| 29 |
|
{ |
| 30 |
|
if (!($model instanceof ModelInterface)) { |
| 31 |
|
|
| 32 |
|
$modelClass = (new\ReflectionClass($model)); |
| 33 |
|
|
| 34 |
|
throw new InvalidConfigException($modelClass->getNamespaceName() . |
| 35 |
|
'\\' . $modelClass->getShortName().' class must be implemented from |
| 36 |
|
Itstructure\RbacModule\interfaces\ModelInterface.'); |
| 37 |
|
} |
src/controllers/BaseController.php 1 location
|
@@ 427-430 (lines=4) @@
|
| 424 |
|
|
| 425 |
|
$modelObject = $this->getNewModel(); |
| 426 |
|
|
| 427 |
|
if (!method_exists($modelObject, 'findOne')) { |
| 428 |
|
$class = (new\ReflectionClass($modelObject)); |
| 429 |
|
throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\' . |
| 430 |
|
$class->getShortName().' class.'); |
| 431 |
|
} |
| 432 |
|
|
| 433 |
|
$result = call_user_func([ |