GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
Arr.php
Go to the documentation of this file.
1 <?php
2 /**
3  * @license GPL-2.0-or-later
4  *
5  * Modified by gravityview on 13-January-2023 using Strauss.
6  * @see https://github.com/BrianHenryIE/strauss
7  */
8 
10 
11 use \GravityKit\GravityView\Foundation\ThirdParty\Illuminate\Support\Arr as IlluminateArr;
12 
13 /**
14  * We use Laravel's Arr class for all array helper methods. This is a wrapper as we may swap out the underlying class in the future, add or modify methods, etc.
15  *
16  * @since 1.0.0
17  *
18  * @see https://github.com/illuminate/support/blob/5.4/Arr.php
19  */
20 class Arr extends IlluminateArr {
21  /**
22  * {@inheritdoc}
23  *
24  * @since 1.0.0
25  */
26  public static function accessible( $value ) {
27  return parent::accessible( $value );
28  }
29 
30  /**
31  * {@inheritdoc}
32  *
33  * @since 1.0.0
34  */
35  public static function add( $array, $key, $value ) {
36  return parent::add( $array, $key, $value );
37  }
38 
39  /**
40  * {@inheritdoc}
41  *
42  * @since 1.0.0
43  */
44  public static function collapse( $array ) {
45  return parent::collapse( $array );
46  }
47 
48  /**
49  * {@inheritdoc}
50  *
51  * @since 1.0.0
52  */
53  public static function crossJoin( ...$arrays ) {
54  return parent::crossJoin( $arrays );
55  }
56 
57  /**
58  * {@inheritdoc}
59  *
60  * @since 1.0.0
61  */
62  public static function divide( $array ) {
63  return parent::divide( $array );
64  }
65 
66  /**
67  * {@inheritdoc}
68  *
69  * @since 1.0.0
70  */
71  public static function dot( $array, $prepend = '' ) {
72  return parent::dot( $array, $prepend );
73  }
74 
75  /**
76  * Convert a flattened "dot" notation array into an expanded array.
77  *
78  * @since 1.0.3
79  *
80  * @param iterable $array
81  *
82  * @return array
83  */
84  public static function undot( $array ) {
85  $results = [];
86 
87  foreach ( $array as $key => $value ) {
88  self::set( $results, $key, $value );
89  }
90 
91  return $results;
92  }
93 
94  /**
95  * {@inheritdoc}
96  *
97  * @since 1.0.0
98  */
99  public static function get( $array, $key, $default = null ) {
100  return parent::get( $array, $key, $default );
101  }
102 
103  /**
104  * {@inheritdoc}
105  *
106  * @since 1.0.0
107  */
108  public static function except( $array, $keys ) {
109  return parent::except( $array, $keys );
110  }
111 
112  /**
113  * {@inheritdoc}
114  *
115  * @since 1.0.0
116  */
117  public static function exists( $array, $key ) {
118  return parent::exists( $array, $key );
119  }
120 
121  /**
122  * {@inheritdoc}
123  *
124  * @since 1.0.0
125  */
126  public static function first( $array, callable $callback = null, $default = null ) {
127  return parent::first( $array, $callback, $default );
128  }
129 
130  /**
131  * {@inheritdoc}
132  *
133  * @since 1.0.0
134  */
135  public static function flatten( $array, $depth = INF ) {
136  return parent::flatten( $array, $depth );
137  }
138 
139  /**
140  * {@inheritdoc}
141  *
142  * @since 1.0.0
143  */
144  public static function forget( &$array, $keys ) {
145  return parent::forget( $array, $keys );
146  }
147 
148  /**
149  * {@inheritdoc}
150  *
151  * @since 1.0.0
152  */
153  public static function has( $array, $keys ) {
154  return parent::has( $array, $keys );
155  }
156 
157  /**
158  * {@inheritdoc}
159  *
160  * @since 1.0.0
161  */
162  public static function isAssoc( array $array ) {
163  return parent::isAssoc( $array );
164  }
165 
166  /**
167  * {@inheritdoc}
168  *
169  * @since 1.0.0
170  */
171  public static function last( $array, callable $callback = null, $default = null ) {
172  return parent::last( $array, $callback, $default );
173  }
174 
175  /**
176  * {@inheritdoc}
177  *
178  * @since 1.0.0
179  */
180  public static function only( $array, $keys ) {
181  return parent::only( $array, $keys );
182  }
183 
184  /**
185  * {@inheritdoc}
186  *
187  * @since 1.0.0
188  */
189  public static function pluck( $array, $value, $key = null ) {
190  return parent::pluck( $array, $value, $key );
191  }
192 
193  /**
194  * {@inheritdoc}
195  *
196  * @since 1.0.0
197  */
198  public static function prepend( $array, $value, $key = null ) {
199  return parent::prepend( $array, $value, $key );
200  }
201 
202  /**
203  * {@inheritdoc}
204  *
205  * @since 1.0.0
206  */
207  public static function pull( &$array, $key, $default = null ) {
208  return parent::pull( $array, $key, $default );
209  }
210 
211  /**
212  * {@inheritdoc}
213  *
214  * @since 1.0.0
215  */
216  public static function random( $array, $number = null ) {
217  return parent::random( $array, $number );
218  }
219 
220  /**
221  * {@inheritdoc}
222  *
223  * @since 1.0.0
224  */
225  public static function set( &$array, $key, $value ) {
226  return parent::set( $array, $key, $value );
227  }
228 
229  /**
230  * {@inheritdoc}
231  *
232  * @since 1.0.0
233  */
234  public static function shuffle( $array ) {
235  return parent::shuffle( $array );
236  }
237 
238  /**
239  * {@inheritdoc}
240  *
241  * @since 1.0.0
242  */
243  public static function sort( $array, $callback ) {
244  return parent::sort( $array, $callback );
245  }
246 
247  /**
248  * {@inheritdoc}
249  *
250  * @since 1.0.0
251  */
252  public static function sortRecursive( $array ) {
253  return parent::sortRecursive( $array );
254  }
255 
256  /**
257  * {@inheritdoc}
258  *
259  * @since 1.0.0
260  */
261  public static function where( $array, callable $callback ) {
262  return parent::where( $array, $callback );
263  }
264 
265  /**
266  * {@inheritdoc}
267  *
268  * @since 1.0.0
269  */
270  public static function wrap( $value ) {
271  return parent::wrap( $value );
272  }
273 }
static except( $array, $keys)
{}
Definition: Arr.php:108
static undot( $array)
Convert a flattened "dot" notation array into an expanded array.
Definition: Arr.php:84
static prepend( $array, $value, $key=null)
{}
Definition: Arr.php:198
static exists( $array, $key)
{}
Definition: Arr.php:117
static forget(&$array, $keys)
{}
Definition: Arr.php:144
static pluck( $array, $value, $key=null)
{}
Definition: Arr.php:189
static crossJoin(... $arrays)
{}
Definition: Arr.php:53
static first( $array, callable $callback=null, $default=null)
{}
Definition: Arr.php:126
static where( $array, callable $callback)
{}
Definition: Arr.php:261
static pull(&$array, $key, $default=null)
{}
Definition: Arr.php:207
static has( $array, $keys)
{}
Definition: Arr.php:153
static flatten( $array, $depth=INF)
{}
Definition: Arr.php:135
static dot( $array, $prepend='')
{}
Definition: Arr.php:71
static isAssoc(array $array)
{}
Definition: Arr.php:162
static random( $array, $number=null)
{}
Definition: Arr.php:216
We use Laravel&#39;s Arr class for all array helper methods.
Definition: Arr.php:20
static add( $array, $key, $value)
{}
Definition: Arr.php:35
static last( $array, callable $callback=null, $default=null)
{}
Definition: Arr.php:171
static sort( $array, $callback)
{}
Definition: Arr.php:243
static only( $array, $keys)
{}
Definition: Arr.php:180