Get item by identifier

@param int $id
17824
public function getItemById($id)
    {
        if (!isset($this->children[$id])) {
            throw new \InvalidArgumentException(sprintf("item with id %d does not exist", $id));
        }

        return $this->children[$id];
    }
206610
public function get_from_id(int $id) {
        $records = $this->get_from_ids([$id]);
        return count($records) ? array_shift($records) : null;
    }
133008
public function getItemByIdForDisplay(int $id = 0, array $params = [])
    {
        $item = $this->getItemById($id, $params);

        if ($item->id && ! $item->is_read) {
            $item->update([
                'is_read' => true,
            ]);
        }

        return $item;
    }
1019350
public function find($id) {
        $pri = $this->connection->getPrimaryKey();
        if ($pri && $id) {
            $data = $this->where($pri, '=', $id)->first();

            return $data;
        }
    }
935045
public function find($id)
    {
        return Arr::first($this->items, function ($key, Contract $skill) use ($id) {
            return $skill->getId() === $id;
        }, null);
    }
249546
public function findOne($id)
    {
        return ($itemArray = $this->getItemDataProvider($id)) ? $this->createItem($itemArray) : false;
    }
601773
public function fetchById($id)
    {
        if ($this->hasCache()) {
            $data = $this->getCacheItem($id);
            return $data;
        }
        return parent::fetchById($id);
    }
221400
public function get($id)
    {
        if ($this->has($id)) {
            return $this->make($id);
        }

        throw new ContainerValueNotFoundException(sprintf(
            'Identifier "%s" is not defined.',
            $id
        ));
    }
30810
protected function _id($id)
    {
        if (($id !== null) && isset($this->_options['cache_id_prefix'])) {
            return $this->_options['cache_id_prefix'] . $id; // return with prefix
        }
        return $id; // no prefix, just return the $id passed
    }
674985
public function get($id)
    {
        if(!isset($this->loadedServices[$id]))
            $this->loadedServices[$id] = parent::get($id);

        return $this->loadedServices[$id];
    }
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];
    }
463977
public function position(string $id): int
    {
        $i = 0;
        foreach ($this->all() as $item) {
            if ($item->id() === $id) {
                return $i;
            }

            ++$i;
        }

        return $this->notFound($id);
    }
1157813
public function fetch( $id ) {

		if ( $this->contains( $id ) ) {
			$this->cacheHits++;
			return $this->cache->getItem( $id );
		}

		$this->cacheMisses++;
		return false;
	}
193218
protected function getAbstractId($id)
    {
        if (isset($this->aliases[$id])) {
            $id = $this->aliases[$id];
        }

        return $id;
    }
1276395
public function get($id)
    {
        if (!$this->has($id)) {
            return;
        }

        return $this->container->findDefinition($id)->getClass();
    }
310123
public function get($id = null){
        if(!is_null($id)){
            return $this->find($id);
        }
        return $this->model->get();
    }
131964
public function get($id) {
		if (!isset($id)) throw new \Exception('ID for job is missing.');
		$id_file = $this->_save_path . $id;
		if (!is_file($id_file)) throw new \Exception('Job file for ID is missing.');

		// get the requested ID
		$item = json_decode(file_get_contents($id_file), true);

		return $item;
	}