public function condition($name, callable $callback)
    {
        $this->conditions[$name] = $callback;

        // If
        $this->directive($name, function($expr) use ($name) {
            return $expr ? '<?php if ($__parser->check(\'' . $name . '\', $expr)): ?>'
                : '<?php if ($__parser->check(\'' . $name . '\')): ?>';
        });

        // elseif
        $this->directive('else' . $name, function($expr) use ($name) {
            return $expr ? '<?php elseif ($__parser->check(\'' . $name . '\', $expr)): ?>'
                : '<?php elseif ($__parser->check(\'' . $name . '\')): ?>';
        });

        // end
        $this->directive('end' . $name, function() {
            return '<?php endif; ?>';
        });
    }