mirror of
https://github.com/wiosna-dev/limesurvey-api-client.git
synced 2026-03-12 02:11:45 +01:00
38 lines
1.2 KiB
PHP
38 lines
1.2 KiB
PHP
<?php
|
|
|
|
/**
|
|
* (c) Meritoo.pl, http://www.meritoo.pl
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Meritoo\LimeSurvey\ApiClient\Exception;
|
|
|
|
use Exception;
|
|
use Meritoo\LimeSurvey\ApiClient\Result\Processor\ResultProcessor;
|
|
|
|
/**
|
|
* An exception used while class name used to create instance of one item of the result, with data fetched from the
|
|
* LimeSurvey's API, is unknown
|
|
*
|
|
* @author Krzysztof Niziol <krzysztof.niziol@meritoo.pl>
|
|
* @copyright Meritoo.pl
|
|
*/
|
|
class UnknownInstanceOfResultItem extends Exception
|
|
{
|
|
/**
|
|
* Class constructor
|
|
*
|
|
* @param string $method Name of called method while talking to the LimeSurvey's API. One of the MethodType class
|
|
* constants.
|
|
*/
|
|
public function __construct($method)
|
|
{
|
|
$template = 'Class name used to create instance of one item used by result the of \'%s\' LimeSurvey API\'s'
|
|
. ' method is unknown. Proper class is not mapped in %s::%s() method. Did you forget about this?';
|
|
|
|
$message = sprintf($template, $method, ResultProcessor::class, 'getItemClassName');
|
|
parent::__construct($message);
|
|
}
|
|
}
|