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
        }
    }
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
        }
    }
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 } }
A reference to the current template, sort of.  This enables your plugin macros to behave more like a class, and these are your properties.

@param object $twig  ``_self`` so we know who you are.
@param mixed  $key   What you want to either set or retrieve.  Pass ``null`` to remove them all.  Make it an array to set multiple values at once.
@param mixed  $value Of the **$key** if you are setting it.  Pass ``null`` to remove only this one.

@return mixed If you don't specify **$key** or **$value**, then all of the "properties" (an array) will be returned.  If you don't include a **$value**, then the **$key** will be returned if it exists.  Otherwise you get ``null``.

@example

```twig
{{ this(_self, 'key', 'value') }}
```
A reference to the current template sort of . This enables your plugin macros to behave more like a class and these are your properties .