\acdhOeaw\utilRepoConfig

Provides access to repository configuration properties in a form of a singleton object.

Summary

Methods
Properties
Constants
init()
get()
set()
idProp()
idNmsp()
titleProp()
locProp()
relProp()
vocabsNmsp()
askForUserConfirmation()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$config
N/A

Properties

$config

$config : \zozlak\util\Config

Type

\zozlak\util\Config

Methods

init()

init(string  $configFile) 

Parses a configuration file.

Parameters

string $configFile

path to the ini file storing configuration

get()

get(string  $property, boolean  $noException = false) : mixed

Returns given configuration property value.

If property is not set, throws an error.

Property value can be a literal as well as an composed object (e.g. array depending on the parsed ini file content).

Parameters

string $property

configuration property name

boolean $noException

should exception be avoided when property is not defined?

Throws

\InvalidArgumentException

Returns

mixed —

configuration property value

set()

set(string  $property, mixed  $value) 

Sets a given configuration property value.

The value is change only in the running script. The change is not propagated to the source configuration file.

Parameters

string $property

configuration property name

mixed $value

value to set

idProp()

idProp() : string

Shorthand method for getting fedoraIdProp configuration property value.

Returns

string

idNmsp()

idNmsp() : string

Shorthand method for getting fedoraIdNamespace configuration property value.

Returns

string

titleProp()

titleProp() : string

Shorthand method for getting fedoraTitleProp configuration property value.

Returns

string

locProp()

locProp() : string

Shorthand method for getting fedoraLocProp configuration property value.

Returns

string

relProp()

relProp() : string

Shorthand method for getting fedoraRelProp configuration property value.

Returns

string

vocabsNmsp()

vocabsNmsp() : string

Shorthand method for getting fedoraVocabsNamespace configuration property value.

Returns

string

askForUserConfirmation()

askForUserConfirmation(boolean  $throwException = false) : boolean

Displays Fedora and SPARQL endpoint URLs to the user and asks for confirmation.

Parameters

boolean $throwException

should an exception be thrown on lack of confirmation?

Returns

boolean