Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3942444
DockerHubPayloadEvent.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
DockerHubPayloadEvent.php
View Options
<?php
namespace
Nasqueron\Notifications\Events
;
use
Nasqueron\Notifications\Events\Event
;
use
Illuminate\Queue\SerializesModels
;
class
DockerHubPayloadEvent
extends
Event
{
use
SerializesModels
;
/**
* The gate door which receives the request
* @var string
*/
public
$door
;
/**
* The event triggering this request
* @var string
*/
public
$event
;
/**
* The request content, as a structured data
* @var \stdClass
*/
public
$payload
;
/**
* Gets event according the kind of payload we receive.
*
* @return string
*/
public
function
getEvent
()
:
string
{
if
(
isset
(
$this
->
payload
->
repository
->
repo_url
))
{
return
"push"
;
}
return
"buildFailure"
;
}
/**
* Creates a new event instance.
*
* @param string $door
* @param \stdClass $payload
*/
public
function
__construct
(
$door
,
$payload
)
{
$this
->
door
=
$door
;
$this
->
payload
=
$payload
;
$this
->
event
=
$this
->
getEvent
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Dec 26, 16:26 (8 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2315193
Default Alt Text
DockerHubPayloadEvent.php (1 KB)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment