Файл: concrete5.7.5.6/concrete/vendor/punic/punic/code/Exception/InvalidDataFile.php
Строк: 49
<?php
namespace PunicException;
/**
* An exception raised when an data file has been hit.
*/
class InvalidDataFile extends PunicException
{
protected $identifier;
/**
* Initializes the instance.
*
* @param mixed $identifier The bad data file identifier
* @param Exception $previous The previous exception used for the exception chaining
*/
public function __construct($identifier, $previous = null)
{
$this->identifier = $identifier;
$type = gettype($identifier);
if ($type === 'string') {
$message = "'$identifier' is not a valid data file identifier";
} else {
$message = "A valid identifier should be a string, $type received";
}
parent::__construct($message, PunicException::INVALID_DATAFILE, $previous);
}
/**
* Retrieves the bad data file identifier.
*
* @return mixed
*/
public function getIdentifier()
{
return $this->identifier;
}
}