public function bind($id, $concrete, $singleton = false)
    {

        $concrete = $concrete ?: $id;

        if (!$concrete instanceof Closure) {
            
            // If the factory (resolver) is NOT a closure we assume,
            // that it is a classname and wrap it into a closure so it' s
            // easier when resolving.

            $concrete = function (Container $container) use ($id, $concrete) {

                $method = ($id == $concrete) ? 'build' : 'resolve';

                return $container->$method($concrete, array());
            };
        }


        $this->binds[$id] = compact('concrete', 'singleton');
    }