AbstractBase
in package
implements
LoggerAwareInterface
Uses
LoggerAwareTrait
Hierarchy Tree Data Source (abstract base)
This is a base helper class for producing hierarchy Trees.
Tags
Interfaces, Classes, Traits and Enums
- LoggerAwareInterface
Table of Contents
- $collectionRoute : string
- Collection page route.
- $hierarchyDriver : AbstractBase
- Hierarchy driver
- $recordRoute : string
- Record page route.
- getCollectionRoute() : string
- Get collection page route.
- getJSON() : string
- Get JSON for the specified hierarchy ID.
- getRecordRoute() : string
- Get recordpage route.
- getXML() : string
- Get XML for the specified hierarchy ID.
- setHierarchyDriver() : AbstractBase
- Set the hierarchy driver
- supports() : bool
- Does this data source support the specified hierarchy ID?
- debug() : void
- Log a debug message.
- getHierarchyDriver() : AbstractBase
- Get the hierarchy driver
- log() : void
- Send a message to the logger.
- logError() : void
- Log an error message.
- logWarning() : void
- Log a warning message.
Properties
$collectionRoute
Collection page route.
protected
string
$collectionRoute
= 'collection'
$hierarchyDriver
Hierarchy driver
protected
AbstractBase
$hierarchyDriver
= null
$recordRoute
Record page route.
protected
string
$recordRoute
= 'record'
Methods
getCollectionRoute()
Get collection page route.
public
getCollectionRoute() : string
Return values
string —getJSON()
Get JSON for the specified hierarchy ID.
public
abstract getJSON(string $id[, array<string|int, mixed> $options = [] ]) : string
Build the JSON file from the Solr fields
Parameters
- $id : string
-
Hierarchy ID.
- $options : array<string|int, mixed> = []
-
Additional options for JSON generation. (Currently one option is supported: 'refresh' may be set to true to bypass caching).
Return values
string —getRecordRoute()
Get recordpage route.
public
getRecordRoute() : string
Return values
string —getXML()
Get XML for the specified hierarchy ID.
public
abstract getXML(string $id[, array<string|int, mixed> $options = [] ]) : string
Parameters
- $id : string
-
Hierarchy ID.
- $options : array<string|int, mixed> = []
-
Additional options for XML generation.
Return values
string —setHierarchyDriver()
Set the hierarchy driver
public
setHierarchyDriver(AbstractBase $driver) : AbstractBase
Parameters
- $driver : AbstractBase
-
Hierarchy driver
Return values
AbstractBase —supports()
Does this data source support the specified hierarchy ID?
public
abstract supports(string $id) : bool
Parameters
- $id : string
-
Hierarchy ID.
Return values
bool —debug()
Log a debug message.
protected
debug(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —getHierarchyDriver()
Get the hierarchy driver
protected
getHierarchyDriver() : AbstractBase
Tags
Return values
AbstractBase —log()
Send a message to the logger.
protected
log(string $level, string $message[, array<string|int, mixed> $context = [] ][, bool $prependClass = false ]) : void
Parameters
- $level : string
-
Log level
- $message : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = false
-
Prepend class name to message?
Return values
void —logError()
Log an error message.
protected
logError(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —logWarning()
Log a warning message.
protected
logWarning(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?