public function loadWebhook($webhook) { if ($webhook instanceof Webhook\BaseWebhook) { $this->webhooks[$webhook->getName()] = $webhook; } else { throw new \Exception('Webhook must implement PhpSlackBot\\Webhook\\BaseWebhook'); } }