PHP Class App\Libraries\Utils

Show file Open project: hillelcoren/invoice-ninja Class Usage Examples

Public Properties

Property Type Description
$months

Public Methods

Method Description
addHttp ( $url )
allowNewAccounts ( )
basePath ( )
calculateTaxes ( $amount, $taxRate1, $taxRate2 )
cityStateZip ( $city, $state, $postalCode, $swap )
copyContext ( $entity1, $entity2 )
dateToString ( $date )
decodePDF ( $string )
endsWith ( $haystack, $needle )
exportData ( $output, $data, $headers = false )
fatalError ( $message = false, $exception = false )
formatMoney ( $value, $currencyId = false, $countryId = false, $decorator = false )
formatTime ( $t )
formatWebsite ( $website )
fromSqlDate ( $date, $formatResult = true )
fromSqlDateTime ( $date, $formatResult = true )
generateLicense ( )
getApiHeaders ( $count )
getCardType ( $number ) http://wephp.co/detect-credit-card-type-php/
getClientDisplayName ( $model )
getDemoAccountId ( )
getDocsUrl ( $path )
getDomainPlaceholder ( )
getEntityClass ( $entityType )
getEntityName ( $entityType )
getEntityRowClass ( $model )
getErrorString ( $exception )
getFirst ( $values )
getFromCache ( $id, $type )
getLocaleRegion ( )
getMinNumUsers ( $max )
getMonthOptions ( )
getNewsFeedResponse ( $userType = false )
getPersonDisplayName ( $firstName, $lastName, $email )
getPlanPrice ( $plan )
getProLabel ( $feature )
getResllerType ( )
getSubdomainPlaceholder ( )
getTranslatedWeekdayNames ( ) : Collection Gets an array of translated weekday names
getUserType ( )
getVendorDisplayName ( $model )
getWeekdayNames ( ) : Collection Gets an array of weekday names (in English)
hasAllPermissions ( $permission )
hasFeature ( $feature )
hasPermission ( $permission, $requireAll = false )
isAdmin ( )
isConfirmed ( )
isCron ( )
isDatabaseSetup ( )
isDownForMaintenance ( )
isEmpty ( $value )
isEnglish ( )
isNinja ( )
isNinjaDev ( )
isNinjaProd ( )
isOAuthEnabled ( )
isPaidPro ( )
isPro ( )
isRegistered ( )
isReseller ( )
isTravis ( )
isTrial ( )
isWhiteLabel ( )
logError ( $error, $context = 'PHP', $info = false )
lookupEventId ( $eventName )
maskAccountNumber ( $value )
notifyZapier ( $subscription, $data )
parseFloat ( $value )
parseInt ( $value )
pluralize ( $string, $count )
pluralizeEntityType ( $type )
processVariables ( $str )
replaceSubdomain ( $domain, $subdomain )
requireHTTPS ( )
setupWePay ( $accountGateway = null )
splitName ( $name )
startsWith ( $haystack, $needle )
timestampToDateString ( $timestamp )
timestampToDateTimeString ( $timestamp )
timestampToString ( $timestamp, $timezone = false, $format )
toArray ( $data )
toCamelCase ( $string )
toClassCase ( $string )
toSnakeCase ( $string )
toSpaceCase ( $string )
toSqlDate ( $date, $formatResult = true )
today ( $formatResult = true )
trans ( $input )
transFlowText ( $key ) TODO remove this
wrapAdjustment ( $adjustment, $currencyId, $countryId )

Private Methods

Method Description
getDatePart ( $part, $offset )
getMonth ( $offset )
getQuarter ( $offset )
getYear ( $offset )

Method Details

addHttp() public static method

public static addHttp ( $url )

allowNewAccounts() public static method

public static allowNewAccounts ( )

basePath() public static method

public static basePath ( )

calculateTaxes() public static method

public static calculateTaxes ( $amount, $taxRate1, $taxRate2 )

cityStateZip() public static method

public static cityStateZip ( $city, $state, $postalCode, $swap )

copyContext() public static method

public static copyContext ( $entity1, $entity2 )

dateToString() public static method

public static dateToString ( $date )

decodePDF() public static method

public static decodePDF ( $string )

endsWith() public static method

public static endsWith ( $haystack, $needle )

exportData() public static method

public static exportData ( $output, $data, $headers = false )

fatalError() public static method

public static fatalError ( $message = false, $exception = false )

formatMoney() public static method

public static formatMoney ( $value, $currencyId = false, $countryId = false, $decorator = false )

formatTime() public static method

public static formatTime ( $t )

formatWebsite() public static method

public static formatWebsite ( $website )

fromSqlDate() public static method

public static fromSqlDate ( $date, $formatResult = true )

fromSqlDateTime() public static method

public static fromSqlDateTime ( $date, $formatResult = true )

generateLicense() public static method

public static generateLicense ( )

getApiHeaders() public static method

public static getApiHeaders ( $count )

getCardType() public static method

http://wephp.co/detect-credit-card-type-php/
public static getCardType ( $number )

getClientDisplayName() public static method

public static getClientDisplayName ( $model )

getDemoAccountId() public static method

public static getDemoAccountId ( )

getDocsUrl() public static method

public static getDocsUrl ( $path )

getDomainPlaceholder() public static method

public static getDomainPlaceholder ( )

getEntityClass() public static method

public static getEntityClass ( $entityType )

getEntityName() public static method

public static getEntityName ( $entityType )

getEntityRowClass() public static method

public static getEntityRowClass ( $model )

getErrorString() public static method

public static getErrorString ( $exception )

getFirst() public static method

public static getFirst ( $values )

getFromCache() public static method

public static getFromCache ( $id, $type )

getLocaleRegion() public static method

public static getLocaleRegion ( )

getMinNumUsers() public static method

public static getMinNumUsers ( $max )

getMonthOptions() public static method

public static getMonthOptions ( )

getNewsFeedResponse() public static method

public static getNewsFeedResponse ( $userType = false )

getPersonDisplayName() public static method

public static getPersonDisplayName ( $firstName, $lastName, $email )

getPlanPrice() public static method

public static getPlanPrice ( $plan )

getProLabel() public static method

public static getProLabel ( $feature )

getResllerType() public static method

public static getResllerType ( )

getSubdomainPlaceholder() public static method

public static getSubdomainPlaceholder ( )

getTranslatedWeekdayNames() public static method

Gets an array of translated weekday names
public static getTranslatedWeekdayNames ( ) : Collection
return Illuminate\Support\Collection

getUserType() public static method

public static getUserType ( )

getVendorDisplayName() public static method

public static getVendorDisplayName ( $model )

getWeekdayNames() public static method

Gets an array of weekday names (in English)
See also: getTranslatedWeekdayNames()
public static getWeekdayNames ( ) : Collection
return Illuminate\Support\Collection

hasAllPermissions() public static method

public static hasAllPermissions ( $permission )

hasFeature() public static method

public static hasFeature ( $feature )

hasPermission() public static method

public static hasPermission ( $permission, $requireAll = false )

isAdmin() public static method

public static isAdmin ( )

isConfirmed() public static method

public static isConfirmed ( )

isCron() public static method

public static isCron ( )

isDatabaseSetup() public static method

public static isDatabaseSetup ( )

isDownForMaintenance() public static method

public static isDownForMaintenance ( )

isEmpty() public static method

public static isEmpty ( $value )

isEnglish() public static method

public static isEnglish ( )

isNinja() public static method

public static isNinja ( )

isNinjaDev() public static method

public static isNinjaDev ( )

isNinjaProd() public static method

public static isNinjaProd ( )

isOAuthEnabled() public static method

public static isOAuthEnabled ( )

isPaidPro() public static method

public static isPaidPro ( )

isPro() public static method

public static isPro ( )

isRegistered() public static method

public static isRegistered ( )

isReseller() public static method

public static isReseller ( )

isTravis() public static method

public static isTravis ( )

isTrial() public static method

public static isTrial ( )

isWhiteLabel() public static method

public static isWhiteLabel ( )

logError() public static method

public static logError ( $error, $context = 'PHP', $info = false )

lookupEventId() public static method

public static lookupEventId ( $eventName )

maskAccountNumber() public static method

public static maskAccountNumber ( $value )

notifyZapier() public static method

public static notifyZapier ( $subscription, $data )

parseFloat() public static method

public static parseFloat ( $value )

parseInt() public static method

public static parseInt ( $value )

pluralize() public static method

public static pluralize ( $string, $count )

pluralizeEntityType() public static method

public static pluralizeEntityType ( $type )

processVariables() public static method

public static processVariables ( $str )

replaceSubdomain() public static method

public static replaceSubdomain ( $domain, $subdomain )

requireHTTPS() public static method

public static requireHTTPS ( )

setupWePay() public static method

public static setupWePay ( $accountGateway = null )

splitName() public static method

public static splitName ( $name )

startsWith() public static method

public static startsWith ( $haystack, $needle )

timestampToDateString() public static method

public static timestampToDateString ( $timestamp )

timestampToDateTimeString() public static method

public static timestampToDateTimeString ( $timestamp )

timestampToString() public static method

public static timestampToString ( $timestamp, $timezone = false, $format )

toArray() public static method

public static toArray ( $data )

toCamelCase() public static method

public static toCamelCase ( $string )

toClassCase() public static method

public static toClassCase ( $string )

toSnakeCase() public static method

public static toSnakeCase ( $string )

toSpaceCase() public static method

public static toSpaceCase ( $string )

toSqlDate() public static method

public static toSqlDate ( $date, $formatResult = true )

today() public static method

public static today ( $formatResult = true )

trans() public static method

public static trans ( $input )

transFlowText() public static method

TODO remove this
public static transFlowText ( $key )

wrapAdjustment() public static method

public static wrapAdjustment ( $adjustment, $currencyId, $countryId )

Property Details

$months public static property

public static $months