PHP Class Elastica\Scroll

Inheritance: implements Iterator
Mostrar archivo Open project: ruflin/elastica Class Usage Examples

Public Properties

Property Type Description
$expiryTime string

Protected Properties

Property Type Description
$_currentResultSet null | ResultSet
$_nextScrollId null | string
$_options array 0: scroll
1: scroll id
2: search type.
$_search Search

Public Methods

Method 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.

Protected Methods

Method 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 method

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

_revertOptions() protected method

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

_saveOptions() protected method

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

_setScrollId() protected method

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

current() public method

Returns current result set.
public current ( ) : ResultSet
return ResultSet

key() public method

Returns scroll id.
public key ( ) : string
return string

next() public method

Next scroll search.
public next ( )

rewind() public method

Initial scroll search.
public rewind ( )

valid() public method

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

Property Details

$_currentResultSet protected_oe property

protected null|ResultSet,elastica $_currentResultSet
return null | ResultSet

$_nextScrollId protected_oe property

protected null|string $_nextScrollId
return null | string

$_options protected_oe property

0: scroll
1: scroll id
2: search type.
protected array $_options
return array

$expiryTime public_oe property

public string $expiryTime
return string