Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F250529
Explicit variables vs methods calls in methods
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
dereckson
Jan 7 2017, 21:25
2017-01-07 21:25:09 (UTC+0)
Size
1010 B
Referenced Files
None
Subscribers
None
Explicit variables vs methods calls in methods
View Options
/**
* Sends the notification to the broker target for distilled notifications
*
* @param Notification The notification to send
*/
protected function sendNotification(Notification $notification) : void {
$target = Config::get('broker.targets.notifications');
$routingKey = static::getNotificationRoutingKey($notification);
$message = json_encode($notification);
$job = new SendMessageToBroker($target, $routingKey, $message);
$job->handle();
}
/**
* Sends the notification to the broker target for distilled notifications
*
* @param Notification The notification to send
*/
protected function sendNotificationAlt(Notification $notification) : void {
(new SendMessageToBroker(
Config::get('broker.targets.notifications'), // Target
static::getNotificationRoutingKey($notification), // Routing key
json_encode($notification) // Message
))->handle();
}
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
70970
Default Alt Text
Explicit variables vs methods calls in methods (1010 B)
Attached To
Mode
P235 Explicit variables vs methods calls in methods
Attached
Detach File
Event Timeline
Log In to Comment