Airbrake\Configuration::__construct PHP Method

__construct() public method

Load the given data array to the record.
public __construct ( string $apiKey, array | stdClass $data = [] )
$apiKey string
$data array | stdClass
    public function __construct($apiKey, $data = array())
    {
        $data['apiKey'] = $apiKey;
        parent::__construct($data);
    }

Usage Example

 /**
  * Class constructor
  *
  * @param string $apiKey
  * @param array|\stdClass $async
  * @param $env
  * @param $host
  * @param $secure
  * @internal param Configuration $configuration
  */
 public function __construct($apiKey, $async, $env, $host, $secure)
 {
     parent::__construct($apiKey, array('async' => $async, 'environmentName' => $env, 'host' => $host, 'secure' => $secure, 'port' => $secure ? 443 : 80));
 }