Yaf_Config_Ini::key
PHP function
Edit on GitHub ✎
(Yaf >=1.0.0)
Get current entry key
Description
Yaf_Config_Ini::key(): mixed
Returns the key of the current configuration entry during iteration.
Parameters Parameters
Return Values
The key of the current entry (string or integer), or false if the position is invalid.
Examples
Yaf_Config_Ini::key example
php
<?php
/**
* Assume /etc/myapp/application.ini contains:
* [common]
* application.name = "MyApp"
* version = "1.0"
*/
$config = new Yaf_Config_Ini('/etc/myapp/application.ini', 'common');
for ($config->rewind(); $config->valid(); $config->next()) {
echo $config->key(), "\n";
}
?>The above example will output something similar to:
output
application
versionSee Also
Yaf_Config_Ini::currentYaf_Config_Ini::nextYaf_Config_Ini::rewindYaf_Config_Ini::valid