class Pathway

Class to maintain a pathway.

The user's navigated path within the application.

Methods

__construct( array $options = array())

Class constructor

static  Pathway
getInstance( string $client, array $options = array())

Returns a Pathway object

array
getPathway()

Return the Pathway items array

array
setPathway( array $pathway)

Set the Pathway items array.

array
getPathwayNames()

Create and return an array of the pathway names.

boolean
addItem( string $name, string $link = '')

Create and add an item to the pathway.

boolean
setItemName( integer $id, string $name)

Set item name.

Details

__construct( array $options = array())

Class constructor

Parameters

array $options The class options.

static Pathway getInstance( string $client, array $options = array())

Returns a Pathway object

Parameters

string $client The name of the client
array $options An associative array of options

Return Value

Pathway A Pathway object.

Exceptions

RuntimeException

array getPathway()

Return the Pathway items array

Return Value

array Array of pathway items

array setPathway( array $pathway)

Set the Pathway items array.

Parameters

array $pathway An array of pathway objects.

Return Value

array The previous pathway data.

array getPathwayNames()

Create and return an array of the pathway names.

Return Value

array Array of names of pathway items

boolean addItem( string $name, string $link = '')

Create and add an item to the pathway.

Parameters

string $name The name of the item.
string $link The link to the item.

Return Value

boolean True on success

boolean setItemName( integer $id, string $name)

Set item name.

Parameters

integer $id The id of the item on which to set the name.
string $name The name to set.

Return Value

boolean True on success