Encapsulates a set of lines, characterized by a sequence of Dse\Point‘s in the xy-plane. It corresponds to the org.apache.cassandra.db.marshal.LineStringType column type in DSE.

See Also:

Extends

Methods

__construct

( array $points )

Construct a Dse\LineString with some Dse\Point‘s.

To create an empty Dse\LineString:

$lineString = new Dse\LineString();

To create with some points on the fly:

$p1 = new Dse\Point(2, 3);
$p2 = new Dse\Point(4, 5);
$lineString = new Dse\LineString($p1, $p2);

To create with an array of points by unrolling into varargs:

$points = [new Dse\Point(2, 3), new Dse\Point(4, 5)];
$lineString = new Dse\LineString(...$points);
Parameters:
Name Type Details
$points array

varargs-style array of Dse\Point‘s

Type\Custom

type

( )

The type of this value.

Returns:
Type Details
Type\Custom

the custom type for Dse\LineString

array

points

( )
Returns:
Type Details
array

Points that constitute this Dse\LineString

Dse\Point

point

( int $index )
Parameters:
Name Type Details
$index int

index of the desired Dse\Point in this Dse\LineString

Returns:
Type Details
Dse\Point

the index’th Dse\Point in this Dse\LineString; null if there is no such element

string

wkt

( )
Returns:
Type Details
string

the well-known-text representation of this Dse\LineString

string

__toString

( )
Returns:
Type Details
string

a human-readable string representation of this Dse\LineString