src/Controller.php
public function set($key, $value = null)
    {
        if (is_string($key)) {
            return $this->registerVar($key, $value);
        }

        foreach ($key as $name => $value) {
            $this->registerVar($name, $value);
        }
        return $this;
    }
public function set($key, $value = null)
    {
        if (is_string($key)) {
            return $this->registerVar($key, $value);
        }

        foreach ($key as $name => $value) {
            $this->registerVar($name, $value);
        }
        return $this;
    }
public function set ( $ key , $ value = null ) { if ( is_string ( $ key ) ) { return $ this -> registerVar ( $ key , $ value ) ; } foreach ( $ key as $ name => $ value ) { $ this -> registerVar ( $ name , $ value ) ; } return $ this ; }
Sets a value to be used by render

The key argument can be an associative array with values to be set
or a string naming the passed value. If an array is given then the
value will be ignored.

Those values must be set in the request attributes so they can be used
latter by any other middle ware in the stack.

@param string|array $key
@param mixed        $value

@return Controller|$this|self|ControllerInterface
Sets a value to be used by render