2013-06-03 10:14:46 -04:00
|
|
|
<?php
|
2026-03-26 12:46:27 -04:00
|
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
|
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
2013-06-03 10:14:46 -04:00
|
|
|
|
|
|
|
|
namespace Icinga\Exception;
|
|
|
|
|
|
2013-06-06 10:52:54 -04:00
|
|
|
/**
|
2015-04-07 04:48:37 -04:00
|
|
|
* Exception thrown if a mandatory parameter was not given
|
2013-06-06 10:52:54 -04:00
|
|
|
*/
|
2014-08-25 06:14:18 -04:00
|
|
|
class MissingParameterException extends IcingaException
|
2013-06-03 10:14:46 -04:00
|
|
|
{
|
2015-04-07 06:15:15 -04:00
|
|
|
/**
|
|
|
|
|
* Name of the missing parameter
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
|
|
|
|
protected $parameter;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the name of the missing parameter
|
|
|
|
|
*
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getParameter()
|
|
|
|
|
{
|
|
|
|
|
return $this->parameter;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the name of the missing parameter
|
|
|
|
|
*
|
|
|
|
|
* @param string $name
|
|
|
|
|
*
|
|
|
|
|
* @return $this
|
|
|
|
|
*/
|
|
|
|
|
public function setParameter($name)
|
|
|
|
|
{
|
|
|
|
|
$this->parameter = (string) $name;
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
2013-06-03 10:14:46 -04:00
|
|
|
}
|