@@ 389-392 (lines=4) @@ | ||
386 | ||
387 | $modelObject = $this->getNewModel(); |
|
388 | ||
389 | if (!method_exists($modelObject, 'findOne')){ |
|
390 | $class = (new\ReflectionClass($modelObject)); |
|
391 | throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\' . $class->getShortName().' class.'); |
|
392 | } |
|
393 | ||
394 | $result = call_user_func([ |
|
395 | $modelObject, |
@@ 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 | /** |