Yaf_Config_Simple::next
PHP function
Edit on GitHub ✎
(Yaf >=1.0.0)
Advance to next entry
Description
Yaf_Config_Simple::next(): void
Moves the internal iterator to the next configuration entry.
Parameters Parameters
Return Values
No value is returned.
Examples
Yaf_Config_Simple::next example
php
<?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());
?>The above example will output something similar to:
output
application
database
bool(false)See Also
Yaf_Config_Simple::currentYaf_Config_Simple::keyYaf_Config_Simple::rewindYaf_Config_Simple::valid