code: protected function registerFactory($key, callable $callable, $shared = true)
      {
          $this->sm->setFactory($key, new CallbackWrapper($this, $callable));
          $this->sm->setShared($key, $shared);
      }
docs: Registers a factory wrapping a Slim factory into a ZF2 factory
  
  @param $key
  @param callable $callable
  @param bool $shared