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,30 +0,0 @@
1
-<?php
2
-
3
-namespace Illuminate\View\Compilers\Concerns;
4
-
5
-trait CompilesJson
6
-{
7
-    /**
8
-     * The default JSON encoding options.
9
-     *
10
-     * @var int
11
-     */
12
-    private $encodingOptions = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT;
13
-
14
-    /**
15
-     * Compile the JSON statement into valid PHP.
16
-     *
17
-     * @param  string  $expression
18
-     * @return string
19
-     */
20
-    protected function compileJson($expression)
21
-    {
22
-        $parts = explode(',', $this->stripParentheses($expression));
23
-
24
-        $options = isset($parts[1]) ? trim($parts[1]) : $this->encodingOptions;
25
-
26
-        $depth = isset($parts[2]) ? trim($parts[2]) : 512;
27
-
28
-        return "<?php echo json_encode($parts[0], $options, $depth) ?>";
29
-    }
30
-}
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,30 @@
1
+<?php
2
+
3
+namespace Illuminate\View\Compilers\Concerns;
4
+
5
+trait CompilesJson
6
+{
7
+    /**
8
+     * The default JSON encoding options.
9
+     *
10
+     * @var int
11
+     */
12
+    private $encodingOptions = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT;
13
+
14
+    /**
15
+     * Compile the JSON statement into valid PHP.
16
+     *
17
+     * @param  string  $expression
18
+     * @return string
19
+     */
20
+    protected function compileJson($expression)
21
+    {
22
+        $parts = explode(',', $this->stripParentheses($expression));
23
+
24
+        $options = isset($parts[1]) ? trim($parts[1]) : $this->encodingOptions;
25
+
26
+        $depth = isset($parts[2]) ? trim($parts[2]) : 512;
27
+
28
+        return "<?php echo json_encode($parts[0], $options, $depth) ?>";
29
+    }
30
+}