Google\Cloud\Dev\Snippet\Parser\Snippet::addLocal PHP Method

addLocal() public method

Add a local variable to make available in the snippet execution scope.
public addLocal ( string $name, mixed $value ) : void
$name string The variable name
$value mixed The variable value
return void
    public function addLocal($name, $value)
    {
        $this->locals[$name] = $value;
    }