public function getFactory($name)
    {
        if (false === $this->has($name)) {
            if (class_exists($name)) {
                $this->resolve($name);
            } else {
                throw new NotFoundException('Service "' . $name . '" is unknown');
            }
        }

        if (true === isset($this->map[$class = ltrim($name, '/')])) {
            $name = $this->map[$class];
        }

        return $this->payload[$name];
    }