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;
    }
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;
    }
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 ; }
Searches the module for the given class name.

@access public
@param string $className
@return boolean|Module
Searches the module for the given class name .