10b3fd2d3SAndreas Gohr<?php 2*dad993c5SAndreas Gohr 30b3fd2d3SAndreas Gohr/** 40b3fd2d3SAndreas Gohr * This file is part of the FreeDSx LDAP package. 50b3fd2d3SAndreas Gohr * 60b3fd2d3SAndreas Gohr * (c) Chad Sikorra <Chad.Sikorra@gmail.com> 70b3fd2d3SAndreas Gohr * 80b3fd2d3SAndreas Gohr * For the full copyright and license information, please view the LICENSE 90b3fd2d3SAndreas Gohr * file that was distributed with this source code. 100b3fd2d3SAndreas Gohr */ 110b3fd2d3SAndreas Gohr 120b3fd2d3SAndreas Gohrnamespace FreeDSx\Ldap\Exception; 130b3fd2d3SAndreas Gohr 14*dad993c5SAndreas Gohruse Throwable; 15*dad993c5SAndreas Gohr 160b3fd2d3SAndreas Gohr/** 170b3fd2d3SAndreas Gohr * Thrown when an unsolicited notification is received. Holds the error, code, and OID of the notification type. 180b3fd2d3SAndreas Gohr * 190b3fd2d3SAndreas Gohr * @author Chad Sikorra <Chad.Sikorra@gmail.com> 200b3fd2d3SAndreas Gohr */ 210b3fd2d3SAndreas Gohrclass UnsolicitedNotificationException extends ProtocolException 220b3fd2d3SAndreas Gohr{ 230b3fd2d3SAndreas Gohr /** 240b3fd2d3SAndreas Gohr * @var string 250b3fd2d3SAndreas Gohr */ 260b3fd2d3SAndreas Gohr protected $oid; 270b3fd2d3SAndreas Gohr 280b3fd2d3SAndreas Gohr /** 290b3fd2d3SAndreas Gohr * @param string $message 300b3fd2d3SAndreas Gohr * @param int $code 310b3fd2d3SAndreas Gohr * @param \Throwable|null $previous 320b3fd2d3SAndreas Gohr * @param string $oid 330b3fd2d3SAndreas Gohr */ 34*dad993c5SAndreas Gohr public function __construct($message = "", $code = 0, Throwable $previous = null, $oid = "") 350b3fd2d3SAndreas Gohr { 360b3fd2d3SAndreas Gohr $this->oid = $oid; 370b3fd2d3SAndreas Gohr parent::__construct($message, $code, $previous); 380b3fd2d3SAndreas Gohr } 390b3fd2d3SAndreas Gohr 400b3fd2d3SAndreas Gohr /** 410b3fd2d3SAndreas Gohr * Get the name OID identifying the unsolicited notification. 420b3fd2d3SAndreas Gohr * 430b3fd2d3SAndreas Gohr * @return string 440b3fd2d3SAndreas Gohr */ 450b3fd2d3SAndreas Gohr public function getOid() 460b3fd2d3SAndreas Gohr { 470b3fd2d3SAndreas Gohr return $this->oid; 480b3fd2d3SAndreas Gohr } 490b3fd2d3SAndreas Gohr} 50