public function __construct($id, $config) { parent::__construct($id); $this->qurey_settings['count'] = 50; $this->qurey_settings['include_rts'] = false; $this->qurey_settings['include_entities'] = 1; $this->query_settings['exclude_replies'] = true; $this->settings['account'] = $config['account']; $this->settings['overwrite'] = false; if (!empty($config['overwrite'])) { $this->settings['overwrite'] = $config['overwrite']; } $this->interval = $config['interval']; $this->connection = new \TwitterOAuth($config['consumerKey'], $config['consumerSecret'], $config['oauthKey'], $config['oauthSecret']); $this->setUserTimeline($config['account']); }
public function __construct(array $config) { if (!isset($config['slackbot_token'])) { throw new \Exception('slackbot_token must be configured'); } return parent::__construct($config, 'slack'); }
function __construct($id, $data, $autoStore = false) { parent::__construct($id); $this->interval = self::NOT_A_CRON; $this->data = $data; if ($autoStore && $data) { $this->store(); } }
public function __construct(array $config) { if (!isset($config['email_address'])) { throw new \Exception('email address must be configured'); } if (!isset($config['mandrill_username']) || !isset($config['mandrill_password'])) { throw new \Exception('mandrill username and password must be configured'); } return parent::__construct($config, 'email'); }
public function __construct(array $config) { $parameters = array('hostname', 'port', 'password', 'channels'); foreach ($parameters as $parameter) { if (isset($config['irc_' . $parameter])) { $this->{$parameter} = $config['irc_' . $parameter]; } if (is_null($this->{$parameter})) { throw new \Exception("irc_{$parameter} must be configured"); } } $this->nickname = $config['name']; return parent::__construct($config, 'irc'); }
public function __construct(array $config) { $config['max_response_length'] = 800; // limit to 5 messages of 160 characters return parent::__construct($config, 'sms'); }