Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Yaf_Config_Simple::countYaf_Config_Simple::get>
^Yaf_Config_SimpleLast updated: Mon, 26 Oct 2026

Yaf_Config_Simple::current

(Yaf >=1.0.0)

Yaf_Config_Simple::current — Get current entry value

Description

public function Yaf_Config_Simple::current(): mixed

Returns the value of the current configuration entry during iteration. Array values are wrapped in a Yaf_Config_Abstract object.

Parameters

This function has no parameters.

Return Values

The value of the current entry, or false if the position is invalid.

Examples

Example #1 Yaf_Config_Simple::current() example

<?php
$config = new Yaf_Config_Simple([
    'application' => ['name' => 'MyApp'],
    'version'     => '1.0',
]);

$config->rewind();
while ($config->valid()) {
    $value = $config->current();
    if ($value instanceof Yaf_Config_Abstract) {
        echo $config->key(), " => <config node>\n";
    } else {
        echo $config->key(), " => ", $value, "\n";
    }
    $config->next();
}
?>

The above example will output something similar to:

application => <config node>
version => 1.0

See Also


<Yaf_Config_Simple::countYaf_Config_Simple::get>
^Yaf_Config_SimpleLast updated: Mon, 26 Oct 2026