示例#1
0
 public function __construct($url, $token, $room, $prefix = null, $spamTimeout = 60, $icons = [])
 {
     parent::__construct($spamTimeout);
     self::$url = $url;
     self::$token = $token;
     self::$room = $room;
     self::$prefix = $prefix;
     self::$icons = $icons + ['sad' => ':thumbsdown:', 'smile' => ':thumbsup::sparkles:', 'error' => ':thumbsdown::shit:'];
 }
示例#2
0
 public function __construct($url, $settings = [], $prefix = null, $attachment = [], $spamTimeout = 60)
 {
     if (!class_exists('\\Maknz\\Slack\\Client')) {
         $message = 'Class \\Maknz\\Slack\\Client does not exist. Are you sure you have installed it? i.e. composer require "maknz/slack"';
         throw new \Exception($message);
     }
     parent::__construct($spamTimeout);
     self::$url = $url;
     self::$prefix = $prefix;
     self::$settings = $settings + ['username' => 'Behat', 'channel' => '#general', 'link_names' => true, 'icon' => ':fire:'];
     self::$attachment = $attachment + ['fallback' => 'Behat test failed', 'text' => '', 'pretext' => '', 'color' => 'danger', 'fields' => array()];
 }
 public function __construct()
 {
     parent::__construct();
     $this->subCommands = array();
     $this->initializeMacroCommand();
 }
 /**
  * Constructor.
  *
  * Your subclass MUST define a constructor, be
  * sure to call <b>parent::__construct();</b> to
  * have PHP instanciate the whole parent/child chain.
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
 }
示例#5
0
 public function __construct($spamTimeout = 60, $icons = [])
 {
     parent::__construct($spamTimeout);
     $behatchDir = __DIR__ . '/Resources';
     self::$icons = $icons + ['sad' => "{$behatchDir}/images/gnome-sad.png", 'smile' => "{$behatchDir}/images/gnome-smile.png", 'error' => "{$behatchDir}/images/gnome-error.png"];
 }