src/DependencyInjection/ServiceContainer.php
public function bind($name, \Closure $type)
    {
        $name = '\\'.ltrim($name, '\\');
        $this->bindings[$name] = $type;
    }
public function bind($name, \Closure $type)
    {
        $name = '\\'.ltrim($name, '\\');
        $this->bindings[$name] = $type;
    }
public function bind ( $ name , \ Closure $ type ) { $ name = '\\' . ltrim ( $ name , '\\' ) ; $ this -> bindings [ $ name ] = $ type ; }
Adds a new service class.

@param string   $name The full qualified class name of the service including namespace
@param \Closure $type This Closure has to return the service class object
Adds a new service class .