php8.5
Home/ Manual/ yaf / yaf_config_simple/ Yaf_Config_Simple::readonly

Yaf_Config_Simple::readonly

PHP function Edit on GitHub ✎

(Yaf >=1.0.0)

Check if configuration is read-only

Description

Yaf_Config_Simple::readonly(): bool

Checks whether the configuration is read-only.

Parameters Parameters

Return Values

Returns true if the configuration is read-only, false otherwise.

Examples

Yaf_Config_Simple::readonly example

php
<?php
$writable = new Yaf_Config_Simple(['env' => 'development']);
var_dump($writable->readonly());

$frozen = new Yaf_Config_Simple(['env' => 'development'], true);
var_dump($frozen->readonly());
?>

The above example will output something similar to:

output
bool(false)
bool(true)

See Also

  • Yaf_Config_Simple::set

Source: reference/yaf/yaf_config_simple/readonly.xml · from the official PHP manual (php/doc-en)