Lines Matching refs:referral

66         switch ($this->options['referral']) {
76 'The referral option "%s" is invalid.',
77 $this->options['referral']
101 'Encountered a referral request, but no referrals were supplied.',
106 # Initialize a referral context to track the referrals we have already visited as well as count.
111 foreach ($messageFrom->getResponse()->getReferrals() as $referral) {
112 # We must skip referrals we have already visited to avoid a referral loop
113 if ($this->options['_referral_context']->hasReferral($referral)) {
117 $this->options['_referral_context']->addReferral($referral);
120 'The referral limit of %s has been reached.',
129 $bind = $referralChaser->chase($messageTo, $referral, null);
135 $options['servers'] = $referral->getHost() !== null ? [$referral->getHost()] : [];
136 $options['port'] = $referral->getPort() ?? 389;
137 $options['use_ssl'] = $referral->getUseSsl();
139 # Each referral could potentially modify different aspects of the request, depending on the URL. Clone it
143 $this->mergeReferralOptions($request, $referral);
148 # If we have a referral on a bind request, then do not bind initially.
163 # If the referral encountered other referrals but exhausted them, continue to the next one.
177 'All referral attempts have been exhausted. %s',
184 * @param LdapUrl $referral
187 protected function mergeReferralOptions(RequestInterface $request, LdapUrl $referral): void
189 if ($referral->getDn() !== null && $request instanceof SearchRequest) {
190 $request->setBaseDn($referral->getDn());
191 } elseif ($referral->getDn() !== null && $request instanceof DnRequestInterface) {
192 $request->setDn($referral->getDn());
195 if ($referral->getScope() !== null && $request instanceof SearchRequest) {
196 if ($referral->getScope() === LdapUrl::SCOPE_SUB) {
198 } elseif ($referral->getScope() === LdapUrl::SCOPE_BASE) {
205 if ($referral->getFilter() !== null && $request instanceof SearchRequest) {
206 $request->setFilter(Filters::raw($referral->getFilter()));