original_string: private function process(array $data, $resource, $type, $require)
      {
          if ($this->processor) {
              if ($this->processor instanceof ProcessorInterface) {
                  if ($this->processor->supports($resource, $type)) {
                      $data = $this->processor->process($data);
                  } elseif ($require) {
                      throw ProcessorException::format(
                          'The resource "%s"%s is not supported by the processor.',
                          is_string($resource) ? $resource : gettype($resource),
                          $type ? " ($type)" : ''
                      );
                  }
              } else {
                  $processor = new Processor();
                  $data = $processor->processConfiguration(
                      $this->processor,
                      $data
                  );
              }
          } elseif ($require) {
              throw ProcessorException::format(
                  'No processor registered to handle any resource.'
              );
          }
  
          return $data;
      }
code: private function process(array $data, $resource, $type, $require)
      {
          if ($this->processor) {
              if ($this->processor instanceof ProcessorInterface) {
                  if ($this->processor->supports($resource, $type)) {
                      $data = $this->processor->process($data);
                  } elseif ($require) {
                      throw ProcessorException::format(
                          'The resource "%s"%s is not supported by the processor.',
                          is_string($resource) ? $resource : gettype($resource),
                          $type ? " ($type)" : ''
                      );
                  }
              } else {
                  $processor = new Processor();
                  $data = $processor->processConfiguration(
                      $this->processor,
                      $data
                  );
              }
          } elseif ($require) {
              throw ProcessorException::format(
                  'No processor registered to handle any resource.'
              );
          }
  
          return $data;
      }
code_tokens: private function process ( array $ data , $ resource , $ type , $ require ) { if ( $ this -> processor ) { if ( $ this -> processor instanceof ProcessorInterface ) { if ( $ this -> processor -> supports ( $ resource , $ type ) ) { $ data = $ this -> processor -> process ( $ data ) ; } elseif ( $ require ) { throw ProcessorException :: format ( 'The resource "%s"%s is not supported by the processor.' , is_string ( $ resource ) ? $ resource : gettype ( $ resource ) , $ type ? " ($type)" : '' ) ; } } else { $ processor = new Processor ( ) ; $ data = $ processor -> processConfiguration ( $ this -> processor , $ data ) ; } } elseif ( $ require ) { throw ProcessorException :: format ( 'No processor registered to handle any resource.' ) ; } return $ data ; }
docstring: Processes the configuration definition.
  
  @param array   $data     The configuration data.
  @param mixed   $resource A resource.
  @param string  $type     The resource type.
  @param boolean $require  Require processing?
  
  @return array The processed configuration data.
  
  @throws ProcessorException If the processor could not be used and it is
  require that one be used.
docstring_tokens: Processes the configuration definition .