matchedDn = $matchedDn; $this->errorMessage = $errorMessage; $this->referrals = $referrals; $this->controls = $controls; $parts = ["error $errorCode"]; if ($errorMessage) $parts[] = $errorMessage; if ($matchedDn) $parts[] = "matched_dn: $matchedDn"; if ($referrals) $parts[] = "referrals: ".implode(" ", $referrals); $techMessage = implode(", ", $parts); parent::__construct([ "user" => $userMessage, "tech" => $techMessage, ], $errorCode); } } /** @var string */ protected $matchedDn; function getMatchedDn(): ?string { return $this->matchedDn; } /** @var string */ protected $errorMessage; function getErrorMessage(): ?string { return $this->errorMessage; } /** @var ?array */ protected $referrals; function getReferrals(): ?array { return $this->referrals; } /** @var ?array */ protected $controls; function getControls(): ?array { return $this->controls; } }