original_string: public function getToolConsumers() {
          global $DB;
          $consumers = [];
  
          $rsconsumers = $DB->get_recordset($this->consumertable, null, 'name');
          foreach ($rsconsumers as $row) {
              $consumer = new ToolProvider\ToolConsumer($row->consumerkey, $this);
              $this->build_tool_consumer_object($row, $consumer);
              $consumers[] = $consumer;
          }
          $rsconsumers->close();
  
          return $consumers;
      }
code: public function getToolConsumers() {
          global $DB;
          $consumers = [];
  
          $rsconsumers = $DB->get_recordset($this->consumertable, null, 'name');
          foreach ($rsconsumers as $row) {
              $consumer = new ToolProvider\ToolConsumer($row->consumerkey, $this);
              $this->build_tool_consumer_object($row, $consumer);
              $consumers[] = $consumer;
          }
          $rsconsumers->close();
  
          return $consumers;
      }
code_tokens: public function getToolConsumers ( ) { global $ DB ; $ consumers = [ ] ; $ rsconsumers = $ DB -> get_recordset ( $ this -> consumertable , null , 'name' ) ; foreach ( $ rsconsumers as $ row ) { $ consumer = new ToolProvider \ ToolConsumer ( $ row -> consumerkey , $ this ) ; $ this -> build_tool_consumer_object ( $ row , $ consumer ) ; $ consumers [ ] = $ consumer ; } $ rsconsumers -> close ( ) ; return $ consumers ; }
docstring: Load all tool consumers from the database.
  @return array
docstring_tokens: Load all tool consumers from the database .