Page MenuHomeDevCentral

PhabricatorGroupMapping.php
No OneTemporary

PhabricatorGroupMapping.php

<?php
namespace Nasqueron\Notifications\Analyzers\Phabricator;
use Nasqueron\Notifications\Analyzers\ItemGroupMapping;
use Nasqueron\Notifications\Phabricator\PhabricatorStory;
class PhabricatorGroupMapping extends ItemGroupMapping {
///
/// Extra properties
///
/**
* An array of words, each item a string with a word to find in the story.
*
* @var array
*/
public $words = [];
///
/// Helper methods to process words
///
/**
* Determines if the specified story belong to this mapping
*
* @return bool
*/
public function doesStoryBelong (PhabricatorStory $story) {
foreach ($this->words as $word) {
if (stripos($story->text, $word) !== false) {
return true;
}
}
return false;
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Jul 27, 20:36 (15 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2819042
Default Alt Text
PhabricatorGroupMapping.php (845 B)

Event Timeline