Files
moodle/lib/mlbackend/php/phpml/src/Phpml/Exception/SerializeException.php
T
David Monllao 589d7e8eb6 MDL-58859 mlbackend_php: Upgrade php-ml to latest version
Part of MDL-57791 epic.
2017-07-24 07:53:20 +02:00

29 lines
593 B
PHP

<?php
declare(strict_types=1);
namespace Phpml\Exception;
class SerializeException extends \Exception
{
/**
* @param string $filepath
*
* @return SerializeException
*/
public static function cantUnserialize(string $filepath)
{
return new self(sprintf('"%s" can not be unserialized.', $filepath));
}
/**
* @param string $classname
*
* @return SerializeException
*/
public static function cantSerialize(string $classname)
{
return new self(sprintf('Class "%s" can not be serialized.', $classname));
}
}