public function bind($id, callable $serviceGenerator)
    {
        $this->callables[(string)$id] = function ($zit) use ($serviceGenerator) {
            static $object;

            if (null === $object) {
                $object = $serviceGenerator($zit);
            }

            return $object;
        };
    }
public function bind($id, callable $serviceGenerator)
    {
        $this->callables[(string)$id] = function ($zit) use ($serviceGenerator) {
            static $object;

            if (null === $object) {
                $object = $serviceGenerator($zit);
            }

            return $object;
        };
    }
public function bind ( $ id , callable $ serviceGenerator ) { $ this -> callables [ ( string ) $ id ] = function ( $ zit ) use ( $ serviceGenerator ) { static $ object ; if ( null === $ object ) { $ object = $ serviceGenerator ( $ zit ) ; } return $ object ; } ; }
Binds the service generator and resolves it by its id

@param string   $id               The service generator id
@param callable $serviceGenerator The service generator closure/function
Binds the service generator and resolves it by its id