src/Container.php
public function get($id)
    {
        if (!array_key_exists($id, $this->entries)) {
            throw new NotFoundException(sprintf('The entry for %s was not found.', $id));
        }
        // Pass in the container as the only argument to the closure when we invoke it.
        return $this->entries[$id]($this);
    }
public function get($id)
    {
        if (!array_key_exists($id, $this->entries)) {
            throw new NotFoundException(sprintf('The entry for %s was not found.', $id));
        }
        // Pass in the container as the only argument to the closure when we invoke it.
        return $this->entries[$id]($this);
    }
Finds an entry of the container by its identifier and returns it.

@param string $id Identifier of the entry to look for.

@throws NotFoundExceptionInterface  No entry was found for **this** identifier.
@throws ContainerExceptionInterface Error while retrieving the entry.

@return mixed Entry.