models/BaseDataModel.php
public static function moduleClass($moduleName = 'Module')
    {
        $result = false;

        $className = get_called_class();
        $refClass = new ReflectionClass($className);
        $ns = $refClass->getNamespaceName();

        $len = strlen($ns) - strlen(UniModule::$modelsSubdir);
        if (strrpos($ns, UniModule::$modelsSubdir) == $len) {
           $ns = substr($ns, 0, $len);
           $result = $ns . $moduleName;
        }

        return $result;
    }
public static function moduleClass($moduleName = 'Module')
    {
        $result = false;

        $className = get_called_class();
        $refClass = new ReflectionClass($className);
        $ns = $refClass->getNamespaceName();

        $len = strlen($ns) - strlen(UniModule::$modelsSubdir);
        if (strrpos($ns, UniModule::$modelsSubdir) == $len) {
           $ns = substr($ns, 0, $len);
           $result = $ns . $moduleName;
        }

        return $result;
    }
public static function moduleClass ( $ moduleName = 'Module' ) { $ result = false ; $ className = get_called_class ( ) ; $ refClass = new ReflectionClass ( $ className ) ; $ ns = $ refClass -> getNamespaceName ( ) ; $ len = strlen ( $ ns ) - strlen ( UniModule :: $ modelsSubdir ) ; if ( strrpos ( $ ns , UniModule :: $ modelsSubdir ) == $ len ) { $ ns = substr ( $ ns , 0 , $ len ) ; $ result = $ ns . $ moduleName ; } return $ result ; }
Try to get module class this model belong to.
Get latest module in inheritance chain.
@return string|false class name.
Try to get module class this model belong to . Get latest module in inheritance chain .