src/Koldy/Route.php
public static function isModule(string $module, string $controller = null, string $action = null): bool
    {
        $route = Application::route();
        if ($module === $route->getModuleUrl()) {
            if ($controller === null) {
                return true;
            } else {
                if ($controller === $route->getControllerUrl()) {
                    // now we have matched module and controller
                    if ($action === null) {
                        return true;
                    } else {
                        return ($action === $route->getActionUrl());
                    }
                } else {
                    return false;
                }
            }
        } else {
            return false;
        }
    }
public static function isModule(string $module, string $controller = null, string $action = null): bool
    {
        $route = Application::route();
        if ($module === $route->getModuleUrl()) {
            if ($controller === null) {
                return true;
            } else {
                if ($controller === $route->getControllerUrl()) {
                    // now we have matched module and controller
                    if ($action === null) {
                        return true;
                    } else {
                        return ($action === $route->getActionUrl());
                    }
                } else {
                    return false;
                }
            }
        } else {
            return false;
        }
    }
public static function isModule ( string $ module , string $ controller = null , string $ action = null ) : bool { $ route = Application :: route ( ) ; if ( $ module === $ route -> getModuleUrl ( ) ) { if ( $ controller === null ) { return true ; } else { if ( $ controller === $ route -> getControllerUrl ( ) ) { // now we have matched module and controller if ( $ action === null ) { return true ; } else { return ( $ action === $ route -> getActionUrl ( ) ) ; } } else { return false ; } } } else { return false ; } }
Is this the matching module, controller and action?

@param string $module
@param string $controller
@param string $action

@return bool
@throws Exception
Is this the matching module controller and action?