\apex\app\msg\objectsevent_message

Creates and returns a message_event object, which is used to send direct and RPC calls via RabbitMQ and other event dispatches used within Apex.

Summary

Methods
Properties
Constants
__construct()
import_properties()
set_type()
get_type()
get_routing_key()
get_function()
get_caller()
get_request()
get_params()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$type
$routing_key
$function
$caller
$request
$params
N/A

Properties

$type

$type :

Type

$routing_key

$routing_key :

Type

$function

$function :

Type

$caller

$caller :

Type

$request

$request :

Type

$params

$params :

Type

Methods

__construct()

__construct(string  $routing_key,mixed  $params)

Create new event message

Parameters

string $routing_key

The routing key to dispatch the message to.

mixed $params

Iterable of any params you want to pass.

import_properties()

import_properties(\apex\app\msg\objects\event_message  $msg)

Import properties. Used by event_response object to initialize.

Parameters

\apex\app\msg\objects\event_message $msg

The message that we're creaitng a response for.

set_type()

set_type(string  $type)

Set the message type.

Parameters

string $type

Must be either 'rpc' or 'direct'.

get_type()

get_type(): string

Get the message type.

Returns

string —

The message type

get_routing_key()

get_routing_key(boolean  $return_full = false): string

Get the routing key

Parameters

boolean $return_full

If true, will return the routing key with function name. Defaults to false.

Returns

string —

$routing_key The routing key

get_function()

get_function(): string

et the function name.

Returns

string —

The function name to call.

get_caller()

get_caller(): array

Get the caller array.

Returns

array —

The caller function / class.

get_request()

get_request(): array

Get the contents of the request.

Returns

array —

Various information on the request such as URI, area, IP address, etc.

get_params()

get_params(): array

Get the params of the request.

Returns

array —

The params of the request.