|
|
@@ -280,3 +280,16 @@ if (!function_exists('deprecationWarning')) {
|
|
|
trigger_error($message, E_USER_DEPRECATED);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+if (!function_exists('getVarType')) {
|
|
|
+ /**
|
|
|
+ * Returns the objects class or var type of it's not an object
|
|
|
+ *
|
|
|
+ * @param mixed $var Variable to check
|
|
|
+ * @return string Returns the class name or variable type
|
|
|
+ */
|
|
|
+ function getVarType($var)
|
|
|
+ {
|
|
|
+ return is_object($var) ? get_class($var) : gettype($var);
|
|
|
+ }
|
|
|
+}
|