This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
/
Input.php
830 lines (679 loc) · 18.8 KB
/
Input.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
<?php
/*
* This file is part of Contao.
*
* (c) Leo Feyer
*
* @license LGPL-3.0-or-later
*/
namespace Contao;
/**
* Safely read the user input
*
* The class functions as an adapter for the global input arrays ($_GET, $_POST,
* $_COOKIE) and safely returns their values. To prevent XSS vulnerabilities,
* you should always use the class when reading user input.
*
* Usage:
*
* if (Input::get('action') == 'register')
* {
* $username = Input::post('username');
* $password = Input::post('password');
* }
*
* @author Leo Feyer <https://github.com/leofeyer>
*/
class Input
{
/**
* Object instance (Singleton)
* @var \Input
*/
protected static $objInstance;
/**
* Cache
* @var array
*/
protected static $arrCache = array();
/**
* Unused $_GET parameters
* @var array
*/
protected static $arrUnusedGet = array();
/**
* Magic quotes setting
* @var boolean
*/
protected static $blnMagicQuotes = false;
/**
* Clean the global GPC arrays
*/
public static function initialize()
{
$_GET = static::cleanKey($_GET);
$_POST = static::cleanKey($_POST);
$_COOKIE = static::cleanKey($_COOKIE);
}
/**
* Return a $_GET variable
*
* @param string $strKey The variable name
* @param boolean $blnDecodeEntities If true, all entities will be decoded
* @param boolean $blnKeepUnused If true, the parameter will not be marked as used (see #4277)
*
* @return mixed The cleaned variable value
*/
public static function get($strKey, $blnDecodeEntities=false, $blnKeepUnused=false)
{
if (!isset($_GET[$strKey]))
{
return null;
}
$strCacheKey = $blnDecodeEntities ? 'getDecoded' : 'getEncoded';
if (!isset(static::$arrCache[$strCacheKey][$strKey]))
{
$varValue = $_GET[$strKey];
$varValue = static::decodeEntities($varValue);
$varValue = static::xssClean($varValue, true);
$varValue = static::stripTags($varValue);
if (!$blnDecodeEntities)
{
$varValue = static::encodeSpecialChars($varValue);
}
$varValue = static::encodeInsertTags($varValue);
static::$arrCache[$strCacheKey][$strKey] = $varValue;
}
// Mark the parameter as used (see #4277)
if (!$blnKeepUnused)
{
unset(static::$arrUnusedGet[$strKey]);
}
return static::$arrCache[$strCacheKey][$strKey];
}
/**
* Return a $_POST variable
*
* @param string $strKey The variable name
* @param boolean $blnDecodeEntities If true, all entities will be decoded
*
* @return mixed The cleaned variable value
*/
public static function post($strKey, $blnDecodeEntities=false)
{
$strCacheKey = $blnDecodeEntities ? 'postDecoded' : 'postEncoded';
if (!isset(static::$arrCache[$strCacheKey][$strKey]))
{
$varValue = static::findPost($strKey);
if ($varValue === null)
{
return $varValue;
}
$varValue = static::decodeEntities($varValue);
$varValue = static::xssClean($varValue, true);
$varValue = static::stripTags($varValue);
if (!$blnDecodeEntities)
{
$varValue = static::encodeSpecialChars($varValue);
}
if (TL_MODE != 'BE')
{
$varValue = static::encodeInsertTags($varValue);
}
static::$arrCache[$strCacheKey][$strKey] = $varValue;
}
return static::$arrCache[$strCacheKey][$strKey];
}
/**
* Return a $_POST variable preserving allowed HTML tags
*
* @param string $strKey The variable name
* @param boolean $blnDecodeEntities If true, all entities will be decoded
*
* @return mixed The cleaned variable value
*/
public static function postHtml($strKey, $blnDecodeEntities=false)
{
$strCacheKey = $blnDecodeEntities ? 'postHtmlDecoded' : 'postHtmlEncoded';
if (!isset(static::$arrCache[$strCacheKey][$strKey]))
{
$varValue = static::findPost($strKey);
if ($varValue === null)
{
return $varValue;
}
$varValue = static::decodeEntities($varValue);
$varValue = static::xssClean($varValue);
$varValue = static::stripTags($varValue, \Config::get('allowedTags'));
if (!$blnDecodeEntities)
{
$varValue = static::encodeSpecialChars($varValue);
}
if (TL_MODE != 'BE')
{
$varValue = static::encodeInsertTags($varValue);
}
static::$arrCache[$strCacheKey][$strKey] = $varValue;
}
return static::$arrCache[$strCacheKey][$strKey];
}
/**
* Return a raw, unsafe $_POST variable
*
* @param string $strKey The variable name
*
* @return mixed The raw variable value
*/
public static function postRaw($strKey)
{
$strCacheKey = 'postRaw';
if (!isset(static::$arrCache[$strCacheKey][$strKey]))
{
$varValue = static::findPost($strKey);
if ($varValue === null)
{
return $varValue;
}
$varValue = static::preserveBasicEntities($varValue);
$varValue = static::xssClean($varValue);
if (TL_MODE != 'BE')
{
$varValue = static::encodeInsertTags($varValue);
}
static::$arrCache[$strCacheKey][$strKey] = $varValue;
}
return static::$arrCache[$strCacheKey][$strKey];
}
/**
* Return a raw, unsafe and unfiltered $_POST variable
*
* @param string $strKey The variable name
*
* @return mixed The raw variable value
*/
public static function postUnsafeRaw($strKey)
{
$strCacheKey = 'postUnsafeRaw';
if (!isset(static::$arrCache[$strCacheKey][$strKey]))
{
$varValue = static::findPost($strKey);
if ($varValue === null)
{
return $varValue;
}
static::$arrCache[$strCacheKey][$strKey] = $varValue;
}
return static::$arrCache[$strCacheKey][$strKey];
}
/**
* Return a $_COOKIE variable
*
* @param string $strKey The variable name
* @param boolean $blnDecodeEntities If true, all entities will be decoded
*
* @return mixed The cleaned variable value
*/
public static function cookie($strKey, $blnDecodeEntities=false)
{
if (!isset($_COOKIE[$strKey]))
{
return null;
}
$strCacheKey = $blnDecodeEntities ? 'cookieDecoded' : 'cookieEncoded';
if (!isset(static::$arrCache[$strCacheKey][$strKey]))
{
$varValue = $_COOKIE[$strKey];
$varValue = static::decodeEntities($varValue);
$varValue = static::xssClean($varValue, true);
$varValue = static::stripTags($varValue);
if (!$blnDecodeEntities)
{
$varValue = static::encodeSpecialChars($varValue);
}
$varValue = static::encodeInsertTags($varValue);
static::$arrCache[$strCacheKey][$strKey] = $varValue;
}
return static::$arrCache[$strCacheKey][$strKey];
}
/**
* Set a $_GET variable
*
* @param string $strKey The variable name
* @param mixed $varValue The variable value
* @param boolean $blnAddUnused If true, the value usage will be checked
*/
public static function setGet($strKey, $varValue, $blnAddUnused=false)
{
// Convert special characters (see #7829)
$strKey = str_replace(array(' ', '.', '['), '_', $strKey);
$strKey = static::cleanKey($strKey);
unset(static::$arrCache['getEncoded'][$strKey]);
unset(static::$arrCache['getDecoded'][$strKey]);
if ($varValue === null)
{
unset($_GET[$strKey]);
}
else
{
$_GET[$strKey] = $varValue;
if ($blnAddUnused)
{
static::setUnusedGet($strKey, $varValue); // see #4277
}
}
}
/**
* Set a $_POST variable
*
* @param string $strKey The variable name
* @param mixed $varValue The variable value
*/
public static function setPost($strKey, $varValue)
{
$strKey = static::cleanKey($strKey);
unset(static::$arrCache['postEncoded'][$strKey]);
unset(static::$arrCache['postDecoded'][$strKey]);
unset(static::$arrCache['postHtmlEncoded'][$strKey]);
unset(static::$arrCache['postHtmlDecoded'][$strKey]);
unset(static::$arrCache['postRaw'][$strKey]);
unset(static::$arrCache['postUnsafeRaw'][$strKey]);
if ($varValue === null)
{
unset($_POST[$strKey]);
}
else
{
$_POST[$strKey] = $varValue;
}
}
/**
* Set a $_COOKIE variable
*
* @param string $strKey The variable name
* @param mixed $varValue The variable value
*/
public static function setCookie($strKey, $varValue)
{
$strKey = static::cleanKey($strKey);
unset(static::$arrCache['cookieEncoded'][$strKey]);
unset(static::$arrCache['cookieDecoded'][$strKey]);
if ($varValue === null)
{
unset($_COOKIE[$strKey]);
}
else
{
$_COOKIE[$strKey] = $varValue;
}
}
/**
* Reset the internal cache
*/
public static function resetCache()
{
static::$arrCache = array();
}
/**
* Return whether there are unused GET parameters
*
* @return boolean True if there are unused GET parameters
*/
public static function hasUnusedGet()
{
return count(static::$arrUnusedGet) > 0;
}
/**
* Return the unused GET parameters as array
*
* @return array The unused GET parameter array
*/
public static function getUnusedGet()
{
return array_keys(static::$arrUnusedGet);
}
/**
* Set an unused GET parameter
*
* @param string $strKey The array key
* @param mixed $varValue The array value
*/
public static function setUnusedGet($strKey, $varValue)
{
static::$arrUnusedGet[$strKey] = $varValue;
}
/**
* Sanitize the variable names (thanks to Andreas Schempp)
*
* @param mixed $varValue A variable name or an array of variable names
*
* @return mixed The clean name or array of names
*/
public static function cleanKey($varValue)
{
// Recursively clean arrays
if (is_array($varValue))
{
$return = array();
foreach ($varValue as $k=>$v)
{
$k = static::cleanKey($k);
if (is_array($v))
{
$v = static::cleanKey($v);
}
$return[$k] = $v;
}
return $return;
}
$varValue = static::decodeEntities($varValue);
$varValue = static::xssClean($varValue, true);
$varValue = static::stripTags($varValue);
return $varValue;
}
/**
* Strip slashes
*
* @param mixed $varValue A string or array
*
* @return mixed The string or array without slashes
*
* @deprecated Deprecated since Contao 3.5, to be removed in Contao 5.
* Since get_magic_quotes_gpc() always returns false in PHP 5.4+, the method was never actually executed.
*/
public static function stripSlashes($varValue)
{
return $varValue;
}
/**
* Strip HTML and PHP tags preserving HTML comments
*
* @param mixed $varValue A string or array
* @param string $strAllowedTags A string of tags to preserve
*
* @return mixed The cleaned string or array
*/
public static function stripTags($varValue, $strAllowedTags='')
{
if ($varValue === null || $varValue == '')
{
return $varValue;
}
// Recursively clean arrays
if (is_array($varValue))
{
foreach ($varValue as $k=>$v)
{
$varValue[$k] = static::stripTags($v, $strAllowedTags);
}
return $varValue;
}
// Encode opening arrow brackets (see #3998)
$varValue = preg_replace_callback('@</?([^\s<>/]*)@', function ($matches) use ($strAllowedTags)
{
if ($matches[1] == '' || strpos(strtolower($strAllowedTags), '<' . strtolower($matches[1]) . '>') === false)
{
$matches[0] = str_replace('<', '<', $matches[0]);
}
return $matches[0];
}, $varValue);
// Strip the tags and restore HTML comments
$varValue = strip_tags($varValue, $strAllowedTags);
$varValue = str_replace(array('<!--', '<!['), array('<!--', '<!['), $varValue);
// Recheck for encoded null bytes
while (strpos($varValue, '\\0') !== false)
{
$varValue = str_replace('\\0', '', $varValue);
}
return $varValue;
}
/**
* Clean a value and try to prevent XSS attacks
*
* @param mixed $varValue A string or array
* @param boolean $blnStrictMode If true, the function removes also JavaScript event handlers
*
* @return mixed The cleaned string or array
*/
public static function xssClean($varValue, $blnStrictMode=false)
{
if ($varValue === null || $varValue == '')
{
return $varValue;
}
// Recursively clean arrays
if (is_array($varValue))
{
foreach ($varValue as $k=>$v)
{
$varValue[$k] = static::xssClean($v);
}
return $varValue;
}
// Return if the value is not a string
if (is_bool($varValue) || $varValue === null || is_numeric($varValue))
{
return $varValue;
}
// Validate standard character entites and UTF16 two byte encoding
$varValue = preg_replace('/(&#*\w+)[\x00-\x20]+;/i', '$1;', $varValue);
// Remove carriage returns
$varValue = preg_replace('/\r+/', '', $varValue);
// Replace unicode entities
$varValue = utf8_decode_entities($varValue);
// Remove null bytes
$varValue = str_replace(chr(0), '', $varValue);
// Remove encoded null bytes
while (strpos($varValue, '\\0') !== false)
{
$varValue = str_replace('\\0', '', $varValue);
}
// Define a list of keywords
$arrKeywords = array
(
'/\bj\s*a\s*v\s*a\s*s\s*c\s*r\s*i\s*p\s*t\b/is', // javascript
'/\bv\s*b\s*s\s*c\s*r\s*i\s*p\s*t\b/is', // vbscript
'/\bv\s*b\s*s\s*c\s*r\s*p\s*t\b/is', // vbscrpt
'/\bs\s*c\s*r\s*i\s*p\s*t\b/is', //script
'/\ba\s*p\s*p\s*l\s*e\s*t\b/is', // applet
'/\ba\s*l\s*e\s*r\s*t\b/is', // alert
'/\bd\s*o\s*c\s*u\s*m\s*e\s*n\s*t\b/is', // document
'/\bw\s*r\s*i\s*t\s*e\b/is', // write
'/\bc\s*o\s*o\s*k\s*i\s*e\b/is', // cookie
'/\bw\s*i\s*n\s*d\s*o\s*w\b/is' // window
);
// Compact exploded keywords like "j a v a s c r i p t"
foreach ($arrKeywords as $strKeyword)
{
$arrMatches = array();
preg_match_all($strKeyword, $varValue, $arrMatches);
foreach ($arrMatches[0] as $strMatch)
{
$varValue = str_replace($strMatch, preg_replace('/\s*/', '', $strMatch), $varValue);
}
}
$arrRegexp[] = '/<(a|img)[^>]*[^a-z](<script|<xss)[^>]*>/is';
$arrRegexp[] = '/<(a|img)[^>]*[^a-z]document\.cookie[^>]*>/is';
$arrRegexp[] = '/<(a|img)[^>]*[^a-z]vbscri?pt\s*:[^>]*>/is';
$arrRegexp[] = '/<(a|img)[^>]*[^a-z]expression\s*\([^>]*>/is';
// Also remove event handlers and JavaScript in strict mode
if ($blnStrictMode)
{
$arrRegexp[] = '/vbscri?pt\s*:/is';
$arrRegexp[] = '/javascript\s*:/is';
$arrRegexp[] = '/<\s*embed.*swf/is';
$arrRegexp[] = '/<(a|img)[^>]*[^a-z]alert\s*\([^>]*>/is';
$arrRegexp[] = '/<(a|img)[^>]*[^a-z]javascript\s*:[^>]*>/is';
$arrRegexp[] = '/<(a|img)[^>]*[^a-z]window\.[^>]*>/is';
$arrRegexp[] = '/<(a|img)[^>]*[^a-z]document\.[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onabort\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onblur\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onchange\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onclick\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onerror\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onfocus\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onkeypress\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onkeydown\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onkeyup\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onload\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onmouseover\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onmouseup\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onmousedown\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onmouseout\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onreset\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onselect\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onsubmit\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onunload\s*=[^>]*>/is';
$arrRegexp[] = '/<[^>]*[^a-z]onresize\s*=[^>]*>/is';
}
$varValue = preg_replace($arrRegexp, '', $varValue);
// Recheck for encoded null bytes
while (strpos($varValue, '\\0') !== false)
{
$varValue = str_replace('\\0', '', $varValue);
}
return $varValue;
}
/**
* Decode HTML entities
*
* @param mixed $varValue A string or array
*
* @return mixed The decoded string or array
*/
public static function decodeEntities($varValue)
{
if ($varValue === null || $varValue == '')
{
return $varValue;
}
// Recursively clean arrays
if (is_array($varValue))
{
foreach ($varValue as $k=>$v)
{
$varValue[$k] = static::decodeEntities($v);
}
return $varValue;
}
// Preserve basic entities
$varValue = static::preserveBasicEntities($varValue);
$varValue = html_entity_decode($varValue, ENT_QUOTES, \Config::get('characterSet'));
return $varValue;
}
/**
* Preserve basic entities by replacing them with square brackets (e.g. & becomes [amp])
*
* @param mixed $varValue A string or array
*
* @return mixed The string or array with the converted entities
*/
public static function preserveBasicEntities($varValue)
{
if ($varValue === null || $varValue == '')
{
return $varValue;
}
// Recursively clean arrays
if (is_array($varValue))
{
foreach ($varValue as $k=>$v)
{
$varValue[$k] = static::preserveBasicEntities($v);
}
return $varValue;
}
$varValue = str_replace
(
array('[&]', '&', '[<]', '<', '[>]', '>', '[ ]', ' ', '[­]', '­'),
array('[&]', '[&]', '[lt]', '[lt]', '[gt]', '[gt]', '[nbsp]', '[nbsp]', '[-]', '[-]'),
$varValue
);
return $varValue;
}
/**
* Encode special characters which are potentially dangerous
*
* @param mixed $varValue A string or array
*
* @return mixed The encoded string or array
*/
public static function encodeSpecialChars($varValue)
{
if ($varValue === null || $varValue == '')
{
return $varValue;
}
// Recursively clean arrays
if (is_array($varValue))
{
foreach ($varValue as $k=>$v)
{
$varValue[$k] = static::encodeSpecialChars($v);
}
return $varValue;
}
$arrSearch = array('#', '<', '>', '(', ')', '\\', '=');
$arrReplace = array('#', '<', '>', '(', ')', '\', '=');
return str_replace($arrSearch, $arrReplace, $varValue);
}
/**
* Encode the opening and closing delimiters of insert tags
*
* @param string $varValue The input string
*
* @return string The encoded input string
*/
public static function encodeInsertTags($varValue)
{
return str_replace(array('{{', '}}'), array('{{', '}}'), $varValue);
}
/**
* Fallback to the session form data if there is no post data
*
* @param string $strKey The variable name
*
* @return mixed The variable value
*/
public static function findPost($strKey)
{
if (isset($_POST[$strKey]))
{
return $_POST[$strKey];
}
if (isset($_SESSION['FORM_DATA'][$strKey]))
{
return ($strKey == 'FORM_SUBMIT') ? preg_replace('/^auto_/i', '', $_SESSION['FORM_DATA'][$strKey]) : $_SESSION['FORM_DATA'][$strKey];
}
return null;
}
/**
* Clean the keys of the request arrays
*
* @deprecated Input is now a static class
*/
protected function __construct()
{
static::initialize();
}
/**
* Prevent cloning of the object (Singleton)
*
* @deprecated Input is now a static class
*/
final public function __clone() {}
/**
* Return the object instance (Singleton)
*
* @return \Input The object instance
*
* @deprecated Input is now a static class
*/
public static function getInstance()
{
if (static::$objInstance === null)
{
static::$objInstance = new static();
}
return static::$objInstance;
}
}