public function render($nameOrModel, array $variables = [])
    {
        if (!$nameOrModel instanceof View\ViewModel) {
            $model = new View\ViewModel();
            $model->setVariables($variables);
            $model->setTemplate($nameOrModel);

            $nameOrModel = $model;
        }

        return $this
            ->resolver
            ->resolve($nameOrModel)
            ->render($nameOrModel->getVariables());
    }
public function render($nameOrModel, array $variables = [])
    {
        if (!$nameOrModel instanceof View\ViewModel) {
            $model = new View\ViewModel();
            $model->setVariables($variables);
            $model->setTemplate($nameOrModel);

            $nameOrModel = $model;
        }

        return $this
            ->resolver
            ->resolve($nameOrModel)
            ->render($nameOrModel->getVariables());
    }
{@inheritDoc}