1<?php 2 3/** 4 * This file is part of the FreeDSx LDAP package. 5 * 6 * (c) Chad Sikorra <Chad.Sikorra@gmail.com> 7 * 8 * For the full copyright and license information, please view the LICENSE 9 * file that was distributed with this source code. 10 */ 11 12namespace FreeDSx\Ldap\Exception; 13 14use Throwable; 15 16/** 17 * Thrown when an unsolicited notification is received. Holds the error, code, and OID of the notification type. 18 * 19 * @author Chad Sikorra <Chad.Sikorra@gmail.com> 20 */ 21class UnsolicitedNotificationException extends ProtocolException 22{ 23 /** 24 * @var string 25 */ 26 protected $oid; 27 28 /** 29 * @param string $message 30 * @param int $code 31 * @param \Throwable|null $previous 32 * @param string $oid 33 */ 34 public function __construct($message = "", $code = 0, Throwable $previous = null, $oid = "") 35 { 36 $this->oid = $oid; 37 parent::__construct($message, $code, $previous); 38 } 39 40 /** 41 * Get the name OID identifying the unsolicited notification. 42 * 43 * @return string 44 */ 45 public function getOid() 46 { 47 return $this->oid; 48 } 49} 50