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 Exception; 150b3fd2d3SAndreas Gohruse FreeDSx\Ldap\LdapUrl; 160b3fd2d3SAndreas Gohruse FreeDSx\Ldap\Operation\ResultCode; 170b3fd2d3SAndreas Gohr 180b3fd2d3SAndreas Gohr/** 190b3fd2d3SAndreas Gohr * Represents a referral exception from an operation that needs to be chased to be completed. 200b3fd2d3SAndreas Gohr * 210b3fd2d3SAndreas Gohr * @author Chad Sikorra <Chad.Sikorra@gmail.com> 220b3fd2d3SAndreas Gohr */ 23*dad993c5SAndreas Gohrclass ReferralException extends Exception 240b3fd2d3SAndreas Gohr{ 250b3fd2d3SAndreas Gohr /** 260b3fd2d3SAndreas Gohr * @var LdapUrl[] 270b3fd2d3SAndreas Gohr */ 280b3fd2d3SAndreas Gohr protected $referrals; 290b3fd2d3SAndreas Gohr 300b3fd2d3SAndreas Gohr /** 310b3fd2d3SAndreas Gohr * @param string $diagnostic 32*dad993c5SAndreas Gohr * @param LdapUrl ...$referrals 330b3fd2d3SAndreas Gohr */ 340b3fd2d3SAndreas Gohr public function __construct(string $diagnostic, LdapUrl ...$referrals) 350b3fd2d3SAndreas Gohr { 360b3fd2d3SAndreas Gohr $this->referrals = $referrals; 370b3fd2d3SAndreas Gohr parent::__construct($diagnostic, ResultCode::REFERRAL); 380b3fd2d3SAndreas Gohr } 390b3fd2d3SAndreas Gohr 400b3fd2d3SAndreas Gohr /** 410b3fd2d3SAndreas Gohr * @return LdapUrl[] 420b3fd2d3SAndreas Gohr */ 430b3fd2d3SAndreas Gohr public function getReferrals() 440b3fd2d3SAndreas Gohr { 450b3fd2d3SAndreas Gohr return $this->referrals; 460b3fd2d3SAndreas Gohr } 470b3fd2d3SAndreas Gohr} 48