ConvertToFloatTrait
Trait ConvertToFloatTrait.
Trait to cast an input value to float.
Table of Contents
- fromArrayToFloat() : mixed
- Convert an array to a float.
- fromBooleanToFloat() : float
- Convert a boolean to a float.
- fromFileToFloat() : mixed
- Convert a file to a float.
- fromFloatToFloat() : float
- Convert a float to a float.
- fromHtmlToFloat() : mixed
- Convert an HTML string to a float.
- fromImageToFloat() : mixed
- Convert an image to a float.
- fromIntegerToFloat() : float
- Convert an integer to a float.
- fromJsonToFloat() : float
- Convert a JSON string to a float.
- fromTextToFloat() : float|int|mixed|null
- Convert text to a float.
- fromUndefinedToFloat() : null
- Convert undefined to float.
- fromXmlToFloat() : mixed
- Convert an XML string to a float.
Methods
fromArrayToFloat()
Convert an array to a float.
public
fromArrayToFloat(array<string|int, mixed> $array) : mixed
Parameters
- $array : array<string|int, mixed>
Tags
Return values
mixed —fromBooleanToFloat()
Convert a boolean to a float.
public
fromBooleanToFloat(bool $boolean) : float
Parameters
- $boolean : bool
Return values
float —fromFileToFloat()
Convert a file to a float.
public
fromFileToFloat( $file) : mixed
Parameters
Tags
Return values
mixed —fromFloatToFloat()
Convert a float to a float.
public
fromFloatToFloat(float $float) : float
Parameters
- $float : float
Return values
float —fromHtmlToFloat()
Convert an HTML string to a float.
public
fromHtmlToFloat(string $html) : mixed
Parameters
- $html : string
Tags
Return values
mixed —fromImageToFloat()
Convert an image to a float.
public
fromImageToFloat( $image) : mixed
Parameters
Tags
Return values
mixed —fromIntegerToFloat()
Convert an integer to a float.
public
fromIntegerToFloat(int $integer) : float
Parameters
- $integer : int
Return values
float —fromJsonToFloat()
Convert a JSON string to a float.
public
fromJsonToFloat(string $json) : float
Parameters
- $json : string
Tags
Return values
float —fromTextToFloat()
Convert text to a float.
public
fromTextToFloat(string $text) : float|int|mixed|null
Parameters
- $text : string
Tags
Return values
float|int|mixed|null —fromUndefinedToFloat()
Convert undefined to float.
public
fromUndefinedToFloat( $data) : null
Parameters
Return values
null —fromXmlToFloat()
Convert an XML string to a float.
public
fromXmlToFloat(string $xml) : mixed
Parameters
- $xml : string