private function getContxtualModule(AbstractAppMeta $appMeta, $contexts)
    {
        $contextsArray = array_reverse(explode('-', $contexts));
        $module = null;
        foreach ($contextsArray as $context) {
            $class = $appMeta->name . '\Module\\' . ucwords($context) . 'Module';
            if (! class_exists($class)) {
                $class = 'BEAR\Package\Context\\' . ucwords($context) . 'Module';
            }
            if (! is_a($class, AbstractModule::class, true)) {
                throw new InvalidContextException($context);
            }
            $module = new $class($module);
        }

        return $module;
    }
private function getContxtualModule(AbstractAppMeta $appMeta, $contexts)
    {
        $contextsArray = array_reverse(explode('-', $contexts));
        $module = null;
        foreach ($contextsArray as $context) {
            $class = $appMeta->name . '\Module\\' . ucwords($context) . 'Module';
            if (! class_exists($class)) {
                $class = 'BEAR\Package\Context\\' . ucwords($context) . 'Module';
            }
            if (! is_a($class, AbstractModule::class, true)) {
                throw new InvalidContextException($context);
            }
            $module = new $class($module);
        }

        return $module;
    }
private function getContxtualModule ( AbstractAppMeta $ appMeta , $ contexts ) { $ contextsArray = array_reverse ( explode ( '-' , $ contexts ) ) ; $ module = null ; foreach ( $ contextsArray as $ context ) { $ class = $ appMeta -> name . '\Module\\' . ucwords ( $ context ) . 'Module' ; if ( ! class_exists ( $ class ) ) { $ class = 'BEAR\Package\Context\\' . ucwords ( $ context ) . 'Module' ; } if ( ! is_a ( $ class , AbstractModule :: class , true ) ) { throw new InvalidContextException ( $ context ) ; } $ module = new $ class ( $ module ) ; } return $ module ; }
Return configured module

@param AbstractAppMeta $appMeta
@param string          $contexts

@return AbstractModule
Return configured module