UnknownFieldException.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
11 namespace wcmf\lib\persistence;
12 
13 /**
14  * UnknownFieldException signals an unknown field.
15  *
16  * @author ingo herwig <ingo@wemove.com>
17  */
18 class UnknownFieldException extends \Exception {
19 
20  private $field = '';
21 
22  /**
23  * Constructor
24  * @param $field The name of the field
25  * @param $message The error message
26  * @param $code The error code
27  * @param $previous The previous Exception
28  */
29  public function __construct($field, $message="", $code=0, \Exception $previous=null) {
30  parent::__construct($message, $code, $previous);
31  $this->field = $field;
32  }
33 
34  /**
35  * Get the name of the field
36  * @return String
37  */
38  public function getField() {
39  return $this->field;
40  }
41 }
42 ?>
Persistence layer related interfaces and classes.
Definition: namespaces.php:42
__construct($field, $message="", $code=0, \Exception $previous=null)
Constructor.
UnknownFieldException signals an unknown field.