Function __global->set_option

Definitions

sources/config2.php

  • Set a configuration option with the specified values.Note that you may wish to also empty the template cache after running this function. Config options may have been set into template(s).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

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 value
$value LONG_TEXT No No required parameter N/A N/A The value
$will_be_formally_set BINARY No No 1 N/A N/A Whether this was an intentionally-set value; if we set it to zero we are saying that we are only setting this value for performance purposes, to its default value
$ob ?object No No Null N/A N/A The config hook responsible for this option (null: fetch it ourselves)

Preview

Code (PHP)

/**
 * Set a configuration option with the specified values.Note that you may wish to also empty the template cache after running this function. Config options may have been set into template(s).
 *
 * @param  ID_TEXT $name The name of the value
 * @param  LONG_TEXT $value The value
 * @param  BINARY $will_be_formally_set Whether this was an intentionally-set value; if we set it to zero we are saying that we are only setting this value for performance purposes, to its default value
 * @param  ?object $ob The config hook responsible for this option (null: fetch it ourselves)
 */

function set_option(string $name, string $value, int $will_be_formally_set = 1, ?object $ob = null)