# fluentform/1.2.4/framework/View/View.php

Fluent Forms – Customizable Contact Forms, Survey, Quiz, &amp; Conversational Form Builder, version 1.2.4. 32 lines.

- Page: https://pluginprobe.com/plugins/fluentform/1.2.4/code/framework/View/View.php
- Raw: https://pluginprobe.com/plugins/fluentform/1.2.4/raw/framework/View/View.php
- Modified: 2017-12-29T16:40:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluentform/1.2.4/code/framework/View/View.php#L10-L20`.

```php
<?php

namespace FluentForm\Framework\View;

class View
{
	protected $app = null;

	public function __construct($app)
	{
		$this->app = $app;
	}

	public function make($path, $data = [])
	{
		$path = str_replace('.', DIRECTORY_SEPARATOR, $path);
		$file = $this->app->viewPath($path).'.php';
		if (file_exists($file)) {
			ob_start();
			extract($data);
			include $file;
			return ob_get_clean();
		}

		throw new \InvalidArgumentException("The view file [$file] doesn't exists!");
	}

	public function render($path, $data = [])
	{
		echo $this->make($path, $data);
	}
}
```
