blob: 6cc3334af51de77c0eb3e1470a30bb383dfca5f8 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Adldap\Models;
4
5use Adldap\AdldapException;
6
7/**
8 * Class ModelNotFoundException.
9 *
10 * Thrown when an LDAP record is not found.
11 */
12class ModelNotFoundException extends AdldapException
13{
14 /**
15 * The query filter that was used.
16 *
17 * @var string
18 */
19 protected $query;
20
21 /**
22 * The base DN of the query that was used.
23 *
24 * @var string
25 */
26 protected $baseDn;
27
28 /**
29 * Sets the query that was used.
30 *
31 * @param string $query
32 * @param string $baseDn
33 *
34 * @return ModelNotFoundException
35 */
36 public function setQuery($query, $baseDn)
37 {
38 $this->query = $query;
39 $this->baseDn = $baseDn;
40
41 $this->message = "No LDAP query results for filter: [{$query}] in: [{$baseDn}]";
42
43 return $this;
44 }
45}