PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.3.1
JetFormBuilder — Dynamic Blocks Form Builder v3.3.1
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / includes / blocks / conditional-block / operators.php
jetformbuilder / includes / blocks / conditional-block Last commit date
condition-types 2 years ago functions 2 years ago operators 2 years ago render-states 2 years ago rest-api 2 years ago condition-manager.php 2 years ago condition-response-object.php 2 years ago functions.php 2 years ago operators.php 2 years ago render-state.php 2 years ago render-states-collection.php 2 years ago
operators.php
90 lines
1 <?php
2
3
4 namespace Jet_Form_Builder\Blocks\Conditional_Block;
5
6 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Base_Operator;
7 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Between;
8 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Contain;
9 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Empty;
10 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Equal;
11 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Greater_Or_Equal;
12 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Less_Or_Equal;
13 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Not_Between;
14 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Not_Contain;
15 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Not_Empty;
16 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Not_Equal;
17 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Not_In_The_List;
18 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Render_State;
19 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Greater;
20 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_In_The_List;
21 use Jet_Form_Builder\Blocks\Conditional_Block\Operators\Operator_Less;
22 use Jet_Form_Builder\Classes\Arrayable\Array_Tools;
23 use Jet_Form_Builder\Classes\Arrayable\Arrayable;
24 use JFB_Components\Repository\Repository_Pattern_Trait;
25 use Jet_Form_Builder\Exceptions\Repository_Exception;
26
27 // If this file is called directly, abort.
28 if ( ! defined( 'WPINC' ) ) {
29 die;
30 }
31
32 class Operators implements Arrayable {
33
34 use Repository_Pattern_Trait;
35
36 public function __construct() {
37 $this->rep_install();
38 }
39
40 /**
41 * @return array
42 */
43 public function rep_instances(): array {
44 $operators = array(
45 new Operator_Equal(),
46 new Operator_Not_Equal(),
47 new Operator_Empty(),
48 new Operator_Not_Empty(),
49 new Operator_Greater(),
50 new Operator_Greater_Or_Equal(),
51 new Operator_Less(),
52 new Operator_Less_Or_Equal(),
53 new Operator_Between(),
54 new Operator_Not_Between(),
55 new Operator_In_The_List(),
56 new Operator_Not_In_The_List(),
57 new Operator_Contain(),
58 new Operator_Not_Contain(),
59 new Operator_Render_State(),
60 );
61
62 return apply_filters(
63 'jet-form-builder/conditional-block/operators',
64 $operators
65 );
66 }
67
68 /**
69 * @param string $slug
70 *
71 * @throws Repository_Exception
72 */
73 public function isset_operator( string $slug ) {
74 $this->rep_throw_if_undefined( $slug );
75 }
76
77 /**
78 * @param string $slug
79 *
80 * @return Base_Operator
81 */
82 public function get_operator( string $slug ): Base_Operator {
83 return $this->rep_get_item_or_die( $slug );
84 }
85
86 public function to_array(): array {
87 return Array_Tools::to_array( $this->rep_get_items() );
88 }
89 }
90