PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.14
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.14
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 / app / Compat / ArrayHelper.php

ArrayHelper.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.14, at app/Compat/ArrayHelper.php

36 lines 671 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\Helpers;
4
5 use FluentForm\Framework\Support\Arr;
6 use FluentForm\Framework\Support\Helper;
7
8 class ArrayHelper extends Arr
9 {
10 /**
11 * Return the default value of the given value.
12 *
13 * @param mixed $value
14 * @return mixed
15 */
16 public static function value($value)
17 {
18 return Helper::value($value);
19 }
20
21 public static function isTrue($array, $key)
22 {
23 $value = static::get($array, $key);
24
25 if (is_bool($value)) {
26 return $value;
27 }
28
29 if ('false' == $value || '0' == $value || !$value) {
30 return false;
31 }
32
33 return true;
34 }
35 }
36