public function FrxReport::setSort in Forena Reports 7.4
1 call to FrxReport::setSort()
- FrxReport::sort in ./
FrxReport.inc - Sort the current data context if it is an array.
File
- ./
FrxReport.inc, line 743 - Basic report provider. Controls the rendering of the report.
Class
Code
public function setSort($sort, $compare_type = '') {
if (!$compare_type) {
if (defined(SORT_NATURAL)) {
$compare_type = SORT_NATURAL;
}
}
else {
if (is_string($compare_type)) {
if (defined($compare_type)) {
$compare_type = constant($compare_type);
}
else {
$compare_type = SORT_REGULAR;
}
}
}
$this->compareType = $compare_type;
// Assume an array of sort algorithms
if (is_array($sort)) {
$this->sortCriteria = $sort;
}
else {
$this->sortCriteria = (array) $sort;
}
}