PHP 8.6.0 Beta 3 is available for testing

Yaf_Config_Ini::readonly

(Yaf >=1.0.0)

Yaf_Config_Ini::readonlyCheck if configuration is read-only

Beschreibung

public function Yaf_Config_Ini::readonly(): bool

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

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

Always returns true.

Beispiele

Beispiel #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'));
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

bool(true)
bool(false)

Siehe auch

add a note

User Contributed Notes

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