src/Service/SettingsService.php
protected function detectNamespace($settings)
    {
        foreach ($this->options->getNamespaces() as $namespaceOptions) {
            $namespaceEntityClass = $namespaceOptions->getEntityClass();
            if ($settings instanceof $namespaceEntityClass) {
                return $namespaceOptions->getName();
            }
        }

        throw new Exception\InvalidArgumentException('Unknown Settings namespace');
    }
protected function detectNamespace($settings)
    {
        foreach ($this->options->getNamespaces() as $namespaceOptions) {
            $namespaceEntityClass = $namespaceOptions->getEntityClass();
            if ($settings instanceof $namespaceEntityClass) {
                return $namespaceOptions->getName();
            }
        }

        throw new Exception\InvalidArgumentException('Unknown Settings namespace');
    }
Tries to detect namespace from modal class

@param  object                             $settings
@return string
@throws Exception\InvalidArgumentException