PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 1.2.0
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v1.2.0
6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 3.6.66 All 195 releases
fluentform / framework / View / View.php

View.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 1.2.0, at framework/View/View.php

32 lines 571 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\Framework\View;
4
5 class View
6 {
7 protected $app = null;
8
9 public function __construct($app)
10 {
11 $this->app = $app;
12 }
13
14 public function make($path, $data = [])
15 {
16 $path = str_replace('.', DIRECTORY_SEPARATOR, $path);
17 $file = $this->app->viewPath($path).'.php';
18 if (file_exists($file)) {
19 ob_start();
20 extract($data);
21 include $file;
22 return ob_get_clean();
23 }
24
25 throw new \InvalidArgumentException("The view file [$file] doesn't exists!");
26 }
27
28 public function render($path, $data = [])
29 {
30 echo $this->make($path, $data);
31 }
32 }