Conversion implements ConversionContract
Interfaces, Classes and Traits
Table of Contents
- arrayToObject() : object|false
- Convert arrays to Object.
- bitToBytes() : mixed
- Convert the bit into bytes.
- objectToArray() : array<string|int, mixed>|false
- Convert Objects to arrays.
- unit() : mixed
- Unit conversion.
- viewToHumanize() : mixed
- Convert the views to relative unit.
- xmlToArray() : array<string|int, mixed>
- Convert XML to arrays.
Methods
arrayToObject()
Convert arrays to Object.
public
static arrayToObject(array<string|int, mixed> $array) : object|false
Parameters
- $array : array<string|int, mixed>
-
Arrays
Tags
Return values
object|false —bitToBytes()
Convert the bit into bytes.
public
static bitToBytes(int $size[, int $pre = 2 ]) : mixed
Parameters
- $size : int
-
The value that you want provided
- $pre : int = 2
-
Round the value default 2
Tags
Return values
mixed —objectToArray()
Convert Objects to arrays.
public
static objectToArray(object $object) : array<string|int, mixed>|false
Parameters
- $object : object
Tags
Return values
array<string|int, mixed>|false —unit()
Unit conversion.
public
static unit(int $value, string $base, string $to) : mixed
Parameters
- $value : int
-
Value to be work on.
- $base : string
-
The unit which is given that to be converted.
- $to : string
-
The unit in which it should be converted.
Tags
Return values
mixed —viewToHumanize()
Convert the views to relative unit.
public
static viewToHumanize(int $n[, string $sep = ',' ]) : mixed
Parameters
- $n : int
-
Views.
- $sep : string = ','
-
Seperator.
Tags
Return values
mixed —xmlToArray()
Convert XML to arrays.
public
static xmlToArray(mixed $xml) : array<string|int, mixed>
Parameters
- $xml : mixed
-
xml