Phlyty\View\MustacheViewModel::bindHelper PHP Метод

bindHelper() публичный Метод

Allows using '$this' within the helper in order to access public properties and methods. Binds the helper to the public property given by $name.
public bindHelper ( string $name, callable $helper ) : MustacheViewModel
$name string
$helper callable
Результат MustacheViewModel
    public function bindHelper($name, callable $helper)
    {
        $helper = Closure::bind($helper, $this);
        $this->{$name} = $helper;
        return $this;
    }