original_string: protected function loadDependencies()
      {
          foreach ($this->plugins as $id => $plugin) {
              if (!$required = $this->getDependencies($plugin)) {
                  continue;
              }
  
              $disable = false;
  
              foreach ($required as $require) {
                  if (!$pluginObj = $this->findByIdentifier($require)) {
                      $disable = true;
                  }
                  elseif ($pluginObj->disabled) {
                      $disable = true;
                  }
              }
  
              if ($disable) {
                  $this->disablePlugin($id);
              }
              else {
                  $this->enablePlugin($id);
              }
          }
      }
code: protected function loadDependencies()
      {
          foreach ($this->plugins as $id => $plugin) {
              if (!$required = $this->getDependencies($plugin)) {
                  continue;
              }
  
              $disable = false;
  
              foreach ($required as $require) {
                  if (!$pluginObj = $this->findByIdentifier($require)) {
                      $disable = true;
                  }
                  elseif ($pluginObj->disabled) {
                      $disable = true;
                  }
              }
  
              if ($disable) {
                  $this->disablePlugin($id);
              }
              else {
                  $this->enablePlugin($id);
              }
          }
      }
code_tokens: protected function loadDependencies ( ) { foreach ( $ this -> plugins as $ id => $ plugin ) { if ( ! $ required = $ this -> getDependencies ( $ plugin ) ) { continue ; } $ disable = false ; foreach ( $ required as $ require ) { if ( ! $ pluginObj = $ this -> findByIdentifier ( $ require ) ) { $ disable = true ; } elseif ( $ pluginObj -> disabled ) { $ disable = true ; } } if ( $ disable ) { $ this -> disablePlugin ( $ id ) ; } else { $ this -> enablePlugin ( $ id ) ; } } }
docstring: Cross checks all plugins and their dependancies, if not met plugins
  are disabled and vice versa.
  @return void
docstring_tokens: Cross checks all plugins and their dependancies if not met plugins are disabled and vice versa .