public static function getNamespace($namespaceClass)
    {
        if (is_object($namespaceClass) === true) {
            $namespaceClass = get_class($namespaceClass);
        }
    
        $lastSlashPosition = mb_strrpos($namespaceClass, '\\');
    
        if ($lastSlashPosition !== false) {
            return mb_substr($namespaceClass, 0, $lastSlashPosition);
        }
    
        return "";
    }