Arbitrary data returned from a graph query. It can respresent several primitive types as well as composite types and graph elements.

See Also:

Implements

  • Iterator
  • ArrayAccess

Methods

string

__toString

( )

Gets the string representation of the contained data.

Returns:
Type Details
string

A string representation of the data.

int

count

( )

Gets the number of elements in the result if it is a composite types such as an array or object.

Returns:
Type Details
int

The number of elements.

null

rewind

( )

Resets the internal iterator of this result if it is a composite type such as an array or object.

Returns:
Type Details
null
Graph\Result

current

( )

Gets the element of the composite result at the current position of the iterator.

Returns:
Type Details
Graph\Result

The current element.

string

key

( )

Gets the key of an object result at the current posistion of the iterator.

Returns:
Type Details
string

The current key.

null

next

( )

Moves the iterator to the next position if a composite result such as an array or object.

Returns:
Type Details
null
bool

valid

( )

Determines if the iterator is currently in a valid position.

Returns:
Type Details
bool

true if the current iterator position is valid.

bool

offsetExists

( mixed $offset )

Determines if an offset is contained in the result. Only valid for an array or object.

Parameters:
Name Type Details
$offset int|string

An integer offset for array or a string key for objects.

Returns:
Type Details
bool

Returns true if the offset or key is valid.

mixed

offsetGet

( Graph\Result $offset )

Gets the value contained at an offset. Only valid for an array or object.

Parameters:
Name Type Details
$offset Graph\Result

The value at the offset.

Returns:
Type Details
mixed
mixed

offsetSet

( mixed $offset, mixed $value )

Not implmented. The result is read-only.

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

offsetUnset

( mixed $offset )

Not implmented. The result is read-only.

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

isNull

( )

Determines if the result is a null value.

Returns:
Type Details
bool

Returns true if the result is a null.

bool

isValue

( )

Determines if the result is not a composite value like an array or object.

Returns:
Type Details
bool

Returns true if the result is not an array or object.

bool

isArray

( )

Determines if the result is an array.

Returns:
Type Details
bool

Returns true if the result is an array.

bool

isObject

( )

Determines if the result is an object.

Returns:
Type Details
bool

Returns true if the result is an object.

bool

isBool

( )

Determines if the result is a bool.

Returns:
Type Details
bool

Returns true if the result is a bool.

bool

isNumber

( )

Determines if the value is an integer or a double.

Returns:
Type Details
bool

Returns true if the result is an integer or a double.

bool

isString

( )

Determines if the value is a string.

Returns:
Type Details
bool

Returns true if the result is a string.

mixed

value

( )

Gets the PHP value contained in the result.

Returns:
Type Details
mixed

The value.

bool

asInt

( )

Determines if the result is a integer.

Returns:
Type Details
bool

Returns true if the result is an integer.

bool

asBool

( )

Converts the result’s value to a bool.

Returns:
Type Details
bool

A bool representation of the result’s value.

double

asDouble

( )

Converts the result’s value to a double.

Returns:
Type Details
double

A double representation of the result’s value.

string

asString

( )

Converts the result’s value to a string.

Returns:
Type Details
string

A string representation of the result’s value.

Graph\Edge

asEdge

( )

Converts an object result to an edge.

Throws:
Type Details
Exception\DomainException
Returns:
Type Details
Graph\Edge

A graph edge.

Graph\Path

asPath

( )

Converts an object result to a path.

Throws:
Type Details
Exception\DomainException
Returns:
Type Details
Graph\Path

A graph path.

Grap\Vertex

asVertex

( )

Converts an object result to a vertex.

Throws:
Type Details
Exception\DomainException
Returns:
Type Details
Grap\Vertex

A graph vertex.

Dse\Point

asPoint

( )

Converts a string result to the point geospatial type. This expects the string to be in the well-known text (WKT) representation.

Throws:
Type Details
Exception\DomainException
Returns:
Type Details
Dse\Point

A geospatial point value.

Dse\LineString

asLineString

( )

Converts a string result to the line string geospatial type. This expects the string to be in the well-known text (WKT) representation.

Throws:
Type Details
Exception\DomainException
Returns:
Type Details
Dse\LineString

A geospatial line string value.

Dse\Polygon

asPolygon

( )

Converts a string result to the polygon geospatial type. This expects the string to be in the well-known text (WKT) representation.

Throws:
Type Details
Exception\DomainException
Returns:
Type Details
Dse\Polygon

A geospatial polygon value.