From 273d8936fd5cf0915c26cc41d9d00e98b2af4e9a Mon Sep 17 00:00:00 2001 From: Mouad ZIANI Date: Tue, 10 Mar 2020 11:34:20 +0100 Subject: [PATCH] Added @set directive to define a variable --- src/directives.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/directives.php b/src/directives.php index aff8178..a752e9f 100644 --- a/src/directives.php +++ b/src/directives.php @@ -392,5 +392,20 @@ 'endhaserror' => function () { return ''; }, + + /* + |--------------------------------------------------------------------- + | @set + |--------------------------------------------------------------------- + | + | This directive can be used to define a variable. + | Usage: @set(name, value) + | + */ + + 'set' => function ($expression) { + list($name, $val) = explode(',', $expression); + return ""; + }, ];