CoreFiles by mySites.guru
DeserializationException.php46 lines, 1,221 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
6b9bc9209a2bf55803de1bc32006162b
sha1
2f48f0c2d8bdc5289bcb593828ca7fb9f2c25588
sha256
92fed1802cda87f1f2fdb0d0e363462b12e9f465ed454fb5f9917d611517d9f7
<?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', (int) $previous->getCode(), $previous);
    }

    public static function forResponseFromArray(Throwable $previous): self
    {
        return new self('Cannot deserialize response', (int) $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 32 releases, Joomla 6.1.0-alpha2 to 6.3.0-alpha1. See them all, or every version of this file.