PHP 8.5.10 Released!

Yaf_Config_Ini::readonly

(Yaf >=1.0.0)

Yaf_Config_Ini::readonlyCheck if configuration is read-only

Description

public function Yaf_Config_Ini::readonly(): bool

Checks whether the configuration is read-only. Yaf_Config_Ini is always read-only.

Parameters

This function has no parameters.

Return Values

Always returns true.

Examples

Example #1 Yaf_Config_Ini::readonly() example

<?php
$config = new Yaf_Config_Ini('/etc/myapp/application.ini', 'common');

// Yaf_Config_Ini is always read-only
var_dump($config->readonly());

// Attempts to write are rejected (and a warning is emitted)
var_dump($config->set('version', '2.0'));
?>

The above example will output something similar to:

bool(true)
bool(false)

See Also

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top