4 * @see https://github.com/laminas/laminas-diactoros for the canonical source repository
5 * @copyright https://github.com/laminas/laminas-diactoros/blob/master/COPYRIGHT.md
6 * @license https://github.com/laminas/laminas-diactoros/blob/master/LICENSE.md New BSD License
9 declare(strict_types=1);
11 namespace Laminas\Diactoros\Exception;
15 class UnwritableStreamException extends RuntimeException implements ExceptionInterface
17 public static function dueToConfiguration() : self
19 return new self('Stream is not writable');
22 public static function dueToMissingResource() : self
24 return new self('No resource available; cannot write');
27 public static function dueToPhpError() : self
29 return new self('Error writing to stream');
32 public static function forCallbackStream() : self
34 return new self('Callback streams cannot write');