blob: 393561052a2e84517f91d1785d6a55223633ec27 [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 ModelDoesNotExistException.
9 *
10 * Thrown when a model being saved / updated does not actually exist.
11 */
12class ModelDoesNotExistException extends AdldapException
13{
14 /**
15 * The class name of the model that does not exist.
16 *
17 * @var string
18 */
19 protected $model;
20
21 /**
22 * Sets the model that does not exist.
23 *
24 * @param string $model
25 *
26 * @return ModelDoesNotExistException
27 */
28 public function setModel($model)
29 {
30 $this->model = $model;
31
32 $this->message = "Model [{$model}] does not exist.";
33
34 return $this;
35 }
36}