A set of arbitrary data returned from a graph query. It is iterable and indexable.

See Also:

Implements

  • Iterator
  • ArrayAccess

Methods

int

count

( )

Gets the number of results contained in the result set.

Returns:
Type Details
int

The number of results.

null

rewind

( )

Resets the intenal iterator of the result set to the beginning.

Returns:
Type Details
null
mixed

current

( )

Gets the current value at the current position of the internal iterator.

Returns:
Type Details
mixed
int string

key

( )

Gets the current key or offset of the current position of the internal iterator;

Returns:
Type Details
int|string
null

next

( )

Moves the internal iterator to the next position.

Returns:
Type Details
null
bool

valid

( )

Determines if the internal iterator points to a valid position in the result set.

Returns:
Type Details
bool

Returns true if the internal iterator is valid.

bool

offsetExists

( int $offset )

Determines if a result exists at an offset.

Parameters:
Name Type Details
$offset int

An integer offset into the result set.

Returns:
Type Details
bool

Returns true if the offset is valid.

Graph\Result

offsetGet

( int $offset )

Gets a result at the provided offset.

Parameters:
Name Type Details
$offset int

An integer offset into the result set.

Returns:
Type Details
Graph\Result

A graph result.

mixed

offsetSet

( mixed $offset, mixed $value )

Not implmented. The result set is read-only.

Parameters:
Name Type Details
$offset mixed
$value mixed
Returns:
Type Details
mixed
mixed

offsetUnset

( mixed $offset )

Not implmented. The result set is read-only.

Parameters:
Name Type Details
$offset mixed
Returns:
Type Details
mixed
Graph\Result

first

( )

Gets the first result in the result set.

Returns:
Type Details
Graph\Result

The first result.