Yaf_Config_Simple::next

(Yaf >=1.0.0)

Yaf_Config_Simple::next — Advance to next entry

Beschreibung

public function Yaf_Config_Simple::next(): void

Moves the internal iterator to the next configuration entry.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

No value is returned.

Beispiele

Beispiel #1 Yaf_Config_Simple::next() example

<?php
$config = new Yaf_Config_Simple([
    'application' => ['name' => 'MyApp'],
    'database'    => ['host' => 'localhost'],
]);

$config->rewind();
echo $config->key(), "\n";

$config->next();
echo $config->key(), "\n";

$config->next(); // past the last entry
var_dump($config->valid());
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

application
database
bool(false)

Siehe auch

+add a note

User Contributed Notes

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