/**
* Creates a category.
*
* @param array $options The options
* @param string $section The section
*
* @return CategoryInterface
*
* @since 3.10.0
*
* @throws SectionNotFoundException
*/
public function createCategory(array $options = [], string $section = '') : CategoryInterface
{
$className = trim($this->namespace, '\\') . '\\Site\\Service\\' . ucfirst($section) . 'Category';
if (!class_exists($className)) {
throw new SectionNotFoundException();
}
return new $className($options);
}