FOF30\Pimple\Container::offsetSet PHP Method

offsetSet() public method

Objects must be defined as Closures. Allowing any PHP callable leads to difficult to debug problems as function names (strings) are callable (creating a function with the same name as an existing parameter would break your container).
public offsetSet ( string $id, mixed $value )
$id string The unique identifier for the parameter or object
$value mixed The value of the parameter or a closure to define an object
    public function offsetSet($id, $value)
    {
        if (isset($this->frozen[$id])) {
            throw new \RuntimeException(sprintf('Cannot override frozen service "%s".', $id));
        }
        $this->values[$id] = $value;
        $this->keys[$id] = true;
    }