PHP Class app\helpers\Utility

Author: Gustavo Ocanto ([email protected])
Show file Open project: ant-vel/antVel

Public Methods

Method Description
active ( string $route, string $active = 'active' ) : [string] [active description].
codeMasked ( [string] $code, [integer] $lenght = 5, [char] $char = '0' ) : string codeMasked It is able to generate a mask for any string passed through it.
getUrlQueryString ( [array] $refine, [string] $key, [string] $value ) : [string] getUrlQueryString This method is able to return a complete url, including its GET variables, even if they have changes.
money_format ( $format, $number ) emulate money format if the function is not defined in the O.S.
printBarCode ( [object] $product = null, $type = 'EAN8' ) : [html] printBarCode it prints the barcode taking in account whether the barcode exists or not.
removeFromUrlQueryString ( [type] $refine, [type] $_key ) : [string] removeFromUrlQueryString removes a specific variable from the url query string.
requestToArrayUnique ( [array] $request ) : [array] requestToArrayUnique this method is able to return a unique multidimensional array.
showPrice ( $arg ) : [String] [price description].
showRate ( $rate ) : [string] showRate it shows the rate score.
thousandSuffix ( [Float] $num ) : [String] [Format Currency to Nearest Thousands such as Kilos, Millions, Billions, and Trillions].
totalByStatusOrder ( $orders ) : [array] totalByStatusOrder it stores all the orders totals by type to be used either in a reports view or a simple one.
totalOrder ( [object] $items ) : [array] totalOrder It is able to return the order total, as items number and price total.

Method Details

active() public static method

[active description].
public static active ( string $route, string $active = 'active' ) : [string]
$route string [Route to compare ]
$active string [class]
return [string]

codeMasked() public static method

codeMasked It is able to generate a mask for any string passed through it.
public static codeMasked ( [string] $code, [integer] $lenght = 5, [char] $char = '0' ) : string
$code [string]
$lenght [integer]
$char [char]
return string masked

getUrlQueryString() public static method

getUrlQueryString This method is able to return a complete url, including its GET variables, even if they have changes.
public static getUrlQueryString ( [array] $refine, [string] $key, [string] $value ) : [string]
$refine [array]
$key [string]
$value [string]
return [string]

money_format() public static method

emulate money format if the function is not defined in the O.S.
public static money_format ( $format, $number )

printBarCode() public static method

printBarCode it prints the barcode taking in account whether the barcode exists or not.
public static printBarCode ( [object] $product = null, $type = 'EAN8' ) : [html]
$product [object]
return [html]

removeFromUrlQueryString() public static method

removeFromUrlQueryString removes a specific variable from the url query string.
public static removeFromUrlQueryString ( [type] $refine, [type] $_key ) : [string]
$refine [type]
$_key [type]
return [string]

requestToArrayUnique() public static method

requestToArrayUnique this method is able to return a unique multidimensional array.
public static requestToArrayUnique ( [array] $request ) : [array]
$request [array]
return [array]

showPrice() public static method

[price description].
public static showPrice ( $arg ) : [String]
return [String]

showRate() public static method

showRate it shows the rate score.
public static showRate ( $rate ) : [string]
return [string]

thousandSuffix() public static method

[Format Currency to Nearest Thousands such as Kilos, Millions, Billions, and Trillions].
public static thousandSuffix ( [Float] $num ) : [String]
$num [Float]
return [String]

totalByStatusOrder() public static method

totalByStatusOrder it stores all the orders totals by type to be used either in a reports view or a simple one.
public static totalByStatusOrder ( $orders ) : [array]
return [array]

totalOrder() public static method

totalOrder It is able to return the order total, as items number and price total.
public static totalOrder ( [object] $items ) : [array]
$items [object]
return [array]