Documentation

Conversion implements ConversionContract

Interfaces, Classes and Traits

ConversionContract

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
since
1.0.0
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
since
1.0.0
Return values
mixed

objectToArray()

Convert Objects to arrays.

public static objectToArray(object $object) : array<string|int, mixed>|false
Parameters
$object : object
Tags
since
1.0.0
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
since
1.0.0
todo

???

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
since
1.0.0
Return values
mixed

xmlToArray()

Convert XML to arrays.

public static xmlToArray(mixed $xml) : array<string|int, mixed>
Parameters
$xml : mixed

xml

Tags
since
1.0.0
Return values
array<string|int, mixed>

Search results