| @@ 44-51 (lines=8) @@ | ||
| 41 | * @return $this |
|
| 42 | * @throws \Exception |
|
| 43 | */ |
|
| 44 | public function via($driver) |
|
| 45 | { |
|
| 46 | $this->driver = $driver; |
|
| 47 | $this->validateDriver(); |
|
| 48 | $this->settings = $this->config['drivers'][$this->driver]; |
|
| 49 | ||
| 50 | return $this; |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Send message. |
|
| @@ 76-82 (lines=7) @@ | ||
| 73 | * |
|
| 74 | * @return mixed |
|
| 75 | */ |
|
| 76 | protected function getDriverInstance() |
|
| 77 | { |
|
| 78 | $this->validateDriver(); |
|
| 79 | $class = $this->config['map'][$this->driver]; |
|
| 80 | ||
| 81 | return new $class($this->settings); |
|
| 82 | } |
|
| 83 | ||
| 84 | /** |
|
| 85 | * Validate Parameters before sending. |
|