public function set($id, callable $callback)
    {
        if ($this->has($id)) {
            throw new Exception\AlreadyExistsException;
        }
        $this->callbacks[$id] = $callback;
    }
public function set($id, callable $callback)
    {
        if ($this->has($id)) {
            throw new Exception\AlreadyExistsException;
        }
        $this->callbacks[$id] = $callback;
    }
public function set ( $ id , callable $ callback ) { if ( $ this -> has ( $ id ) ) { throw new Exception \ AlreadyExistsException ; } $ this -> callbacks [ $ id ] = $ callback ; }
Defines service.

@param $id
@param callable $callback accepts container as first argument
Defines service .