| Code Coverage
| Lines | Functions and Methods | Classes and Traits
Total |  | n/a | 0 / 0 |  | n/a | 0 / 0 | CRAP |  | n/a | 0 / 0
View |  | n/a | 0 / 0 |  | n/a | 0 / 0 | 0 |  | n/a | 0 / 0

1 | <?php
2 |
3 | namespace Config;
4 |
5 | use CodeIgniter\Config\View as BaseView;
6 | use CodeIgniter\View\ViewDecoratorInterface;
7 |
8 | /**
9 | * @phpstan-type parser_callable (callable(mixed): mixed)
10 | * @phpstan-type parser_callable_string (callable(mixed): mixed)&string
11 | */
12 | class View extends BaseView
13 | {
14 | /**
15 | * When false, the view method will clear the data between each
16 | * call. This keeps your data safe and ensures there is no accidental
17 | * leaking between calls, so you would need to explicitly pass the data
18 | * to each view. You might prefer to have the data stick around between
19 | * calls so that it is available to all views. If that is the case,
20 | * set $saveData to true.
21 | *
22 | * @var bool
23 | */
24 | public $saveData = true;
25 |
26 | /**
27 | * Parser Filters map a filter name with any PHP callable. When the
28 | * Parser prepares a variable for display, it will chain it
29 | * through the filters in the order defined, inserting any parameters.
30 | * To prevent potential abuse, all filters MUST be defined here
31 | * in order for them to be available for use within the Parser.
32 | *
33 | * Examples:
34 | * { title|esc(js) }
35 | * { created_on|date(Y-m-d)|esc(attr) }
36 | *
37 | * @var array<string, string>
38 | * @phpstan-var array<string, parser_callable_string>
39 | */
40 | public $filters = [];
41 |
42 | /**
43 | * Parser Plugins provide a way to extend the functionality provided
44 | * by the core Parser by creating aliases that will be replaced with
45 | * any callable. Can be single or tag pair.
46 | *
47 | * @var array<string, callable|list<string>|string>
48 | * @phpstan-var array<string, list<parser_callable_string>|parser_callable_string|parser_callable>
49 | */
50 | public $plugins = [];
51 |
52 | /**
53 | * View Decorators are class methods that will be run in sequence to
54 | * have a chance to alter the generated output just prior to caching
55 | * the results.
56 | *
57 | * All classes must implement CodeIgniter\View\ViewDecoratorInterface
58 | *
59 | * @var list<class-string<ViewDecoratorInterface>>
60 | */
61 | public array $decorators = [];
62 |
63 | /**
64 | * Subdirectory within app/Views for namespaced view overrides.
65 | *
66 | * Namespaced views will be searched in:
67 | *
68 | * app/Views/{$appOverridesFolder}/{Namespace}/{view_path}.{php|html...}
69 | *
70 | * This allows application-level overrides for package or module views
71 | * without modifying vendor source files.
72 | *
73 | * Examples:
74 | * 'overrides' -> app/Views/overrides/Example/Blog/post/card.php
75 | * 'vendor' -> app/Views/vendor/Example/Blog/post/card.php
76 | * '' -> app/Views/Example/Blog/post/card.php (direct mapping)
77 | */
78 | public string $appOverridesFolder = 'overrides';
79 | }