class Categories

Categories Class.

Properties

static Categories[] $instances Array to hold the object instances

Methods

__construct( array $options)

Class constructor

static  Categories|boolean
getInstance( string $extension, array $options = array())

Returns a reference to a Categories object

CategoryNode|null|boolean
get( mixed $id = 'root', boolean $forceload = false)

Loads a specific category and all its children in a CategoryNode object

string
getExtension()

Returns the extension of the category.

Details

__construct( array $options)

Class constructor

Parameters

array $options Array of options

static Categories|boolean getInstance( string $extension, array $options = array())

Returns a reference to a Categories object

Parameters

string $extension Name of the categories extension
array $options An array of options

Return Value

Categories|boolean Categories object on success, boolean false if an object does not exist

CategoryNode|null|boolean get( mixed $id = 'root', boolean $forceload = false)

Loads a specific category and all its children in a CategoryNode object

Parameters

mixed $id an optional id integer or equal to 'root'
boolean $forceload True to force the _load method to execute

Return Value

CategoryNode|null|boolean CategoryNode object or null if $id is not valid

string getExtension()

Returns the extension of the category.

Return Value

string The extension