Finds the AuthItem model based on its primary key value.
If the model is not found, a 404 HTTP exception will be thrown.
@param string $id
@return AdminBizRule the loaded model
@throws NotFoundHttpException if the model cannot be found
331458
protected function findModel($id)
    {
        $item = Yii::$app->authManager->getRule($id);
        if ($item) {
            return new AdminBizRule($item);
        } else {
            throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));
        }
    }
1287470
protected function findModel($id)
    {
        /** @var \yii\web\IdentityInterface $class */
        $class = $this->userClassName;
        if (($user = $class::findIdentity($id)) !== null) {
            return new AdminAssignment($id, $user);
        } else {
            throw new NotFoundHttpException(Yii::t('yuncms', 'The requested page does not exist.'));
        }
    }
1294984
public function findOrFail($id)
    {
        if ($model = $this->find($id)) {
            return $model;
        }
        throw (new ModelNotFoundException)->setModel(get_class($this->getModel()));
    }
536746
public function find($id)
    {
        if (!$this->isRepositoryReadable()) {
            throw $this->createNotReadableException();
        }

        return $this->trigger(__FUNCTION__, [
            'id' => $id,
        ]);
    }
1076853
protected function throwModelNotFoundException($id)
    {
        throw new ModelNotFoundException('Model not found for ID ' . $id . ' on table ' . $this->container->make($this->getModelName())->getTable());
    }
137962
public function getOrFail($id)
    {

        if ($model = $this->get($id)) {
            return $model;
        }

        $typeName = Type::of($this->prototype());

        throw new ResourceNotFoundException("$typeName #$id not found.");
    }
44731
protected function findModel($id)
    {
        $item = Yii::$app->authManager->getRule($id);
        if ($item) {
            return new BizRule($item);
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
461656
public function find($id)
    {
        try
        {
            $model = $this->model->findOrFail($id);
        }
        catch(ModelNotFoundException $e)
        {
            throw new NotFoundException;
        }

        return $model;
    }
301000
protected function find($id)
    {
        $model = $this->model;
        $this->model = $model::find($id);
        if (!$this->model) {
            // belts and braces check - no model = doesn't exist (without being masked missing object property)
            // potential candidate for custom exception handling
            return false;
        }
        return $this->model->exists;
    }
1200751
public function findById($id)
	{
		$model = $this->createModel();

		if ( ! $user = $model->newQuery()->find($id))
		{
			throw new UserNotFoundException("A user could not be found with ID [$id].");
		}

		return $user;
	}
464429
public function findById($id)
    {
        try
        {
            return $this->sentry->findUserById($id);
        }
        catch (SentryUserNotFoundException $e)
        {
            throw new UserNotFoundException($e->getMessage());
        }
    }
1053762
public static function findIdentity( $id ) {

		// Find valid User
		$user = static::findById( $id );

		// Load User Permissions
		if( isset( $user ) ) {

			if( Yii::$app->core->isRbac() ) {

				$user->loadPermissions();
			}

			return $user;
		}

		throw new NotFoundHttpException( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
	}
303117
public function find($id = null)
    {
        // ID has to be defined
        if (!isset($id)) {
            throw new \InvalidArgumentException('Undefined ID to find', 400);
        }

        // Return the first found record using the primary key for the where
        $result = $this->where($this->primaryKey, $id, '=', $this->table)->limit(1)->first();

        // Return the first matching record
        return $result;
    }
743455
protected function findModel($id)
    {
        $auth = Configs::authManager();
        $item = $this->type === Item::TYPE_ROLE ? $auth->getRole($id) : $auth->getPermission($id);
        if ($item) {
            return new AuthItem($item);
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
526241
protected function findModel($id)
    {
        /* @var $modelClass ActiveRecord */
        $modelClass = $this->modelClass;
        $keys = $modelClass::primaryKey();
        if (count($keys) > 1) {
            $values = explode(',', $id);
            if (count($keys) === count($values)) {
                $model = $modelClass::findOne(array_combine($keys, $values));
            }
        } elseif ($id !== null) {
            $model = $modelClass::findOne($id);
        }

        if (isset($model)) {
            return $model;
        } else {
            throw new NotFoundHttpException("Object not found: '$id'");
        }
    }
76723
public static function find($id)
    {
        $item = Yii::$app->getAuthManager()->getRule($id);
        if ($item !== null) {
            return new static($item);
        }

        return null;
    }
946650
public static function find_by_id($id)
	{
		$hzad = self::oneOrNew($id);

		if (!$hzad->get('authenticator'))
		{
			return false;
		}

		return $hzad;
	}