xPDO.getOption
xPDO::getOption
Get an xPDO configuration option value by key.
Syntax
API Docs: http://api.modxcms.com/xpdo/xPDO.html#getOption
mixed getOption (string $key, [array $options = null], [mixed $default = null])
Examples
Get the table prefix:
$tablePrefix = $xpdo->getOption(xPDO_OPT_TABLE_PREFIX);
Get an option from a user-specified array, and if not set, check for it in $xpdo->config. If it's not set there, return false as its default value:
$mySetting = $xpdo->getOption('my_setting',$myConfig,false);
See Also
Suggest an edit to this page on GitHub (Requires GitHub account. Opens a new window/tab).