Upcoming Critical PHP Security Release

Yaf_Config_Simple::key

(Yaf >=1.0.0)

Yaf_Config_Simple::key — Get current entry key

Açıklama

public function Yaf_Config_Simple::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_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";
}
?>

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

application
database

Ayrıca Bakınız

+add a note

User Contributed Notes

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