CoreFiles by mySites.guru
DeserializationException.php51 lines, 1,503 bytes, from Joomla_4.0.0-alpha10-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha9
md5
7e34255f01503cdc5f54efd10a0a991f
sha1
188b46554adb9e55847d7b2d891a8acfb46ff863
sha256
44f38ec3e6e502757ff07302f2d4ad9f12be16e682251a287c7c963f02661bb3
<?php
/**
 * @see       https://github.com/zendframework/zend-diactoros for the canonical source repository
 * @copyright Copyright (c) 2018 Zend Technologies USA Inc. (https://www.zend.com)
 * @license   https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License
 */

declare(strict_types=1);

namespace Zend\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 3 releases, Joomla 4.0.0-alpha10 to 4.0.0-alpha12. See them all, or every version of this file.