コード例 #1
0
ファイル: Source.php プロジェクト: erebot/erebot
 public function match(\Erebot\Interfaces\Event\Base\Generic $event)
 {
     if (!$event instanceof \Erebot\Interfaces\Event\Base\Source) {
         return false;
     }
     if ($this->source === null) {
         return true;
     }
     $collator = $event->getConnection()->getCollator();
     return $collator->compare($event->getSource(), (string) $this->source) == 0;
 }