public function set($id, $value)
    {
        if (!empty($this->locks[$id])) {
            throw new ContainerException("Cannot override locked key {$id}");
        }
        $this->definitions[$id] = $value;
        $this->calcs[$id] = false;
        // unset on override
        unset($this->objects[$id]);
    }
public function set($id, $value)
    {
        if (!empty($this->locks[$id])) {
            throw new ContainerException("Cannot override locked key {$id}");
        }
        $this->definitions[$id] = $value;
        $this->calcs[$id] = false;
        // unset on override
        unset($this->objects[$id]);
    }
public function set ( $ id , $ value ) { if ( ! empty ( $ this -> locks [ $ id ] ) ) { throw new ContainerException ( "Cannot override locked key {$id}" ) ; } $ this -> definitions [ $ id ] = $ value ; $ this -> calcs [ $ id ] = false ; // unset on override unset ( $ this -> objects [ $ id ] ) ; }
Sets a parameter defined in an unique key ID.
You can set objects as a closures.

@param string $id    Key Name
@param mixed  $value Value or closure function

@return void
Sets a parameter defined in an unique key ID . You can set objects as a closures .