Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
SearchAdaptor Class Reference

Public Member Functions

 __construct ($term, $params=array(), $usePersonalization=false)
 fetchNext ()
 existsMore ()

Public Attributes

 $pageNumber
 $pageSize
 $searchApi

Protected Member Functions

 fetchPortion ()

Detailed Description

Definition at line 6 of file SearchAdaptor.php.

Member Function Documentation

SearchAdaptor::fetchNext ( )

Get current page results

Returns
array

Definition at line 50 of file SearchAdaptor.php.

{
while((count($this->_filteredResults) < $this->pageSize * $this->pageNumber) && $this->existsMore()){
$portion = $this->fetchPortion();
if($portion === false){
return array();
} else {
$this->_filteredResults =array_merge($this->_filteredResults, $portion) ;
}
}
$next = array_slice($this->_filteredResults, $this->pageSize * $this->pageNumber - $this->pageSize, $this->pageSize);
return $next;
}

Member Data Documentation

SearchAdaptor::$pageNumber

Number of page

int

Definition at line 13 of file SearchAdaptor.php.

SearchAdaptor::$pageSize

Items per page

int

Definition at line 20 of file SearchAdaptor.php.


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