@@ 407-411 (lines=5) @@ | ||
404 | */ |
|
405 | public static function checkProfileModel($model) |
|
406 | { |
|
407 | if (!($model instanceof ActiveRecordInterface)){ |
|
408 | $modelClass = (new\ReflectionClass($model)); |
|
409 | throw new InvalidConfigException($modelClass->getNamespaceName() . |
|
410 | '\\' . $modelClass->getShortName().' class must be implemented from yii\db\ActiveRecordInterface.'); |
|
411 | } |
|
412 | ||
413 | if (!($model instanceof IdentityInterface)){ |
|
414 | $modelClass = (new\ReflectionClass($model)); |
|
@@ 413-417 (lines=5) @@ | ||
410 | '\\' . $modelClass->getShortName().' class must be implemented from yii\db\ActiveRecordInterface.'); |
|
411 | } |
|
412 | ||
413 | if (!($model instanceof IdentityInterface)){ |
|
414 | $modelClass = (new\ReflectionClass($model)); |
|
415 | throw new InvalidConfigException($modelClass->getNamespaceName() . |
|
416 | '\\' . $modelClass->getShortName().' class must be implemented from yii\web\IdentityInterface.'); |
|
417 | } |
|
418 | } |
|
419 | ||
420 | /** |
@@ 398-401 (lines=4) @@ | ||
395 | ||
396 | $modelObject = $this->getNewModel(); |
|
397 | ||
398 | if (!method_exists($modelObject, 'findOne')){ |
|
399 | $class = (new\ReflectionClass($modelObject)); |
|
400 | throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\' . $class->getShortName().' class.'); |
|
401 | } |
|
402 | ||
403 | $result = call_user_func([ |
|
404 | $modelObject, |