Prado\Data\DataGateway\TSqlCriteria::getLimit PHP Method

getLimit() public method

public getLimit ( ) : integer
return integer maximum number of records to return.
    public function getLimit()
    {
        return $this->_limit;
    }

Usage Example

 /**
  * @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());
 }