PHP Class KGzocha\Searcher\Criteria\Adapter\MappedOrderByAdapter

Fields map key should be a value that will be visible to end-user. Fields map value will be visible to developer. To get "mapped" value (for end-user) just use getOrderBy() To get "real" value (for developer) use getMappedOrderBy().
Author: Krzysztof Gzocha ([email protected])
Inheritance: implements KGzocha\Searcher\Criteria\OrderByCriteriaInterface
ファイルを表示 Open project: krzysztof-gzocha/searcher

Public Methods

Method Description
__construct ( KGzocha\Searcher\Criteria\OrderByCriteriaInterface $orderBy, array | ArrayAccess $fieldsMap )
getFieldsMap ( ) : array | ArrayAccess
getMappedOrderBy ( ) : string | null
getOrderBy ( )
setOrderBy ( $orderBy )
shouldBeApplied ( )

Private Methods

Method Description
checkFieldsMapType ( mixed $fieldsMap )
rawValueExistsInFieldsMap ( ) : boolean

Method Details

__construct() public method

public __construct ( KGzocha\Searcher\Criteria\OrderByCriteriaInterface $orderBy, array | ArrayAccess $fieldsMap )
$orderBy KGzocha\Searcher\Criteria\OrderByCriteriaInterface
$fieldsMap array | ArrayAccess keys will be visible to user, values to CriteriaBuilder

getFieldsMap() public method

public getFieldsMap ( ) : array | ArrayAccess
return array | ArrayAccess

getMappedOrderBy() public method

public getMappedOrderBy ( ) : string | null
return string | null Returns null if user will enter value that is not in fieldsMap

getOrderBy() public method

public getOrderBy ( )

setOrderBy() public method

public setOrderBy ( $orderBy )

shouldBeApplied() public method

public shouldBeApplied ( )