PHP Class Matrix

Inheritance: extends Prefab
Show file Open project: bcosca/fatfree-core Class Usage Examples

Public Methods

Method Description
calendar ( $date = 'now', $first ) : array Return month calendar of specified date, with optional setting for first day of week (0 for Sunday)
changekey ( array &$var, $old, $new ) : null Change the key of a two-dimensional array element
pick ( array $var, $col ) : array Retrieve values from a specified column of a multi-dimensional array variable
sort ( array &$var, $col, $order = SORT_ASC ) : boolean Sort a multi-dimensional array variable on a specified column
transpose ( array &$var ) : null Rotate a two-dimensional array variable

Method Details

calendar() public method

Return month calendar of specified date, with optional setting for first day of week (0 for Sunday)
public calendar ( $date = 'now', $first ) : array
$date string
$first int
return array

changekey() public method

Change the key of a two-dimensional array element
public changekey ( array &$var, $old, $new ) : null
$var array array
$old string
$new string
return null

pick() public method

Retrieve values from a specified column of a multi-dimensional array variable
public pick ( array $var, $col ) : array
$var array array
$col mixed
return array

sort() public method

Sort a multi-dimensional array variable on a specified column
public sort ( array &$var, $col, $order = SORT_ASC ) : boolean
$var array array
$col mixed
$order int
return boolean

transpose() public method

Rotate a two-dimensional array variable
public transpose ( array &$var ) : null
$var array array
return null