Find role
@param string $id
@return null|\self
@throws \yii\base\InvalidConfigException
182305
public static function find($id)
    {
        $item = self::getAuthManager()->getRole($id);
        if ($item !== null) {
            return new self($item);
        }
        return null;
    }
686007
protected function findModel(string $id)
    {
        $item = Yii::$app->authManager->getRule($id);

        if (!empty($item)) {
            return new BizRuleModel($item);
        }

        throw new NotFoundHttpException(Yii::t('yii2mod.rbac', 'The requested page does not exist.'));
    }
654225
private function getProfile($id) {
		if(!$this->profiles->has($id)) {
			throw new InvalidConfigException('Profile for encrypt "' . $id . '" not configured!');
		}
		/** @var Encrypter $encrypter */
		$encrypter = $this->profiles->get($id);
		return $encrypter;
	}
935045
public function find($id)
    {
        return Arr::first($this->items, function ($key, Contract $skill) use ($id) {
            return $skill->getId() === $id;
        }, null);
    }
79106
public function find(string $id = null)
    {
        if (null === $id) {
            return null;
        }

        $table = $this->getTable();

        $this->logger->info('model: find row within table {table} with id {id}', ['table' => $table, 'id' => $id]);

        if ($this->storageCache->has($id)) {
            $this->logger->info(
                'model: found row within cache for table {table} with id {id}',
                ['table' => $table, 'id' => $id]
            );

            return $this->fromPersistence($this->storageCache->get($id));
        }

        $qb = $this->connection->createQueryBuilder();
        $qb->select('*')->from($this->getTable())->where($qb->expr()->eq('id', ':id'))->setParameter('id', $id);

        $row = $qb->execute()->fetch(\PDO::FETCH_ASSOC);
        if (false === $row) {
            $this->logger->notice(
                'model: row within table {table} with id {id} not found',
                ['table' => $table, 'id' => $id]
            );

            return null;
        }

        $this->storageCache->set($row['id'], $row);

        return $this->fromPersistence($row);
    }
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.');
        }
    }
813155
public static function find($id) { 
        $array = KernelDB::find(static::$model, $id);
        $routeModel = Dir::apiModel(static::$model);
        return self::arrayToModel($routeModel, $array);
    }
706838
public static function find_by_id($id)
	{
		$row = self::oneOrNew($id);

		if (!$row->get('id'))
		{
			return false;
		}

		return $row;
	}
1119835
public function find($id)
    {
        $this->newQuery();

        $this->queryBuilder->whereEqual($this->primaryFieldName, $id);

        $queryKey = $this->queryBuilder->firstQueryKey();

        if (!$this->isCompleteKey($queryKey)) {
            return null;
        }

        list($method, $parameters) = $this->getFindMethodAndParameters();

        array_unshift($parameters, $queryKey);
        $value = call_user_func_array([$this->redClient, $method], $parameters);

        return $value;
    }
633879
public function view($id = null) {
        $user = $this->Users->get($id, [
            'contain' => ['Roles']
        ]);
        $this->set('user', $user);
        $this->set('_serialize', ['user']);
    }
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 ) );
	}
1193865
public static function find($id)
    {
        $item = UserRBACHelper::getAuthManager()->getRule($id);
        if ($item !== null) {
            return new static($item);
        }

        return null;
    }
269185
public function find($id)
    {
        $attributes = $this->backend->find($id);
        if (!is_null($attributes)) {
            return $this->deserializeEntry($attributes);
        }
    }
922297
public function findRootOf( $id )
    {
        return $this->findOne( array(
            'id' => $this->sql()
                         ->select()
                         ->columns( array( 'rootId' ) )
                         ->where( array(
                             'id' => $id,
                         ) ),
        ) );
    }
578876
public function find(string $id)
    {
        $element = $this->first(function ($element) use ($id) {
            return $element->id() === $id;
        });

        if (!$element) {
            $this->notFound($id);
        }

        return $element;
    }
1330674
public function view($id = null) {
        $role = $this->Roles->get($id, [
            'contain' => ['Tasks', 'Users']
        ]);
        $this->set('role', $role);
        $this->set('_serialize', ['role']);
    }
311893
public function find($id)
    {
        $data = $this->client->get(Inflector::pluralize($this->getResourceName()).'/'.$id);

        return $this->fromArray(reset($data));
    }