Page MenuHomeDevCentral

No OneTemporary

diff --git a/app/Notifications/PhabricatorNotification.php b/app/Notifications/PhabricatorNotification.php
index 2f8ea4a..a7526b2 100644
--- a/app/Notifications/PhabricatorNotification.php
+++ b/app/Notifications/PhabricatorNotification.php
@@ -1,73 +1,75 @@
<?php
namespace Nasqueron\Notifications\Notifications;
use Nasqueron\Notifications\Analyzers\Phabricator\PhabricatorPayloadAnalyzer;
use Nasqueron\Notifications\Notification;
use Nasqueron\Notifications\Phabricator\PhabricatorStory;
class PhabricatorNotification extends Notification {
/**
* @var PhabricatorPayloadAnalyzer
*/
private $analyzer = null;
private $story;
/**
* Initializes a new PhabricatorNotification instance
*
* @param string $project The project for this notification
* @param PhabricatorStory $story The story to convert into a notification
* @param string[] $projects the list of the projects for this story
*/
public function __construct ($project, PhabricatorStory $story) {
// Private property used by the analyzer
$this->story = $story;
// Straightforward properties
$this->service = "Phabricator";
$this->project = $project;
$this->rawContent = json_encode($story);
$this->text = $story->text;
// Analyzes and fills
$this->type = $story->getObjectType();
$this->group = $this->getGroup();
$this->link = $this->getLink();
}
/**
* Gets analyzer
+ *
+ * @return Nasqueron\Notifications\Analyzers\Phabricator\PhabricatorPayloadAnalyzer
*/
private function getAnalyzer () {
if ($this->analyzer === null) {
$this->analyzer = new PhabricatorPayloadAnalyzer(
$this->project,
$this->story
);
}
return $this->analyzer;
}
/**
* Gets the target notificatrion group
*
* @return string the target group for the notification
*/
public function getGroup () {
return $this->getAnalyzer()->getGroup();
}
/**
* Gets the notification URL. Intended to be a widget or icon link.
*
* @return string
*/
public function getLink () {
return "";
}
}

File Metadata

Mime Type
text/x-diff
Expires
Thu, Dec 26, 16:15 (8 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2315183
Default Alt Text
(2 KB)

Event Timeline