expCore

define

"BASE" "../../.."

package

Subsystems

Methods

exdoc This function converts an absolute path, such as the one provided by the expTemplate::resolveFilePaths() function into a relative one.

abs2rel(string $inPath) : string
static

This is useful if the file is not to be included server- but loaded client-side

node

Subsystems:expCore

Arguments

$inPath

string

The absolute file path

Response

string

This converts the data array into a nice CSV.

array2csv( $items, array|null $rptcols = array()) : string
static

We grab the items array which is stored funkily in the DB in an associative array when we pull it. So basically our aray looks like this:

ITEMS {[id]=>myID, [Name]=>name, [Address]=>myaddr} {[id]=>myID1, [Name]=>name1, [Address]=>myaddr1} {[id]=>myID2, [Name]=>name2, [Address]=>myaddr2} {[id]=>myID3, [Name]=>name3, [Address]=>myaddr3} {[id]=>myID4, [Name]=>name4, [Address]=>myaddr4} {[id]=>myID5, [Name]=>name5, [Address]=>myaddr5}

So by nature of the array, the keys are repeated in each line (id, name, etc) So if we want to make a header row, we just run through once at the beginning and use the array_keys function to strip out a functional header

Arguments

$items

$rptcols

array|null

Response

string

array_diff_assoc_recursive

array_diff_assoc_recursive( $array1,  $array2) 
static

Arguments

$array1

$array2

buildNameList

buildNameList( $type,  $name,  $subtype,  $subname) 
static

Arguments

$type

$name

$subtype

$subname

Casts one object type to another object type

cast( $source,  $destinationtype) : mixed
static
static

Arguments

$source

$destinationtype

Response

mixed

Return the amount properly formatted with the currency symbol

getCurrency( $amount,  $currency_type = ECOM_CURRENCY) : string
static
static

Arguments

$amount

$currency_type

Response

string

Return the appropriate currency symbol

getCurrencySymbol( $currency_type = ECOM_CURRENCY) : string
static
static

Arguments

$currency_type

Response

string

glob2keyedArray

glob2keyedArray( $workArray) 
static

Arguments

$workArray

Determines if the current version of PHP is equal to or greater than the supplied value

is_php( $version) : boolean
static

Arguments

$version

Response

boolean

TRUE if the current version is $version or higher

Use cUrl to get data from url

loadData( $url, boolean $ref = false, boolean $post = false) : mixed
static
static

Arguments

$url

$ref

boolean

$post

boolean

Response

mixed

Return an exponent location object with corrected module name

makeLocation(null $mod = null, null $src = null, null $int = null) : object
static
static

Arguments

$mod

null

$src

null

$int

null

Response

object

make an sef_name for specific model

makeSefUrl(string $title, string $model) : mixed|string
static

Arguments

$title

string

$model

string

Response

mixed|string

exdoc Generates and returns a string stating the current maximum accepted size of uploaded files. It intelligently parses the php.ini configuration, so that settings of 2K and 2048 are treated identically.

maxUploadSize() : string
static
node

Subsystems:expCore

Response

string

exdoc Generates and returns a message stating the current maximum accepted size of uploaded files.

maxUploadSizeMessage() : string
static
node

Subsystems:expCore

Response

string

resolveFilePaths

resolveFilePaths( $type,  $name,  $subtype,  $subname) 
static

Arguments

$type

$name

$subtype

$subname

save_csv

save_csv( $data,  $rpt_columns = array(),  $filename = 'report.csv') 
static

Arguments

$data

$rpt_columns

$filename

Use cUrl to save data from url to file (download)

saveData( $url,  $filename, boolean $ref = false, boolean $post = false) 
static
static

Arguments

$url

$filename

$ref

boolean

$post

boolean

exdoc This function checks a full URL against a set of known protocols (like http and https) and determines if the URL is valid. Returns true if the URL is valid, and false if otherwise.

URLisValid(string $url) : boolean
static
node

Subsystems:expCore

Arguments

$url

string

The URL to test for validity

Response

boolean