Yaf_Config_Ini::key
PHP Manual
PHP Manual»Yaf_Config_Ini»Yaf_Config_Ini::key

Yaf_Config_Ini::key

(Yaf >=1.0.0)

Yaf_Config_Ini::key — Get current entry key

Açıklama

public function Yaf_Config_Ini::key(): mixed

Returns the key of the current configuration entry during iteration.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

The key of the current entry (string or integer), or false if the position is invalid.

Örnekler

Örnek 1 Yaf_Config_Ini::key() example

<?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";
}
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

application
version

Ayrıca Bakınız

To Top