protected function registerFactory($key, callable $callable, $shared = true)
    {
        $this->sm->setFactory($key, new CallbackWrapper($this, $callable));
        $this->sm->setShared($key, $shared);
    }