Yaf_Config_Ini::readonly
PHP function
Edit on GitHub ✎
(Yaf >=1.0.0)
Check if configuration is read-only
Description
Yaf_Config_Ini::readonly(): bool
Checks whether the configuration is read-only. Yaf_Config_Ini is always read-only.
Parameters Parameters
Return Values
Always returns true.
Examples
Yaf_Config_Ini::readonly example
php
<?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:
output
bool(true)
bool(false)See Also
Yaf_Config_Ini::set