If optional extension parameter is set, returns only options specific for that extension.
Returns all the registered configuration options as an associative array. If optional extension parameter is set, returns only options specific for that extension.