Yaf_Config_Simple::rewind

Reset iterator to first entry

Description

public void Yaf_Config_Simple::rewind()

Rewinds the internal iterator to the first configuration entry.

Parameters

This function has no parameters.

Return Values

No value is returned.

Examples

Example #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";
?>

The above example will output something similar to:

database
application

See Also

  • Yaf_Config_Simple::current
  • Yaf_Config_Simple::key
  • Yaf_Config_Simple::next
  • Yaf_Config_Simple::valid