PHP 클래스 Piwik\Metrics\Sorter

파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Config $config )
getBestSortFlags ( DataTable $table, string | integer $columnToSort ) : integer
getPrimaryColumnToSort ( DataTable $table, string | integer $columnToSort ) : integer Detect the column to be used for sorting
getPrimarySortOrder ( string $order ) : integer
getSecondaryColumnToSort ( Row $row, integer | string $primaryColumnToSort ) : integer Detect the secondary sort column to be used for sorting
getSecondarySortOrder ( string $order, string | integer $secondarySortColumn ) : integer
sort ( DataTable $table ) Sorts the DataTable rows using the supplied callback function.

비공개 메소드들

메소드 설명
getColumnValue ( Row $row )
getStringSortFlags ( )

메소드 상세

__construct() 공개 메소드

public __construct ( Config $config )
$config Piwik\Metrics\Sorter\Config

getBestSortFlags() 공개 메소드

public getBestSortFlags ( DataTable $table, string | integer $columnToSort ) : integer
$table Piwik\DataTable
$columnToSort string | integer A column name or column id. Make sure that column actually exists in the row. You might want to get a valid column via {@link getPrimaryColumnToSort()} or {@link getSecondaryColumnToSort()}
리턴 integer

getPrimaryColumnToSort() 공개 메소드

Detect the column to be used for sorting
public getPrimaryColumnToSort ( DataTable $table, string | integer $columnToSort ) : integer
$table Piwik\DataTable
$columnToSort string | integer column name or column id
리턴 integer

getPrimarySortOrder() 공개 메소드

public getPrimarySortOrder ( string $order ) : integer
$order string 'asc' or 'desc'
리턴 integer

getSecondaryColumnToSort() 공개 메소드

Detect the secondary sort column to be used for sorting
public getSecondaryColumnToSort ( Row $row, integer | string $primaryColumnToSort ) : integer
$row Piwik\DataTable\Row
$primaryColumnToSort integer | string
리턴 integer

getSecondarySortOrder() 공개 메소드

public getSecondarySortOrder ( string $order, string | integer $secondarySortColumn ) : integer
$order string 'asc' or 'desc'
$secondarySortColumn string | integer column name or column id
리턴 integer

sort() 공개 메소드

Sorts the DataTable rows using the supplied callback function.
public sort ( DataTable $table )
$table Piwik\DataTable The table to sort.