PHP 8.6.0 Beta 3 is available for testing

Yaf_Config_Simple::toArray

(Yaf >=1.0.0)

Yaf_Config_Simple::toArrayExport configuration as array

Açıklama

public function Yaf_Config_Simple::toArray(): array

Returns the entire configuration as a plain PHP array.

Bağımsız Değişkenler

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

Dönen Değerler

The configuration data as an array.

Örnekler

Örnek 1 Yaf_Config_Simple::toArray() example

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

print_r($config->toArray());
?>

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

Array
(
    [application] => Array
        (
            [name] => MyApp
        )

    [database] => Array
        (
            [host] => localhost
            [port] => 3306
        )

)

Ayrıca Bakınız

add a note

User Contributed Notes

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