public function this(\Twig_Template $twig, $key = null, $value = null)
    {
        $name = $twig->getTemplateName();
        if (!isset($this->plugin[$name])) {
            $this->plugin[$name] = array();
        }
        if (func_num_args() == 1) {
            return $this->plugin[$name]; // return all values
        } elseif (is_null($key)) {
            $this->plugin[$name] = array(); // remove all values
        } elseif (is_array($key)) {
            $this->plugin[$name] = $key + $this->plugin[$name]; // set multiple values
        } elseif (func_num_args() == 3) {
            if (is_null($value)) {
                unset($this->plugin[$name][$key]); // remove a single value
            } else {
                $this->plugin[$name][$key] = $value; // set a single value
            }
        } elseif (isset($this->plugin[$name][$key])) {
            return $this->plugin[$name][$key]; // return a single value
        }
    }