original_string: public function initApps()
      {
          if (count($this->apps) > 0) {
              throw new AlreadyInitiatedException('The apps are already loaded!');
          }
  
          foreach ($this->appList as $className) {
              $instance = new $className($this);
              $this->apps->append($instance);
          }
  
          // Let the apps configure itself.
          foreach ($this->apps as $app) {
              $app->load();
          }
  
          // Let the apps register it parts.
          foreach ($this->apps as $app) {
              $app->registerRoutes(Router::getInstance());
          }
      }
code: public function initApps()
      {
          if (count($this->apps) > 0) {
              throw new AlreadyInitiatedException('The apps are already loaded!');
          }
  
          foreach ($this->appList as $className) {
              $instance = new $className($this);
              $this->apps->append($instance);
          }
  
          // Let the apps configure itself.
          foreach ($this->apps as $app) {
              $app->load();
          }
  
          // Let the apps register it parts.
          foreach ($this->apps as $app) {
              $app->registerRoutes(Router::getInstance());
          }
      }
code_tokens: public function initApps ( ) { if ( count ( $ this -> apps ) > 0 ) { throw new AlreadyInitiatedException ( 'The apps are already loaded!' ) ; } foreach ( $ this -> appList as $ className ) { $ instance = new $ className ( $ this ) ; $ this -> apps -> append ( $ instance ) ; } // Let the apps configure itself. foreach ( $ this -> apps as $ app ) { $ app -> load ( ) ; } // Let the apps register it parts. foreach ( $ this -> apps as $ app ) { $ app -> registerRoutes ( Router :: getInstance ( ) ) ; } }
docstring: Load and initiate all apps.
  
  @codeCoverageIgnore
docstring_tokens: Load and initiate all apps .