original_string: public function load($workingDir)
    {
      $locator = new FileLocator($this->getPotentialDirectories($workingDir));
      $loader = new YamlLoader($locator);
  
      // Config validation.
      $processor = new Processor();
      $schema = new BuddySchema();
  
      $files = $locator->locate(static::FILENAME, NULL, FALSE);
      foreach ($files as $file) {
        // After loading the raw data from the yaml file, we validate given
        // configuration.
        $raw = $loader->load($file);
        $conf = $processor->processConfiguration($schema, array('buddy' => $raw));
        if (isset($conf['commands'])) {
          foreach($conf['commands'] as $command => $specs) {
            if (!isset($this->commands[$command])) {
              $this->commands[$command] = array(
                'options' => $specs,
                'file' => $file,
              );
            }
          }
        }
  
        // In the case 'root' is set, we do not process any parent buddy files.
        if (!empty($values['root'])) {
          break;
        }
      }
  
      return $this;
    }
code: public function load($workingDir)
    {
      $locator = new FileLocator($this->getPotentialDirectories($workingDir));
      $loader = new YamlLoader($locator);
  
      // Config validation.
      $processor = new Processor();
      $schema = new BuddySchema();
  
      $files = $locator->locate(static::FILENAME, NULL, FALSE);
      foreach ($files as $file) {
        // After loading the raw data from the yaml file, we validate given
        // configuration.
        $raw = $loader->load($file);
        $conf = $processor->processConfiguration($schema, array('buddy' => $raw));
        if (isset($conf['commands'])) {
          foreach($conf['commands'] as $command => $specs) {
            if (!isset($this->commands[$command])) {
              $this->commands[$command] = array(
                'options' => $specs,
                'file' => $file,
              );
            }
          }
        }
  
        // In the case 'root' is set, we do not process any parent buddy files.
        if (!empty($values['root'])) {
          break;
        }
      }
  
      return $this;
    }
code_tokens: public function load ( $ workingDir ) { $ locator = new FileLocator ( $ this -> getPotentialDirectories ( $ workingDir ) ) ; $ loader = new YamlLoader ( $ locator ) ; // Config validation. $ processor = new Processor ( ) ; $ schema = new BuddySchema ( ) ; $ files = $ locator -> locate ( static :: FILENAME , NULL , FALSE ) ; foreach ( $ files as $ file ) { // After loading the raw data from the yaml file, we validate given // configuration. $ raw = $ loader -> load ( $ file ) ; $ conf = $ processor -> processConfiguration ( $ schema , array ( 'buddy' => $ raw ) ) ; if ( isset ( $ conf [ 'commands' ] ) ) { foreach ( $ conf [ 'commands' ] as $ command => $ specs ) { if ( ! isset ( $ this -> commands [ $ command ] ) ) { $ this -> commands [ $ command ] = array ( 'options' => $ specs , 'file' => $ file , ) ; } } } // In the case 'root' is set, we do not process any parent buddy files. if ( ! empty ( $ values [ 'root' ] ) ) { break ; } } return $ this ; }
docstring: Loads the configuration file data.
docstring_tokens: Loads the configuration file data .