Stud.IP  5.4
Result Class Reference

Public Member Functions

 __construct (Query $query)
 
 getResultPage ()
 
 hasMore ()
 
 getTotal ()
 

Data Fields

const FETCH_BUFFER_SIZE = 30
 

Detailed Description

This class is responsible for fetching and representing the results of a search using a Query instance.

GPL2 or any later version

Since
Stud.IP 4.1

Constructor & Destructor Documentation

◆ __construct()

__construct ( Query  $query)

Creates a new Result object using a Query and fetching results from the database.

Parameters
Query$querythe search query to use

Member Function Documentation

◆ getResultPage()

getResultPage ( )

Returns the current result page. The Query object associated with this instance is used to determince the slice of the results to be used as a page.

Returns
array an array of search results

◆ getTotal()

getTotal ( )

If we already evaluated all possible matches, returns the total number of all actual matches that the user may see.

Returns
int the number of all actual matches that the user may see
Exceptions
RuntimeExceptionif there could be more results
See also
hasMore

◆ hasMore()

hasMore ( )

Returns whether there COULD be more results.

Returns
bool true if there could be more results; false if all possible matches were already evaluated

Field Documentation

◆ FETCH_BUFFER_SIZE

const FETCH_BUFFER_SIZE = 30

The documentation for this class was generated from the following file: