PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.12
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.12
6.2.14 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 All 196 releases
fluentform / vendor / wpfluent / framework / src / WPFluent / Http / Group.php

Group.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.12, at vendor/wpfluent/framework/src/WPFluent/Http/Group.php

38 lines 608 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\Http;
4
5 class Group
6 {
7 protected $router = null;
8 protected $callback = null;
9 protected $executed = false;
10
11 public function __construct($router, $callback)
12 {
13 $this->router = $router;
14 $this->callback = $callback;
15 $this->router->trackGroup($this);
16 }
17
18 public function __call($method, $params)
19 {
20 $this->router->{$method}(...$params);
21
22 return $this;
23 }
24
25 public function execute()
26 {
27 if (!$this->executed) {
28 $this->executed = true;
29 $this->router->executeGroupCallback($this->callback);
30 }
31 }
32
33 public function __destruct()
34 {
35 $this->execute();
36 }
37 }
38