summaryrefslogtreecommitdiff
path: root/inc/lib/Twig/Node/Expression/Test/Null.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-08-05 06:03:40 -0400
committerczaks <marcin@6irc.net>2013-08-05 06:03:40 -0400
commita84c4510fccfdc0cfb6f187633daea10dc70f326 (patch)
tree6077f5211196ae40cac0184bb7cc67b81d320b0b /inc/lib/Twig/Node/Expression/Test/Null.php
parent33c7abf11f3a9b5c0964a2d7a25533c2849dbc78 (diff)
parenta8327c3a37fd22d2aa5d63061c9d3eaa30ae425a (diff)
Merge branch 'master' of github.com:vichan-devel/Tinyboard
Conflicts: js/post-hider.js
Diffstat (limited to 'inc/lib/Twig/Node/Expression/Test/Null.php')
-rw-r--r--inc/lib/Twig/Node/Expression/Test/Null.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/inc/lib/Twig/Node/Expression/Test/Null.php b/inc/lib/Twig/Node/Expression/Test/Null.php
new file mode 100644
index 00000000..1c83825a
--- /dev/null
+++ b/inc/lib/Twig/Node/Expression/Test/Null.php
@@ -0,0 +1,31 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2011 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Checks that a variable is null.
+ *
+ * <pre>
+ * {{ var is none }}
+ * </pre>
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Twig_Node_Expression_Test_Null extends Twig_Node_Expression_Test
+{
+ public function compile(Twig_Compiler $compiler)
+ {
+ $compiler
+ ->raw('(null === ')
+ ->subcompile($this->getNode('node'))
+ ->raw(')')
+ ;
+ }
+}