public function set($id, \Closure $value)
    {
        $this->definitions[$id] = function ($container) use ($value) {
            static $object;

            if (is_null($object)) {
                $object = $value($container);
            }

            return $object;
        };
    }
public function set($id, \Closure $value)
    {
        $this->definitions[$id] = function ($container) use ($value) {
            static $object;

            if (is_null($object)) {
                $object = $value($container);
            }

            return $object;
        };
    }
public function set ( $ id , \ Closure $ value ) { $ this -> definitions [ $ id ] = function ( $ container ) use ( $ value ) { static $ object ; if ( is_null ( $ object ) ) { $ object = $ value ( $ container ) ; } return $ object ; } ; }
Adds an entry to the container.

@param string   $id       Identifier of the entry.
@param \Closure $value    The closure to invoke when this entry is resolved.
The closure will be given this container as the only
argument when invoked.
Adds an entry to the container .