@param AMQPMessage $message

@return Span
519299
public function fromConsumedMessage(AMQPMessage $message)
    {
        return new Span(
            $this->getIdentifierOrGenerate($message, 'X-B3-SpanId'),
            $this->getMessageName($message),
            $this->getIdentifierOrGenerate($message, 'X-B3-TraceId'),
            [
                new Annotation(Annotation::SERVER_SEND, $this->clock->microseconds(), $this->endpointResolver->resolve()),
            ],
            [],
            $this->getIdentifier($message, 'X-B3-ParentSpanId'),
            $this->getMessageHeader($message, 'X-B3-Flags') == '1'
        );
    }
91931
public function betweenlength($minlength, $maxlength, $message = null)
    {
        $message = empty($message) ? self::getDefaultMessage(__FUNCTION__, array($minlength, $maxlength)) : NULL;

        $this->minlength($minlength, $message)->max($maxlength, $message);
        return $this;
    }
1329457
public static function message($message) {

        return (new Color())->getColoredString(sprintf(self::MESSAGE, self::date(), $message), 'black', 'light_gray').PHP_EOL;

    }
167875
protected static function _processMessage( &$message )
    {
        $_newIndent = 0;

        foreach ( static::$_indentTokens as $_key => $_token )
        {
            if ( $_token == substr( $message, 0, $_length = strlen( $_token ) ) )
            {
                $_newIndent = ( false === $_key ? -1 : 1 );
                $message = substr( $message, $_length );
            }
        }

        return $_newIndent;
    }
366872
public function range($min, $max, $message = null)
    {
        $this->set([
            'min' => (int)$min,
            'max' => (int)$max,
        ], $message);
        return $this;
    }
720515
protected function formatMessage($message)
    {
        if (is_array($message)) {
            $message = var_export($message, true);
        } elseif (is_object($message)) {
            $message = get_object_vars($message);
        }

        return $message;
    }
712263
private function getMessageHeader(AMQPMessage $message, $header)
    {
        $headers = $message->has('application_headers') ? $message->get('application_headers') : [];

        return array_key_exists($header, $headers) ? $headers[$header] : null;
    }
1038897
public function gettext($message) {
		$args = func_get_args();
		$methodArgsNumber = 1;
		$message = $this->callMethodAndSprintf(__FUNCTION__, $args, $methodArgsNumber);
		return $message;
	}
579695
public function min($min, $message = null)
    {
        $this->set([
            'min' => (int)$min,
        ], $message);
        return $this;
    }
171333
public function management_message($message) {
        $this->page->requires->strings_for_js(array('clicktoclose'), 'core_grading');
        $this->page->requires->yui_module('moodle-core_grading-manage', 'M.core_grading.init_manage');
        return $this->output->box(format_string($message) . ' - ' . html_writer::tag('span', ''), 'message',
                'actionresultmessagebox');
    }
935877
public static function fromAMQPMessage(AMQPMessage $AMQPMessage)
    {
        $msg = new Message(
            json_decode($AMQPMessage->body, true),
            $AMQPMessage->delivery_info['routing_key'],
            $AMQPMessage->get_properties()
        );
        $msg->setAMQPMessage($AMQPMessage);
        return $msg;

    }
313221
public function a($message) {
        return isset($this->messages[$message]) ? $this->messages[$message] : $message;
    }
809404
public function queue(Message $message)
	{
		// Get the gateway for the certificate
		$gateway = $this->getGatewayForCertificate( $message->getCertificate() );

		// Queue the message
		return $gateway->queue($message);
	}
263970
public function message($message)
    {
        if (isset($this->currentRule)) {
            static::$messages[$this->input.'.'.$this->currentRule] = $message;
        }

        return $this;
    }
284849
def prepare_message(self, message_data, delivery_mode, priority=None,
                content_type=None, content_encoding=None):
        """"""
        return amqp.Message(message_data, properties={
                "delivery_mode": delivery_mode,
                "priority": priority,
                "content_type": content_type,
                "content_encoding": content_encoding})
1253485
public function setText($message) {
        if (empty($message)) {
            throw new \InvalidArgumentException('Message cannot be empty');
        }

        $this->message->setText($message);
        return $this;
    }
124578
public function message($message)
    {
        if (is_string($message) || is_numeric($message)) {
            $message = new Text($message);
        }

        if (!($message instanceof Message)) {
            throw new InvalidArgumentException('Invalid message.');
        }

        $this->message = $message;

        return $this;
    }