public function getModuleByClassName($className)
    {
        $longest = 0;
        $foundModule = false;
        
        $className = Framework::prepareClassName($className);
        
        foreach ($this->modules as $moduleNamespace => $module) {
            $moduleNamespace = Framework::prepareNamespace($moduleNamespace);
            $sameNamespace = strpos($className, $moduleNamespace);
            $length = strlen($moduleNamespace);

            if ($sameNamespace !== false && $length > $longest) {
                $longest = $length;
                $foundModule = $module;
            }
        }
        
        return $foundModule;
    }