models/classes/runner/communicator/QtiCommunicationService.php
public function processOutput(QtiRunnerServiceContext $context)
    {
        $messages = [];
        $channels = $this->getOption(self::OPTION_CHANNELS);
        if (is_array($channels[self::CHANNEL_TYPE_OUTPUT])) {
            foreach ($channels[self::CHANNEL_TYPE_OUTPUT] as $outputChannelName => $outputChannelClass) {
                $channel = $this->getChannel($outputChannelName, self::CHANNEL_TYPE_OUTPUT);
                $message = $this->processChannel($channel, $context);
                if ($message !== null) {
                    $messages[] = [
                        'channel' => $channel->getName(),
                        'message' => $message,
                    ];
                }
            }
        }
        return $messages;
    }
public function processOutput(QtiRunnerServiceContext $context)
    {
        $messages = [];
        $channels = $this->getOption(self::OPTION_CHANNELS);
        if (is_array($channels[self::CHANNEL_TYPE_OUTPUT])) {
            foreach ($channels[self::CHANNEL_TYPE_OUTPUT] as $outputChannelName => $outputChannelClass) {
                $channel = $this->getChannel($outputChannelName, self::CHANNEL_TYPE_OUTPUT);
                $message = $this->processChannel($channel, $context);
                if ($message !== null) {
                    $messages[] = [
                        'channel' => $channel->getName(),
                        'message' => $message,
                    ];
                }
            }
        }
        return $messages;
    }
Builds the list of output messages
@param QtiRunnerServiceContext $context - Needs the current runner context
@return array - Returns a list of output, each one is represented by a channel's name that is a string and a message that can be any type