Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4793472
FireDockerHubNotification.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
FireDockerHubNotification.php
View Options
<?php
namespace
Nasqueron\Notifications\Jobs
;
use
Nasqueron\Notifications\Notifications\DockerHubNotification
;
use
Nasqueron\Notifications\Events\DockerHubPayloadEvent
;
use
Nasqueron\Notifications\Events\NotificationEvent
;
use
Nasqueron\Notifications\Jobs\Job
;
use
Event
;
class
FireDockerHubNotification
extends
Job
{
/**
* @var DockerHubPayloadEvent;
*/
private
$event
;
/**
* Initializes a new instance of FireDockerHubNotification
*
* @param DockerHubPayloadEvent $event The event to notify
*/
public
function
__construct
(
DockerHubPayloadEvent
$event
)
{
$this
->
event
=
$event
;
}
///
/// Task
///
/**
* Executes the job.
*
* @return void
*/
public
function
handle
()
{
$notification
=
$this
->
createNotification
();
Event
::
fire
(
new
NotificationEvent
(
$notification
));
}
/**
* Creates a DockerHub notification
*
* @param DockerHubPayloadEvent $event
* @return \Nasqueron\Notifications\Notification The notification
*/
protected
function
createNotification
()
{
return
new
DockerHubNotification
(
$this
->
event
->
door
,
// project
$this
->
event
->
event
,
// event type
$this
->
event
->
payload
// raw content
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Feb 28, 21:45 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2439334
Default Alt Text
FireDockerHubNotification.php (1 KB)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment