CoreFiles by mySites.guru
DeserializationException.php46 lines, 1,209 bytes, from Joomla_5.4.2-Stable-Full_Package.zip
Raw History Compare with 5.4.1
md5
1f79fe3dcca3ad0f6d5e21e9e32cdf15
sha1
e9d32874b132bf4b05c64b924ddf0516fe5938fd
sha256
727c4e3a3c9ba8456cd85ee408c585a2465dfce484d1fd151fd267600ff863bf
<?php

declare(strict_types=1);

namespace Laminas\Diactoros\Exception;

use Throwable;
use UnexpectedValueException;

class DeserializationException extends UnexpectedValueException implements ExceptionInterface
{
    public static function forInvalidHeader(): self
    {
        throw new self('Invalid header detected');
    }

    public static function forInvalidHeaderContinuation(): self
    {
        throw new self('Invalid header continuation');
    }

    public static function forRequestFromArray(Throwable $previous): self
    {
        return new self('Cannot deserialize request', $previous->getCode(), $previous);
    }

    public static function forResponseFromArray(Throwable $previous): self
    {
        return new self('Cannot deserialize response', $previous->getCode(), $previous);
    }

    public static function forUnexpectedCarriageReturn(): self
    {
        throw new self('Unexpected carriage return detected');
    }

    public static function forUnexpectedEndOfHeaders(): self
    {
        throw new self('Unexpected end of headers');
    }

    public static function forUnexpectedLineFeed(): self
    {
        throw new self('Unexpected line feed detected');
    }
}

The same content is in 126 releases, Joomla 5.0.0-alpha1 to 6.1.0-alpha1. See them all, or every version of this file.