Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

MongoSort

Eduard Maximovich edited this page Nov 16, 2015 · 1 revision

MongoSort

luuk. 2015

  • Class name: MongoSort
  • Namespace:
  • Parent class: CSort

Constants

SORT_ASC

const SORT_ASC = \MongoDbCriteria::SORT_ASC

SORT_DESC

const SORT_DESC = \MongoDbCriteria::SORT_DESC

Properties

$descTag

public mixed $descTag = \MongoDbCriteria::SORT_DESC
  • Visibility: public

Methods

applyOrder

mixed MongoSort::applyOrder(\MongoDbCriteria $criteria)

Modifies the query criteria by changing its {@link CDbCriteria::order} property.

This method will use \directions to determine which columns need to be sorted. They will be put in the ORDER BY clause. If the criteria already has non-empty \CDbCriteria::order value, the new value will be appended to it.

  • Visibility: public

Arguments

getOrderBy

string MongoSort::getOrderBy(\MongoDbCriteria $criteria)
  • Visibility: public

Arguments

getModel

\MongoRecord MongoSort::getModel(string $className)

Given active record class name returns new model instance.

  • Visibility: protected

Arguments

  • $className string - <p>active record class name.</p>