Vous êtes connecté en tant que anonymous Se Deconnecter
Browse code

Application modulaire fonctionnelle !

Emmanuel ROY authored on 12/08/2019 15:10:25
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,247 +0,0 @@
1
-<?php declare(strict_types=1);
2
-/**
3
- * Part of Windwalker project.
4
- *
5
- * @copyright  Copyright (C) 2019 LYRASOFT.
6
- * @license    GNU General Public License version 2 or later;
7
- */
8
-
9
-namespace Windwalker\Renderer\Edge;
10
-
11
-use Windwalker\Edge\Extension\EdgeExtensionInterface;
12
-
13
-/**
14
- * The GlobalContainer class.
15
- *
16
- * @since  3.0
17
- */
18
-abstract class GlobalContainer
19
-{
20
-    /**
21
-     * Property extensions.
22
-     *
23
-     * @var  EdgeExtensionInterface[]
24
-     */
25
-    protected static $extensions = [];
26
-
27
-    /**
28
-     * Property compilers.
29
-     *
30
-     * @var  array
31
-     */
32
-    protected static $globals = [];
33
-
34
-    /**
35
-     * Array of opening and closing tags for raw echos.
36
-     *
37
-     * @var array
38
-     */
39
-    protected static $rawTags = [];
40
-
41
-    /**
42
-     * Array of opening and closing tags for regular echos.
43
-     *
44
-     * @var array
45
-     */
46
-    protected static $contentTags = [];
47
-
48
-    /**
49
-     * Array of opening and closing tags for escaped echos.
50
-     *
51
-     * @var array
52
-     */
53
-    protected static $escapedTags = [];
54
-
55
-    /**
56
-     * addExtension
57
-     *
58
-     * @param EdgeExtensionInterface $extension
59
-     * @param string                 $name
60
-     *
61
-     * @return  void
62
-     */
63
-    public static function addExtension(EdgeExtensionInterface $extension, $name = null)
64
-    {
65
-        static::$extensions[$name ?: $extension->getName()] = $extension;
66
-    }
67
-
68
-    /**
69
-     * getExtension
70
-     *
71
-     * @param   string $name
72
-     *
73
-     * @return  \Twig_ExtensionInterface
74
-     */
75
-    public static function getExtension($name)
76
-    {
77
-        if (!empty(static::$extensions[$name])) {
78
-            return static::$extensions[$name];
79
-        }
80
-
81
-        return null;
82
-    }
83
-
84
-    /**
85
-     * removeExtension
86
-     *
87
-     * @param string $name
88
-     *
89
-     * @return  void
90
-     */
91
-    public static function removeExtension($name)
92
-    {
93
-        if (isset(static::$extensions[$name])) {
94
-            unset(static::$extensions[$name]);
95
-        }
96
-    }
97
-
98
-    /**
99
-     * Method to get property Extensions
100
-     *
101
-     * @return  EdgeExtensionInterface[]
102
-     */
103
-    public static function getExtensions()
104
-    {
105
-        return static::$extensions;
106
-    }
107
-
108
-    /**
109
-     * Method to set property extensions
110
-     *
111
-     * @param   EdgeExtensionInterface[] $extensions
112
-     *
113
-     * @return  void
114
-     */
115
-    public static function setExtensions(array $extensions)
116
-    {
117
-        static::$extensions = $extensions;
118
-    }
119
-
120
-    /**
121
-     * setGlobal
122
-     *
123
-     * @param string $name
124
-     * @param mixed  $value
125
-     *
126
-     * @return  void
127
-     */
128
-    public static function addGlobal($name, $value)
129
-    {
130
-        static::$globals[$name] = $value;
131
-    }
132
-
133
-    /**
134
-     * getGlobal
135
-     *
136
-     * @param string $name
137
-     *
138
-     * @return  mixed
139
-     */
140
-    public static function getGlobal($name)
141
-    {
142
-        if (array_key_exists($name, static::$globals)) {
143
-            return static::$globals[$name];
144
-        }
145
-
146
-        return null;
147
-    }
148
-
149
-    /**
150
-     * removeGlobal
151
-     *
152
-     * @param   string $name
153
-     *
154
-     * @return  void
155
-     */
156
-    public static function removeGlobal($name)
157
-    {
158
-        if (isset(static::$globals[$name])) {
159
-            unset(static::$globals[$name]);
160
-        }
161
-    }
162
-
163
-    /**
164
-     * Method to get property Globals
165
-     *
166
-     * @return  array
167
-     */
168
-    public static function getGlobals()
169
-    {
170
-        return static::$globals;
171
-    }
172
-
173
-    /**
174
-     * Method to set property globals
175
-     *
176
-     * @param   array $globals
177
-     *
178
-     * @return  void
179
-     */
180
-    public static function setGlobals(array $globals)
181
-    {
182
-        static::$globals = $globals;
183
-    }
184
-
185
-    /**
186
-     * Method to get property RawTags
187
-     *
188
-     * @return  array
189
-     */
190
-    public static function getRawTags()
191
-    {
192
-        return static::$rawTags;
193
-    }
194
-
195
-    /**
196
-     * Method to set property rawTags
197
-     *
198
-     * @param string $start
199
-     * @param string $end
200
-     */
201
-    public static function setRawTags($start, $end)
202
-    {
203
-        static::$rawTags = [$start, $end];
204
-    }
205
-
206
-    /**
207
-     * Method to get property ContentTags
208
-     *
209
-     * @return  array
210
-     */
211
-    public static function getContentTags()
212
-    {
213
-        return static::$contentTags;
214
-    }
215
-
216
-    /**
217
-     * Method to set property contentTags
218
-     *
219
-     * @param string $start
220
-     * @param string $end
221
-     */
222
-    public static function setContentTags($start, $end)
223
-    {
224
-        static::$contentTags = [$start, $end];
225
-    }
226
-
227
-    /**
228
-     * Method to get property EscapedTags
229
-     *
230
-     * @return  array
231
-     */
232
-    public static function getEscapedTags()
233
-    {
234
-        return static::$escapedTags;
235
-    }
236
-
237
-    /**
238
-     * Method to set property escapedTags
239
-     *
240
-     * @param string $start
241
-     * @param string $end
242
-     */
243
-    public static function setEscapedTags($start, $end)
244
-    {
245
-        static::$escapedTags = [$start, $end];
246
-    }
247
-}
Browse code

initial commit

Emmanuel ROY authored on 09/08/2019 08:39:02
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,247 @@
1
+<?php declare(strict_types=1);
2
+/**
3
+ * Part of Windwalker project.
4
+ *
5
+ * @copyright  Copyright (C) 2019 LYRASOFT.
6
+ * @license    GNU General Public License version 2 or later;
7
+ */
8
+
9
+namespace Windwalker\Renderer\Edge;
10
+
11
+use Windwalker\Edge\Extension\EdgeExtensionInterface;
12
+
13
+/**
14
+ * The GlobalContainer class.
15
+ *
16
+ * @since  3.0
17
+ */
18
+abstract class GlobalContainer
19
+{
20
+    /**
21
+     * Property extensions.
22
+     *
23
+     * @var  EdgeExtensionInterface[]
24
+     */
25
+    protected static $extensions = [];
26
+
27
+    /**
28
+     * Property compilers.
29
+     *
30
+     * @var  array
31
+     */
32
+    protected static $globals = [];
33
+
34
+    /**
35
+     * Array of opening and closing tags for raw echos.
36
+     *
37
+     * @var array
38
+     */
39
+    protected static $rawTags = [];
40
+
41
+    /**
42
+     * Array of opening and closing tags for regular echos.
43
+     *
44
+     * @var array
45
+     */
46
+    protected static $contentTags = [];
47
+
48
+    /**
49
+     * Array of opening and closing tags for escaped echos.
50
+     *
51
+     * @var array
52
+     */
53
+    protected static $escapedTags = [];
54
+
55
+    /**
56
+     * addExtension
57
+     *
58
+     * @param EdgeExtensionInterface $extension
59
+     * @param string                 $name
60
+     *
61
+     * @return  void
62
+     */
63
+    public static function addExtension(EdgeExtensionInterface $extension, $name = null)
64
+    {
65
+        static::$extensions[$name ?: $extension->getName()] = $extension;
66
+    }
67
+
68
+    /**
69
+     * getExtension
70
+     *
71
+     * @param   string $name
72
+     *
73
+     * @return  \Twig_ExtensionInterface
74
+     */
75
+    public static function getExtension($name)
76
+    {
77
+        if (!empty(static::$extensions[$name])) {
78
+            return static::$extensions[$name];
79
+        }
80
+
81
+        return null;
82
+    }
83
+
84
+    /**
85
+     * removeExtension
86
+     *
87
+     * @param string $name
88
+     *
89
+     * @return  void
90
+     */
91
+    public static function removeExtension($name)
92
+    {
93
+        if (isset(static::$extensions[$name])) {
94
+            unset(static::$extensions[$name]);
95
+        }
96
+    }
97
+
98
+    /**
99
+     * Method to get property Extensions
100
+     *
101
+     * @return  EdgeExtensionInterface[]
102
+     */
103
+    public static function getExtensions()
104
+    {
105
+        return static::$extensions;
106
+    }
107
+
108
+    /**
109
+     * Method to set property extensions
110
+     *
111
+     * @param   EdgeExtensionInterface[] $extensions
112
+     *
113
+     * @return  void
114
+     */
115
+    public static function setExtensions(array $extensions)
116
+    {
117
+        static::$extensions = $extensions;
118
+    }
119
+
120
+    /**
121
+     * setGlobal
122
+     *
123
+     * @param string $name
124
+     * @param mixed  $value
125
+     *
126
+     * @return  void
127
+     */
128
+    public static function addGlobal($name, $value)
129
+    {
130
+        static::$globals[$name] = $value;
131
+    }
132
+
133
+    /**
134
+     * getGlobal
135
+     *
136
+     * @param string $name
137
+     *
138
+     * @return  mixed
139
+     */
140
+    public static function getGlobal($name)
141
+    {
142
+        if (array_key_exists($name, static::$globals)) {
143
+            return static::$globals[$name];
144
+        }
145
+
146
+        return null;
147
+    }
148
+
149
+    /**
150
+     * removeGlobal
151
+     *
152
+     * @param   string $name
153
+     *
154
+     * @return  void
155
+     */
156
+    public static function removeGlobal($name)
157
+    {
158
+        if (isset(static::$globals[$name])) {
159
+            unset(static::$globals[$name]);
160
+        }
161
+    }
162
+
163
+    /**
164
+     * Method to get property Globals
165
+     *
166
+     * @return  array
167
+     */
168
+    public static function getGlobals()
169
+    {
170
+        return static::$globals;
171
+    }
172
+
173
+    /**
174
+     * Method to set property globals
175
+     *
176
+     * @param   array $globals
177
+     *
178
+     * @return  void
179
+     */
180
+    public static function setGlobals(array $globals)
181
+    {
182
+        static::$globals = $globals;
183
+    }
184
+
185
+    /**
186
+     * Method to get property RawTags
187
+     *
188
+     * @return  array
189
+     */
190
+    public static function getRawTags()
191
+    {
192
+        return static::$rawTags;
193
+    }
194
+
195
+    /**
196
+     * Method to set property rawTags
197
+     *
198
+     * @param string $start
199
+     * @param string $end
200
+     */
201
+    public static function setRawTags($start, $end)
202
+    {
203
+        static::$rawTags = [$start, $end];
204
+    }
205
+
206
+    /**
207
+     * Method to get property ContentTags
208
+     *
209
+     * @return  array
210
+     */
211
+    public static function getContentTags()
212
+    {
213
+        return static::$contentTags;
214
+    }
215
+
216
+    /**
217
+     * Method to set property contentTags
218
+     *
219
+     * @param string $start
220
+     * @param string $end
221
+     */
222
+    public static function setContentTags($start, $end)
223
+    {
224
+        static::$contentTags = [$start, $end];
225
+    }
226
+
227
+    /**
228
+     * Method to get property EscapedTags
229
+     *
230
+     * @return  array
231
+     */
232
+    public static function getEscapedTags()
233
+    {
234
+        return static::$escapedTags;
235
+    }
236
+
237
+    /**
238
+     * Method to set property escapedTags
239
+     *
240
+     * @param string $start
241
+     * @param string $end
242
+     */
243
+    public static function setEscapedTags($start, $end)
244
+    {
245
+        static::$escapedTags = [$start, $end];
246
+    }
247
+}