class StackCollection implements Countable, Iterator (View source)

Holds a list of stacks.

Methods

__construct(array $stacks)

Constructor.

int
count()

Return the number of stacks in this collection.

Stack[]
getStacks()

Return the stacks.

static StackCollection
createFromJsonResponse(string|array $data, bool $isArray = false)

Create a stack from the JSON data returned by the rokka.io API.

current()

No description

next()

No description

key()

No description

valid()

No description

rewind()

No description

Details

__construct(array $stacks)

Constructor.

Parameters

array $stacks

Array of stacks

int count()

Return the number of stacks in this collection.

Return Value

int

Stack[] getStacks()

Return the stacks.

Return Value

Stack[]

static StackCollection createFromJsonResponse(string|array $data, bool $isArray = false)

Create a stack from the JSON data returned by the rokka.io API.

Parameters

string|array $data

JSON data

bool $isArray

If the data provided is already an array

Return Value

StackCollection

current()

No description

next()

No description

key()

No description

valid()

No description

rewind()

No description