|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Lagdo\Symfony\Facades; |
|
4
|
|
|
|
|
5
|
|
|
use Twig\Extension\ExtensionInterface; |
|
6
|
|
|
use Twig\Loader\LoaderInterface; |
|
7
|
|
|
use Twig\NodeVisitor\NodeVisitorInterface; |
|
8
|
|
|
use Twig\RuntimeLoader\RuntimeLoaderInterface; |
|
9
|
|
|
use Twig\TokenParser\TokenParserInterface; |
|
10
|
|
|
use Twig\Cache\CacheInterface; |
|
11
|
|
|
use Twig\TemplateWrapper; |
|
12
|
|
|
use Twig\Template; |
|
13
|
|
|
use Twig\TwigFilter; |
|
14
|
|
|
use Twig\TwigTest; |
|
15
|
|
|
use Twig\TwigFunction; |
|
16
|
|
|
use Twig\Environment; |
|
17
|
|
|
use Lagdo\Symfony\Facades\AbstractFacade; |
|
18
|
|
|
|
|
19
|
|
|
/** |
|
20
|
|
|
* @method static void enableDebug() |
|
21
|
|
|
* @method static void disableDebug() |
|
22
|
|
|
* @method static bool isDebug() |
|
23
|
|
|
* @method static void enableAutoReload() |
|
24
|
|
|
* @method static void disableAutoReload() |
|
25
|
|
|
* @method static bool isAutoReload() |
|
26
|
|
|
* @method static void enableStrictVariables() |
|
27
|
|
|
* @method static bool isStrictVariables() |
|
28
|
|
|
* @method static CacheInterface|string|false getCache(bool $original = true) |
|
29
|
|
|
* @method static void setCache(CacheInterface|string|false $cache) |
|
30
|
|
|
* @method static string render(string|TemplateWrapper $name, array $context = []) |
|
31
|
|
|
* @method static string display(string|TemplateWrapper $name, array $context = []) |
|
32
|
|
|
* @method static TemplateWrapper load(string|TemplateWrapper $name) |
|
33
|
|
|
* @method static TemplateWrapper createTemplate(string $template, string $name = null) |
|
34
|
|
|
* @method static bool isTemplateFresh(string $name, int $time) |
|
35
|
|
|
* @method static TemplateWrapper|Template resolveTemplate(string|TemplateWrapper|array $names) |
|
36
|
|
|
* @method static void setLoader(LoaderInterface $loader) |
|
37
|
|
|
* @method static LoaderInterface getLoader() |
|
38
|
|
|
* @method static void addRuntimeLoader(RuntimeLoaderInterface $loader) |
|
39
|
|
|
* @method static object getRuntime(string $class) |
|
40
|
|
|
* @method static void setCharset(string $charset) |
|
41
|
|
|
* @method static string getCharset() |
|
42
|
|
|
* @method static bool hasExtension(string $class) |
|
43
|
|
|
* @method static ExtensionInterface getExtension(string $class) |
|
44
|
|
|
* @method static void addExtension(ExtensionInterface $extension) |
|
45
|
|
|
* @method static void setExtensions(array $extensions) |
|
46
|
|
|
* @method static ExtensionInterface[] getExtensions() |
|
47
|
|
|
* @method static TokenParserInterface[] getTags() |
|
48
|
|
|
* @method static void addNodeVisitor(NodeVisitorInterface $visitor) |
|
49
|
|
|
* @method static void addFilter(TwigFilter $filter) |
|
50
|
|
|
* @method static void registerUndefinedFilterCallback(callable $callable) |
|
51
|
|
|
* @method static void addTest(TwigTest $test) |
|
52
|
|
|
* @method static void addFunction(TwigFunction $function) |
|
53
|
|
|
* @method static void registerUndefinedFunctionCallback(callable $callable) |
|
54
|
|
|
* @method static void addGlobal(string $name, mixed $value) |
|
55
|
|
|
* @method static array mergeGlobals(array $context) |
|
56
|
|
|
*/ |
|
57
|
|
|
final class View extends AbstractFacade |
|
58
|
|
|
{ |
|
59
|
|
|
use ServiceInstance; |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* @inheritdoc |
|
63
|
|
|
*/ |
|
64
|
|
|
protected static function getServiceIdentifier(): string |
|
65
|
|
|
{ |
|
66
|
|
|
return Environment::class; |
|
67
|
|
|
} |
|
68
|
|
|
} |
|
69
|
|
|
|