IntegerEncoder
class IntegerEncoder implements Encoder (View source)
Encoder for integer values.
Methods
IntegerEncoder constructor.
Returns a list of options and their default values as an associative array.
Tells if the encoder supports encoding the given value.
Generates the PHP code representation for the given value.
Encodes an integer into binary representation.
Encodes an integer into octal representation.
Encodes an integer into decimal representation.
Encodes an integer into hexadecimal representation.
Details
at line 24
__construct()
IntegerEncoder constructor.
at line 42
array
getDefaultOptions()
Returns a list of options and their default values as an associative array.
at line 47
bool
supports(mixed $value)
Tells if the encoder supports encoding the given value.
at line 52
string
encode(mixed $value, int $depth, array $options, callable $encode)
Generates the PHP code representation for the given value.
at line 68
string
encodeBinary(int $integer)
Encodes an integer into binary representation.
at line 78
string
encodeOctal(int $integer)
Encodes an integer into octal representation.
at line 89
string
encodeDecimal(int $integer, array $options)
Encodes an integer into decimal representation.
at line 104
string
encodeHexadecimal(int $integer, array $options)
Encodes an integer into hexadecimal representation.