Function __global->get_option

Definitions

sources/config.php

  • Find the value of the specified configuration option.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$name ID_TEXT No No required parameter N/A N/A The name of the option
$missing_ok boolean No No False N/A N/A Where to accept a missing option (and return null)

Returns

  • The value (null: means either disabled option, or no option found while $missing_ok set)
  • Type: ?SHORT_TEXT
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find the value of the specified configuration option.
 *
 * @param  ID_TEXT $name The name of the option
 * @param  boolean $missing_ok Where to accept a missing option (and return null)
 * @return ?SHORT_TEXT The value (null: means either disabled option, or no option found while $missing_ok set)
 */

function get_option(string $name, bool $missing_ok = false) : ?string