]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/OMB/extlib/libomb/invalidparameterexception.php
Squashed commit of the following:
[quix0rs-gnu-social.git] / plugins / OMB / extlib / libomb / invalidparameterexception.php
1 <?php
2 /**
3  * This file is part of libomb
4  *
5  * PHP version 5
6  *
7  * LICENSE: This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Affero General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU Affero General Public License for more details.
16  *
17  * You should have received a copy of the GNU Affero General Public License
18  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19  *
20  * @package OMB
21  * @author  Adrian Lang <mail@adrianlang.de>
22  * @license http://www.gnu.org/licenses/agpl.html GNU AGPL 3.0
23  * @version 0.1a-20090828
24  * @link    http://adrianlang.de/libomb
25  */
26
27 /**
28  * Exception stating that a passed parameter is invalid
29  *
30  * This exception is raised when a parameter does not obey the OMB standard.
31  */
32 class OMB_InvalidParameterException extends Exception
33 {
34     /**
35      * Constructor
36      *
37      * Creates a new exception based on a parameter name, value, and object
38      * type.
39      *
40      * @param string $value     The wrong value passed
41      * @param string $type      The object type the parameter belongs to;
42      *                          Currently OMB uses profiles and notices
43      * @param string $parameter The name of the parameter the wrong value has
44      *                          been passed for
45      */
46     public function __construct($value, $type, $parameter)
47     {
48         parent::__construct("Invalid value ‘${value}’ for parameter " .
49                             "‘${parameter}’ in $type");
50     }
51 }
52 ?>