public function singleton(string $className, array $params = null): void
    {
        if (! is_null($params)) {
            $this->config->registerClassParameters($className, $params);
        }
        $this->config->registerSingleton($className);
    }