Capsule::putAll PHP Method

putAll() public method

Given an array like: array( 'myvar' => 'Hello', 'myvar2' => 'Hello') Resulting template will have access to $myvar and $myvar2.
public putAll ( array $vars, boolean $recursiveMerge = false ) : void
$vars array
$recursiveMerge boolean Should matching keys be recursively merged?
return void
    function putAll($vars, $recursiveMerge = false)
    {
        if ($recursiveMerge) {
            $this->vars = array_merge_recursive($this->vars, $vars);
        } else {
            $this->vars = array_merge($this->vars, $vars);
        }
    }