PHP Class Neos\Eel\Helper\TypeHelper

Inheritance: implements Neos\Eel\ProtectedContextAwareInterface
Show file Open project: neos/flow-development-collection

Public Methods

Method Description
allowsCallOfMethod ( string $methodName ) : boolean
className ( object $variable ) : string | null Get the class name of the given variable or NULL if it wasn't an object
getType ( mixed $variable ) : string Get the variable type
instance ( mixed $variable, string $expectedObjectType ) : boolean Is the given variable of the provided object type.
isArray ( mixed $variable ) : boolean Is the given variable an array.
isBoolean ( mixed $variable ) : boolean Is the given variable boolean.
isFloat ( mixed $variable ) : boolean Is the given variable a float.
isInteger ( mixed $variable ) : boolean Is the given variable an integer.
isNumeric ( mixed $variable ) : boolean Is the given variable numeric.
isObject ( mixed $variable ) : boolean Is the given variable an object.
isScalar ( mixed $variable ) : boolean Is the given variable a scalar.
isString ( mixed $variable ) : boolean Is the given variable a string.
typeof ( mixed $variable ) : string Get the variable type

Method Details

allowsCallOfMethod() public method

public allowsCallOfMethod ( string $methodName ) : boolean
$methodName string
return boolean

className() public method

Get the class name of the given variable or NULL if it wasn't an object
public className ( object $variable ) : string | null
$variable object
return string | null

getType() public method

Get the variable type
See also: typeof()
public getType ( mixed $variable ) : string
$variable mixed
return string

instance() public method

Is the given variable of the provided object type.
public instance ( mixed $variable, string $expectedObjectType ) : boolean
$variable mixed
$expectedObjectType string
return boolean

isArray() public method

Is the given variable an array.
public isArray ( mixed $variable ) : boolean
$variable mixed
return boolean

isBoolean() public method

Is the given variable boolean.
public isBoolean ( mixed $variable ) : boolean
$variable mixed
return boolean

isFloat() public method

Is the given variable a float.
public isFloat ( mixed $variable ) : boolean
$variable mixed
return boolean

isInteger() public method

Is the given variable an integer.
public isInteger ( mixed $variable ) : boolean
$variable mixed
return boolean

isNumeric() public method

Is the given variable numeric.
public isNumeric ( mixed $variable ) : boolean
$variable mixed
return boolean

isObject() public method

Is the given variable an object.
public isObject ( mixed $variable ) : boolean
$variable mixed
return boolean

isScalar() public method

Is the given variable a scalar.
public isScalar ( mixed $variable ) : boolean
$variable mixed
return boolean

isString() public method

Is the given variable a string.
public isString ( mixed $variable ) : boolean
$variable mixed
return boolean

typeof() public method

Get the variable type
public typeof ( mixed $variable ) : string
$variable mixed
return string