Airbrake\Configuration::verify PHP Method

verify() public method

Verify that the configuration is complete.
public verify ( )
    public function verify()
    {
        if (!$this->get('apiKey')) {
            throw new AirbrakeException('Cannot initialize the Airbrake client without an ApiKey being set to the configuration.');
        }
    }

Usage Example

Example #1
0
 /**
  * Build the Client with the Airbrake Configuration.
  *
  * @throws Airbrake\Exception
  * @param Configuration $configuration
  */
 public function __construct(Configuration $configuration)
 {
     $configuration->verify();
     $this->configuration = $configuration;
     $this->connection = new Connection($configuration);
 }