modules/acm/src/Connector/APIWrapper.php
public function silentRequest($method, array $params = []) {
    $response = NULL;

    if (!method_exists($this, $method)) {
      throw new \InvalidArgumentException("Method {$method} doesn't exist.");
    }

    $this->turnRouteEventsOff();

    try {
      $response = call_user_func_array([$this, $method], $params);
    }
    catch (\Exception $e) {
      $mesg = sprintf(
        'Silent exception during %s request: (%d) - %s',
        $method,
        $e->getCode(),
        $e->getMessage()
      );

      $this->logger->error($mesg);
    }

    $this->turnRouteEventsOn();

    return $response;
  }
public function silentRequest($method, array $params = []) {
    $response = NULL;

    if (!method_exists($this, $method)) {
      throw new \InvalidArgumentException("Method {$method} doesn't exist.");
    }

    $this->turnRouteEventsOff();

    try {
      $response = call_user_func_array([$this, $method], $params);
    }
    catch (\Exception $e) {
      $mesg = sprintf(
        'Silent exception during %s request: (%d) - %s',
        $method,
        $e->getCode(),
        $e->getMessage()
      );

      $this->logger->error($mesg);
    }

    $this->turnRouteEventsOn();

    return $response;
  }
public function silentRequest ( $ method , array $ params = [ ] ) { $ response = NULL ; if ( ! method_exists ( $ this , $ method ) ) { throw new \ InvalidArgumentException ( "Method {$method} doesn't exist." ) ; } $ this -> turnRouteEventsOff ( ) ; try { $ response = call_user_func_array ( [ $ this , $ method ] , $ params ) ; } catch ( \ Exception $ e ) { $ mesg = sprintf ( 'Silent exception during %s request: (%d) - %s' , $ method , $ e -> getCode ( ) , $ e -> getMessage ( ) ) ; $ this -> logger -> error ( $ mesg ) ; } $ this -> turnRouteEventsOn ( ) ; return $ response ; }
Perform a silent request.

Turns off route events and catches all exceptions.

@param string $method
The method name.
@param array $params
The method params.

@return mixed
The API request response.

@throws \Exception
Failed request exception.
Perform a silent request .