ci4
75 строк · 1.7 Кб
1<?php
2
3declare(strict_types=1);
4
5/**
6* This file is part of CodeIgniter 4 framework.
7*
8* (c) CodeIgniter Foundation <admin@codeigniter.com>
9*
10* For the full copyright and license information, please view
11* the LICENSE file that was distributed with this source code.
12*/
13
14namespace CodeIgniter\View\Exceptions;
15
16use CodeIgniter\Exceptions\FrameworkException;
17
18class ViewException extends FrameworkException
19{
20/**
21* @return static
22*/
23public static function forInvalidCellMethod(string $class, string $method)
24{
25return new static(lang('View.invalidCellMethod', ['class' => $class, 'method' => $method]));
26}
27
28/**
29* @return static
30*/
31public static function forMissingCellParameters(string $class, string $method)
32{
33return new static(lang('View.missingCellParameters', ['class' => $class, 'method' => $method]));
34}
35
36/**
37* @return static
38*/
39public static function forInvalidCellParameter(string $key)
40{
41return new static(lang('View.invalidCellParameter', [$key]));
42}
43
44/**
45* @return static
46*/
47public static function forNoCellClass()
48{
49return new static(lang('View.noCellClass'));
50}
51
52/**
53* @return static
54*/
55public static function forInvalidCellClass(?string $class = null)
56{
57return new static(lang('View.invalidCellClass', [$class]));
58}
59
60/**
61* @return static
62*/
63public static function forTagSyntaxError(string $output)
64{
65return new static(lang('View.tagSyntaxError', [$output]));
66}
67
68/**
69* @return static
70*/
71public static function forInvalidDecorator(string $className)
72{
73return new static(lang('View.invalidDecoratorClass', [$className]));
74}
75}
76