Phlyty\View\MustacheViewModel::__construct PHP Method

__construct() public method

Receive and set the App instance as a protected property. If an Escaper instance is passed, it will be assigned; otherwise, an Escaper instance will be instantiated and assigned.
public __construct ( App $app, Zend\Escaper\Escaper $escaper = null )
$app Phlyty\App
$escaper Zend\Escaper\Escaper
    public function __construct(App $app, Escaper $escaper = null)
    {
        $this->app = $app;
        if (null === $escaper) {
            $escaper = new Escaper();
        }
        $this->escaper = $escaper;
    }