PHP Класс app\helpers\Utility

Автор: Gustavo Ocanto ([email protected])
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

active() публичный статический метод

[active description].
public static active ( string $route, string $active = 'active' ) : [string]
$route string [Route to compare ]
$active string [class]
Результат [string]

codeMasked() публичный статический метод

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]
Результат string masked

getUrlQueryString() публичный статический метод

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]
Результат [string]

money_format() публичный статический метод

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

printBarCode() публичный статический метод

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]
Результат [html]

removeFromUrlQueryString() публичный статический метод

removeFromUrlQueryString removes a specific variable from the url query string.
public static removeFromUrlQueryString ( [type] $refine, [type] $_key ) : [string]
$refine [type]
$_key [type]
Результат [string]

requestToArrayUnique() публичный статический метод

requestToArrayUnique this method is able to return a unique multidimensional array.
public static requestToArrayUnique ( [array] $request ) : [array]
$request [array]
Результат [array]

showPrice() публичный статический метод

[price description].
public static showPrice ( $arg ) : [String]
Результат [String]

showRate() публичный статический метод

showRate it shows the rate score.
public static showRate ( $rate ) : [string]
Результат [string]

thousandSuffix() публичный статический метод

[Format Currency to Nearest Thousands such as Kilos, Millions, Billions, and Trillions].
public static thousandSuffix ( [Float] $num ) : [String]
$num [Float]
Результат [String]

totalByStatusOrder() публичный статический метод

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]
Результат [array]

totalOrder() публичный статический метод

totalOrder It is able to return the order total, as items number and price total.
public static totalOrder ( [object] $items ) : [array]
$items [object]
Результат [array]