public function addEntry(string $id, EntryInterface $type): void
    {
        if (isset($this[$id])) {
            throw new ContainerException("Entry for identifier '$id' already exists");
        }

        $this->entryCache[$id] = $type;
    }
public function addEntry(string $id, EntryInterface $type): void
    {
        if (isset($this[$id])) {
            throw new ContainerException("Entry for identifier '$id' already exists");
        }

        $this->entryCache[$id] = $type;
    }
public function addEntry ( string $ id , EntryInterface $ type ) : void { if ( isset ( $ this [ $ id ] ) ) { throw new ContainerException ( "Entry for identifier '$id' already exists" ) ; } $ this -> entryCache [ $ id ] = $ type ; }
Adds an entry to the container.
@param string $id The identifier for the container entry
@param EntryInterface $type The container entry to add
@throws ContainerException If trying to add an entry to an identifier that already exists
Adds an entry to the container .