Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F14041538
SendMessageToBroker.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
993 B
Referenced Files
None
Subscribers
None
SendMessageToBroker.php
View Options
<?php
namespace
Nasqueron\Notifications\Jobs
;
use
Illuminate\Contracts\Bus\SelfHandling
;
use
Nasqueron\Notifications\Jobs\Job
;
use
Broker
;
class
SendMessageToBroker
extends
Job
implements
SelfHandling
{
/**
* The routing key, for topic exchange
*
* @var string
*/
private
$routingKey
=
''
;
/**
* The message to send
*
* @var string
*/
private
$message
=
''
;
/**
* Create a new job instance.
*
* @param $routingKey the routing key, for topic exchange
* @param $message the message to send
*
* @return void
*/
public
function
__construct
(
$routingKey
,
$message
)
{
$this
->
routingKey
=
$routingKey
;
$this
->
message
=
$message
;
}
/**
* Executes the job.
*
* @return void
*/
public
function
handle
()
{
Broker
::
setExchangeTarget
(
"github_events"
)
->
routeTo
(
$this
->
routingKey
)
->
sendMessage
(
$this
->
message
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 28, 17:54 (4 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3198637
Default Alt Text
SendMessageToBroker.php (993 B)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment