Пример #1
0
 public function dispatch(ParametersInterface $params)
 {
     if (!$this->endpoint->validateParameters($params)) {
         throw new \Exception('Not valid parameters!');
     }
     $response = $this->adapter->request($this->endpoint, $params);
     if ($response instanceof \Exception) {
         throw $response;
     }
     return $response;
 }