CodeIgniter4/system/Exceptions/PageNotFoundException.php
Christoph Potas 8037f3e93c
~ apply ci style
Signed-off-by: Christoph Potas <christoph286@googlemail.com>
2018-08-20 10:18:50 +02:00

31 lines
708 B
PHP

<?php namespace CodeIgniter\Exceptions;
class PageNotFoundException extends \OutOfBoundsException implements ExceptionInterface
{
/**
* Error code
* @var int
*/
protected $code = 404;
public static function forPageNotFound($Message)
{
return new static($Message ?? lang('HTTP.pageNotFound'));
}
public static function forEmptyController()
{
return new static(lang('HTTP.emptyController'));
}
public static function forControllerNotFound(string $controller, string $method)
{
return new static(lang('HTTP.controllerNotFound', [$controller, $method]));
}
public static function forMethodNotFound(string $method)
{
return new static(lang('HTTP.methodNotFound', [$method]));
}
}