CoreFiles by mySites.guru
DeserializationException.php52 lines, 1,502 bytes, from Joomla_4.3.3-Stable-Full_Package.zip
Raw History Compare with 4.3.2
md5
077598862e54ccac501505299e0196e0
sha1
b3d67ac385b1c2175cdf81b0102af1dcc392c872
sha256
7936705c359d7ef493141926632e56859241dc4f2c71a47921c18ae5acebc966
<?php

/**
 * @see       https://github.com/laminas/laminas-diactoros for the canonical source repository
 * @copyright https://github.com/laminas/laminas-diactoros/blob/master/COPYRIGHT.md
 * @license   https://github.com/laminas/laminas-diactoros/blob/master/LICENSE.md New BSD License
 */

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 131 releases, Joomla 4.0.0-beta to 4.4.14. See them all, or every version of this file.