Method which finds one item in the repository
@param type $id
@return type entity
@throws ItemNotSelectedException
541002
public function getById($id = null)
    {
        if ($id === null) {
            throw new ItemNotSelectedException;
        }
        $entity = $this->repository->findById($id);
        if (!$entity) {
            throw new NonexistingItemException;
        }
        return $entity;
    }
1087781
public function findOrderEntityForItemWithId($id, $returnMultipleResults = false)
    {
        try {
            return $this->orderRepository->findOrderForItemWithId($id, $returnMultipleResults);
        } catch (NoResultException $nre) {
            throw new EntityNotFoundException(static::$itemEntity, $id);
        }
    }
1237238
public static function find($id)
    {
        $item = Configs::authManager()->getRole($id);
        if ($item !== null) {
            return new self($item);
        }

        return null;
    }
590268
public function get($id)
    {
        foreach ($this->items as $item) {
            if ($item->id === $id) {
                return $item;
            }
        }
        return null;
    }
382492
public function get_item($id)
	{
		// Element empty!
		if (count($this->_items) === 0)
			return FALSE;

		if (array_key_exists($id, $this->_items))
		{ // By ID
			return $this->_items[$id];
		} else
		{ // By route
			$path = $this->get_tree_index(Route::get($id));

			if($path != false)
			{
				$levels = count($path);

				$item = $this->_items[$path[0]];

				if($levels > 1)
				{
					for($i=1; $i<$levels; $i++)
					{
						$item = $item->siblings[$path[$i]];
					}
				}
				return $item;
			}
		}
		return FALSE;
	}
744919
protected function find($id = null)
	{
		$query = $this->query();
		$query->where('id', $id);

		if (is_null($id) or is_null($model = $query->get_one()))
		{
			throw new \HttpNotFoundException();
		}

		return $model;
	}
590329
public function findByIntOrFail(int $id): Model
    {
        $model = $this->findByInt($id);
        if (empty($model)) {
            throw new ResourceNotFoundException();
        }

        return $model;
    }
904245
protected function findModel($id)
    {
        if (($model = Product::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException(t('app', '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()));
    }
372591
public function getID($ID)
    {
        if($this->hasID($ID)) {
            return $this->offsetGet($this->safeOffset($ID));
        } else {
            throw new CollectionIDNotFoundException('ID "' . $ID . '" does not exist in collection');
        }
    }
916909
public function findById($id)
    {
        $query =
            'SELECT `' .
            $this->getFields("`, `") . '`
            FROM ' . $this->tableName .
            ' WHERE `id`=:id LIMIT 1';
        $statement = $this->database->prepare($query);
        $statement->bindParam(':id', $id);
        $statement->execute();
        $this->entity->fill($statement->fetch());
        return $this->entity;
    }
289023
public static function find($id)
    {
        $collection = json_decode(self::get("/collections/{$id}")->getBody(), true);

        return new self($collection);
    }
20558
public function find(int $id)
    {
        return $this->cache->tags($this->getModel())->remember($id, 60, function () use ($id) {
            return $this->repository->find($id);
        });
    }
575419
public function findTreeItem($id, MapperTreeItemInterface $item)
    {
        if ($id === $item->getId()) {
            return $item;
        }
        foreach ($item->getChildren() as $child) {
            if (null !== $treeItem = $this->findTreeItem($id, $child)) {
                return $treeItem;
            }
        }

        return null;
    }
1328147
public function get($id) {
        $id=($id==='')?"0":$id;
        if (!isset($this->items[$id])) {
            return new MessageItem(); // we returns an empty error.
        }
        return $this->items[$id];
    }
1361394
public function deleteAction($id)
    {
        $delete = function($id) {
            try {
                $collectionManager = $this->getCollectionManager();
                $collectionManager->delete($id);
            } catch (CollectionNotFoundException $cnf) {
                throw new EntityNotFoundException(self::$entityName, $id); // will throw 404 Entity not found
            } catch (MediaException $me) {
                throw new RestException($me->getMessage(), $me->getCode()); // will throw 400 Bad Request
            }
        };

        $view = $this->responseDelete($id, $delete);

        return $this->handleView($view);
    }
161581
public static function one($id)
	{
		$instance = self::blank();
		return $instance->whereEquals($instance->getPrimaryKey(), $id)->rows()->seek($id);
	}