Prado\Data\DataGateway\TSqlCriteria::getOrdersBy PHP Метод

getOrdersBy() публичный Метод

public getOrdersBy ( ) : TAttributeCollection
Результат Prado\Collections\TAttributeCollection ordering clause.
    public function getOrdersBy()
    {
        return $this->_ordersBy;
    }

Usage Example

Пример #1
0
 /**
  * @param TSqlCriteria $criteria
  * @return integer number of records.
  */
 public function count($criteria)
 {
     if ($criteria === null) {
         return (int) $this->getBuilder()->createCountCommand()->queryScalar();
     }
     $where = $criteria->getCondition();
     $parameters = $criteria->getParameters()->toArray();
     $ordering = $criteria->getOrdersBy();
     $limit = $criteria->getLimit();
     $offset = $criteria->getOffset();
     $command = $this->getBuilder()->createCountCommand($where, $parameters, $ordering, $limit, $offset);
     $this->onCreateCommand($command, $criteria);
     return $this->onExecuteCommand($command, (int) $command->queryScalar());
 }