Yaf_Config_Simple::rewind
PHP Manual
PHP Manual»Yaf_Config_Simple»Yaf_Config_Simple::rewind

Yaf_Config_Simple::rewind

(Yaf >=1.0.0)

Yaf_Config_Simple::rewind — Reset iterator to first entry

Beschreibung

public function Yaf_Config_Simple::rewind(): void

Rewinds the internal iterator to the first configuration entry.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

No value is returned.

Beispiele

Beispiel #1 Yaf_Config_Simple::rewind() example

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

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

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

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

database
application

Siehe auch

To Top