(Yaf >=1.0.0)
Yaf_Config_Simple::key — Get current entry key
Returns the key of the current configuration entry during iteration.
Diese Funktion besitzt keine Parameter.
The key of the current entry (string or integer), or false if the position is invalid.
Beispiel #1 Yaf_Config_Simple::key() example
<?php
$config = new Yaf_Config_Simple([
'application' => ['name' => 'MyApp'],
'database' => ['host' => 'localhost'],
]);
for ($config->rewind(); $config->valid(); $config->next()) {
echo $config->key(), "\n";
}
?>Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
application database