Page MenuHomeDevCentral

DockerHubPayloadEvent.php
No OneTemporary

DockerHubPayloadEvent.php

<?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

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)

Event Timeline