Dutch PHP Conference 2027

Yaf_Config_Ini::next

(Yaf >=1.0.0)

Yaf_Config_Ini::nextAdvance to next entry

Description

public function Yaf_Config_Ini::next(): void

Moves the internal iterator to the next configuration entry.

Parameters

This function has no parameters.

Return Values

No value is returned.

Examples

Example #1 Yaf_Config_Ini::next() example

<?php
/**
 * Assume /etc/myapp/application.ini contains:
 * [common]
 * application.name = "MyApp"
 * version          = "1.0"
 */
$config = new Yaf_Config_Ini('/etc/myapp/application.ini', 'common');

$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:

application
version
bool(false)

See Also

add a note

User Contributed Notes

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