Page MenuHomeDevCentral

PhabricatorPayloadEvent.php
No OneTemporary

PhabricatorPayloadEvent.php

<?php
namespace Nasqueron\Notifications\Events;
use Nasqueron\Notifications\Events\Event;
use Nasqueron\Notifications\Phabricator\PhabricatorStory;
use Illuminate\Queue\SerializesModels;
class PhabricatorPayloadEvent extends Event {
use SerializesModels;
/**
* The gate door which receives the request
* @var string
*/
public $door;
/**
* The Phabricator instance
* @var string
*/
protected $instance;
/**
* The raw payload
*/
public $payload;
/**
* The story sent by the request
* @var PhabricatorStory
*/
public $story;
/**
* Gets story from the request
*
* @param string $instance The Phabricator instance URL
* @return PhabricatorStory
*/
protected function getStory () {
return PhabricatorStory::loadFromArray(
$this->instance,
$this->payload
);
}
/**
* Creates a new event instance.
*
* @param string $door
* @param string $instance The Phabricator instance URL
* @param stdClass $payload
*/
public function __construct($door, $instance, $payload) {
$this->door = $door;
$this->instance = $instance;
$this->payload = $payload;
$this->story = $this->getStory();
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Feb 28, 21:39 (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2437075
Default Alt Text
PhabricatorPayloadEvent.php (1 KB)

Event Timeline