You are here

public function MandrillAPI::getInboundRoutes in Mandrill 8

Gets a list of inbound routes.

Return value

array

Overrides MandrillAPIInterface::getInboundRoutes

File

src/MandrillAPI.php, line 349

Class

MandrillAPI
Service class to integrate with Mandrill.

Namespace

Drupal\mandrill

Code

public function getInboundRoutes() {
  $routes = array();
  try {
    if ($mandrill = $this
      ->getAPIObject()) {
      $routes = $mandrill->inbound
        ->routes();
    }
  } catch (\Exception $e) {
    \Drupal::messenger()
      ->addError(t('Mandrill: %message', array(
      '%message' => $e
        ->getMessage(),
    )));
    $this->log
      ->error($e
      ->getMessage());
  }
  return $routes;
}