TypeHelper
class TypeHelper implements ProtectedContextAwareInterface (View source)
Type helper for Eel contexts
Methods
Get the variable type
Get the variable type
Get the class name of the given variable or NULL if it wasn't an object
Get the classname for objects or type for other values
Is the given variable an array.
Is the given variable a string.
Is the given variable numeric.
Is the given variable an integer.
Is the given variable a float.
Is the given variable a scalar.
Is the given variable boolean.
Is the given variable an object.
Is the given variable of the provided object type.
No description
Details
string
typeof(mixed $variable)
Get the variable type
string
getType(mixed $variable)
Get the variable type
string|null
className(object $variable)
Get the class name of the given variable or NULL if it wasn't an object
string
debugType(mixed $variable)
Get the classname for objects or type for other values
bool
isArray(mixed $variable)
Is the given variable an array.
bool
isString(mixed $variable)
Is the given variable a string.
bool
isNumeric(mixed $variable)
Is the given variable numeric.
bool
isInteger(mixed $variable)
Is the given variable an integer.
bool
isFloat(mixed $variable)
Is the given variable a float.
bool
isScalar(mixed $variable)
Is the given variable a scalar.
bool
isBoolean(mixed $variable)
Is the given variable boolean.
bool
isObject(mixed $variable)
Is the given variable an object.
bool
instance(mixed $variable, string $expectedObjectType)
Is the given variable of the provided object type.
bool
allowsCallOfMethod(string $methodName)
No description