Commits

Arie W. Subagja committed 4b25ce4

add isset and unset to temporary

  • Participants
  • Parent commits 58ea4e7

Comments (0)

Files changed (1)

File classes/malam/twig/temporary.php

         }
     }
 
+    public function delete($key)
+    {
+        if (isset($this->$key))
+        {
+            unset($this->temporary[$key]);
+        }
+    }
+
+    public function __isset($key)
+    {
+        return isset($this->temporary[$key]);
+    }
+
+    public function __unset($key)
+    {
+        $this->delete($key);
+    }
+
     public function as_array()
     {
         return $this->temporary;