# BreadcrumbInterface

Chevere\Interfaces\Iterator\BreadcrumbInterface

view source (opens new window)

# Extends

# Description

Describe a general purpose iterator companion.

# Methods

# has

Indicates whether the instance has the given position.

Parameters

  • pos: int

Return

bool


# pos

Returns the current breadcrumb position.

Return

int


# withAddedItem

Return an instance with the specified added item.

Parameters

  • item: string

Return

self

This method MUST retain the state of the current instance, and return an instance that contains the specified added item.


# withRemovedItem

Return an instance with the specified pos removed.

Parameters

  • pos: int

Return

self

This method MUST retain the state of the current instance, and return an instance that contains the specified pos removed.


# toArray

Returns an array representation of the object.

Return

array

return [0 => 'item',];

# toString

Returns an string representation of the object.

Return

string

return '[item0][item1][itemN]...[itemN+1]';

Last Updated: 5/1/2021, 2:31:10 PM