PHP 8.6.0 Beta 3 is available for testing

Yaf_Config_Simple::valid

(Yaf >=1.0.0)

Yaf_Config_Simple::validCheck if current position is valid

Açıklama

public function Yaf_Config_Simple::valid(): bool

Checks whether the current iterator position is valid.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

Returns true if the current position is valid, false otherwise.

Örnekler

Örnek 1 Yaf_Config_Simple::valid() example

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

$config->rewind();
var_dump($config->valid());

$config->next();
var_dump($config->valid());

$config->next(); // past the last entry
var_dump($config->valid());
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

bool(true)
bool(true)
bool(false)

Ayrıca Bakınız

add a note

User Contributed Notes

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