You are here

public function AcsfMessage::__construct in Acquia Cloud Site Factory Connector 8

Same name and namespace in other branches
  1. 8.2 src/AcsfMessage.php \Drupal\acsf\AcsfMessage::__construct()

Constructor.

Parameters

string $method: The request method. e.g. POST, GET, PUT, etc.

string $endpoint: The endpoint to contact on the remote server.

array $parameters: The list of parameters to send with the request.

AcsfConfig $config: (Optional) The configuration option.

string $ah_site: (Optional) The Acquia Hosting sitegroup.

string $ah_env: (Optional) The Acquia Hosting environment.

Closure $callback: (Optional) An anonymous callback function.

Throws

AcsfMessageMissingCredsException

1 call to AcsfMessage::__construct()
AcsfMessageRest::__construct in src/AcsfMessageRest.php
Constructor.
1 method overrides AcsfMessage::__construct()
AcsfMessageRest::__construct in src/AcsfMessageRest.php
Constructor.

File

src/AcsfMessage.php, line 91

Class

AcsfMessage
AcsfMessage.

Namespace

Drupal\acsf

Code

public function __construct($method, $endpoint, array $parameters = [], AcsfConfig $config = NULL, $ah_site = NULL, $ah_env = NULL, Closure $callback = NULL) {

  // Use our default config if not specified.
  if (empty($config)) {
    $config = new AcsfConfigDefault($ah_site, $ah_env);
  }
  $this->config = $config;
  $this->method = $method;
  $this->endpoint = $endpoint;
  $this->parameters = $parameters;
  $this->ahSite = $ah_site;
  $this->ahEnv = $ah_env;
  $this->callback = $callback;
}