protected function initAppSystem(string $name, string $className)
    {
        if (!class_exists($className)) {
            throw new Exception(
                'The appSystem class '.$className.' not exist.',
                self::ERR_APP_SYSTEM_CLASS_NOT_EXIST
            );
        }
        
        $appSystem = new $className;
        if ($appSystem instanceof SystemInterface === false) {
            throw new Exception(
                'The appSystem '.$className.' not implement the interface.',
                self::ERR_APP_SYSTEM_NOT_IMPLEMENT_INTERFACE
            );
        }
        
        $this->appSystemList[$name] = $appSystem;
        
        if ($appSystem->toRun() === true) {
            $this->runTasks->addToRunSteps(
                $name,
                \BFW\RunTasks::generateStepItem(null, [$appSystem, 'run'])
            );
        }
    }
protected function initAppSystem(string $name, string $className)
    {
        if (!class_exists($className)) {
            throw new Exception(
                'The appSystem class '.$className.' not exist.',
                self::ERR_APP_SYSTEM_CLASS_NOT_EXIST
            );
        }
        
        $appSystem = new $className;
        if ($appSystem instanceof SystemInterface === false) {
            throw new Exception(
                'The appSystem '.$className.' not implement the interface.',
                self::ERR_APP_SYSTEM_NOT_IMPLEMENT_INTERFACE
            );
        }
        
        $this->appSystemList[$name] = $appSystem;
        
        if ($appSystem->toRun() === true) {
            $this->runTasks->addToRunSteps(
                $name,
                \BFW\RunTasks::generateStepItem(null, [$appSystem, 'run'])
            );
        }
    }
protected function initAppSystem ( string $ name , string $ className ) { if ( ! class_exists ( $ className ) ) { throw new Exception ( 'The appSystem class ' . $ className . ' not exist.' , self :: ERR_APP_SYSTEM_CLASS_NOT_EXIST ) ; } $ appSystem = new $ className ; if ( $ appSystem instanceof SystemInterface === false ) { throw new Exception ( 'The appSystem ' . $ className . ' not implement the interface.' , self :: ERR_APP_SYSTEM_NOT_IMPLEMENT_INTERFACE ) ; } $ this -> appSystemList [ $ name ] = $ appSystem ; if ( $ appSystem -> toRun ( ) === true ) { $ this -> runTasks -> addToRunSteps ( $ name , \ BFW \ RunTasks :: generateStepItem ( null , [ $ appSystem , 'run' ] ) ) ; } }
Instantiate the appSystem declared, only if they implement the interface.
If the system should be run, we add him to the runTasks object.

@param string $name The core system name
@param string $className The core system class name
instance.

@return void
Instantiate the appSystem declared only if they implement the interface . If the system should be run we add him to the runTasks object .