original_string: public static function get_message_processor($name, $ready = false) {
          global $DB, $CFG;
  
          $processor = $DB->get_record('message_processors', array('name' => $name));
          if (empty($processor)) {
              // Processor not found, return.
              return array();
          }
  
          $processor = self::get_processed_processor_object($processor);
          if ($ready) {
              if ($processor->enabled && $processor->configured) {
                  return $processor;
              } else {
                  return array();
              }
          } else {
              return $processor;
          }
      }
code: public static function get_message_processor($name, $ready = false) {
          global $DB, $CFG;
  
          $processor = $DB->get_record('message_processors', array('name' => $name));
          if (empty($processor)) {
              // Processor not found, return.
              return array();
          }
  
          $processor = self::get_processed_processor_object($processor);
          if ($ready) {
              if ($processor->enabled && $processor->configured) {
                  return $processor;
              } else {
                  return array();
              }
          } else {
              return $processor;
          }
      }
code_tokens: public static function get_message_processor ( $ name , $ ready = false ) { global $ DB , $ CFG ; $ processor = $ DB -> get_record ( 'message_processors' , array ( 'name' => $ name ) ) ; if ( empty ( $ processor ) ) { // Processor not found, return. return array ( ) ; } $ processor = self :: get_processed_processor_object ( $ processor ) ; if ( $ ready ) { if ( $ processor -> enabled && $ processor -> configured ) { return $ processor ; } else { return array ( ) ; } } else { return $ processor ; } }
docstring: Get specified message processor, validate corresponding plugin existence and
  system configuration.
  
  @param string $name  Name of the processor.
  @param bool $ready only return ready-to-use processors.
  @return mixed $processor if processor present else empty array.
  @since Moodle 3.2
docstring_tokens: Get specified message processor validate corresponding plugin existence and system configuration .