1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
<?php
namespace Punic\Exception;
/**
* An exception raised when a function meets an argument of an unsupported type.
*/
class NotImplemented extends \Punic\Exception
{
protected $function;
/**
* Initializes the instance.
*
* @param string $function The function/method that's not implemented
* @param \Exception $previous The previous exception used for the exception chaining
*/
public function __construct($function, $previous = null)
{
$this->function = $function;
$message = "$function is not implemented";
parent::__construct($message, \Punic\Exception::NOT_IMPLEMENTED, $previous);
}
/**
* Retrieves the name of the not implemented function/method.
*
* @return string
*/
public function getFunction()
{
return $this->function;
}
}