original_string: public static function loadAll(array $options = [])
      {
          $plugins = [];
          foreach (App::path('Plugin') as $path) {
              if (!is_dir($path)) {
                  continue;
              }
              $dir = new DirectoryIterator($path);
              foreach ($dir as $dirPath) {
                  if ($dirPath->isDir() && !$dirPath->isDot()) {
                      $plugins[] = $dirPath->getBasename();
                  }
              }
          }
          if (Configure::check('plugins')) {
              $plugins = array_merge($plugins, array_keys(Configure::read('plugins')));
              $plugins = array_unique($plugins);
          }
  
          $collection = static::getCollection();
          foreach ($plugins as $p) {
              $opts = isset($options[$p]) ? $options[$p] : null;
              if ($opts === null && isset($options[0])) {
                  $opts = $options[0];
              }
              if ($collection->has($p)) {
                  continue;
              }
              static::load($p, (array)$opts);
          }
      }
code: public static function loadAll(array $options = [])
      {
          $plugins = [];
          foreach (App::path('Plugin') as $path) {
              if (!is_dir($path)) {
                  continue;
              }
              $dir = new DirectoryIterator($path);
              foreach ($dir as $dirPath) {
                  if ($dirPath->isDir() && !$dirPath->isDot()) {
                      $plugins[] = $dirPath->getBasename();
                  }
              }
          }
          if (Configure::check('plugins')) {
              $plugins = array_merge($plugins, array_keys(Configure::read('plugins')));
              $plugins = array_unique($plugins);
          }
  
          $collection = static::getCollection();
          foreach ($plugins as $p) {
              $opts = isset($options[$p]) ? $options[$p] : null;
              if ($opts === null && isset($options[0])) {
                  $opts = $options[0];
              }
              if ($collection->has($p)) {
                  continue;
              }
              static::load($p, (array)$opts);
          }
      }
code_tokens: public static function loadAll ( array $ options = [ ] ) { $ plugins = [ ] ; foreach ( App :: path ( 'Plugin' ) as $ path ) { if ( ! is_dir ( $ path ) ) { continue ; } $ dir = new DirectoryIterator ( $ path ) ; foreach ( $ dir as $ dirPath ) { if ( $ dirPath -> isDir ( ) && ! $ dirPath -> isDot ( ) ) { $ plugins [ ] = $ dirPath -> getBasename ( ) ; } } } if ( Configure :: check ( 'plugins' ) ) { $ plugins = array_merge ( $ plugins , array_keys ( Configure :: read ( 'plugins' ) ) ) ; $ plugins = array_unique ( $ plugins ) ; } $ collection = static :: getCollection ( ) ; foreach ( $ plugins as $ p ) { $ opts = isset ( $ options [ $ p ] ) ? $ options [ $ p ] : null ; if ( $ opts === null && isset ( $ options [ 0 ] ) ) { $ opts = $ options [ 0 ] ; } if ( $ collection -> has ( $ p ) ) { continue ; } static :: load ( $ p , ( array ) $ opts ) ; } }
docstring: Will load all the plugins located in the default plugin folder.
  
  If passed an options array, it will be used as a common default for all plugins to be loaded
  It is possible to set specific defaults for each plugins in the options array. Examples:
  
  ```
  Plugin::loadAll([
  ['bootstrap' => true],
  'DebugKit' => ['routes' => true],
  ]);
  ```
  
  The above example will load the bootstrap file for all plugins, but for DebugKit it will only load the routes file
  and will not look for any bootstrap script.
  
  If a plugin has been loaded already, it will not be reloaded by loadAll().
  
  @param array $options Options.
  @return void
  @throws \Cake\Core\Exception\MissingPluginException
  @deprecated 3.7.0 This method will be removed in 4.0.0.
docstring_tokens: Will load all the plugins located in the default plugin folder .