PHP Class Elastica\Scroll

Inheritance: implements Iterator
Afficher le fichier Open project: ruflin/elastica Class Usage Examples

Méthodes publiques

Свойство Type Description
$expiryTime string

Protected Properties

Свойство Type Description
$_currentResultSet null | ResultSet
$_nextScrollId null | string
$_options array 0: scroll
1: scroll id
2: search type.
$_search Search

Méthodes publiques

Méthode Description
__construct ( Search $search, string $expiryTime = '1m' ) Constructor.
current ( ) : ResultSet Returns current result set.
key ( ) : string Returns scroll id.
next ( ) Next scroll search.
rewind ( ) Initial scroll search.
valid ( ) : boolean Returns true if current result set contains at least one hit.

Méthodes protégées

Méthode Description
_revertOptions ( ) Revert search options to previously saved state.
_saveOptions ( ) Save all search options manipulated by Scroll.
_setScrollId ( ResultSet $resultSet ) Prepares Scroll for next request.

Method Details

__construct() public méthode

Constructor.
public __construct ( Search $search, string $expiryTime = '1m' )
$search Search
$expiryTime string

_revertOptions() protected méthode

Revert search options to previously saved state.
protected _revertOptions ( )

_saveOptions() protected méthode

Save all search options manipulated by Scroll.
protected _saveOptions ( )

_setScrollId() protected méthode

Prepares Scroll for next request.
protected _setScrollId ( ResultSet $resultSet )
$resultSet ResultSet

current() public méthode

Returns current result set.
public current ( ) : ResultSet
Résultat ResultSet

key() public méthode

Returns scroll id.
public key ( ) : string
Résultat string

next() public méthode

Next scroll search.
public next ( )

rewind() public méthode

Initial scroll search.
public rewind ( )

valid() public méthode

Returns true if current result set contains at least one hit.
public valid ( ) : boolean
Résultat boolean

Property Details

$_currentResultSet protected_oe property

protected null|ResultSet,elastica $_currentResultSet
Résultat null | ResultSet

$_nextScrollId protected_oe property

protected null|string $_nextScrollId
Résultat null | string

$_options protected_oe property

0: scroll
1: scroll id
2: search type.
protected array $_options
Résultat array

$expiryTime public_oe property

public string $expiryTime
Résultat string