Documentation

PhpFileLoader extends FileLoader
in package

PhpFileLoader loads configuration values from a PHP file.

The configuration values are expected to be in form of array. I.e. <?php return array( 'property1' => 'value1', ....................... );

Tags
author

Cristiano Cinotti cristianocinotti@gmail.com

Table of Contents

Methods

load()  : array<string|int, mixed>
Loads a PHP file.
supports()  : bool
Returns true if this class supports the given resource.

Methods

load()

Loads a PHP file.

public load(mixed $resource[, string|null $type = null ]) : array<string|int, mixed>
Parameters
$resource : mixed

The resource to load.

$type : string|null = null

The resource type.

Tags
throws
ConfigurationBuilderException
psalm-suppress

UnresolvableInclude $path contains a path resolved by FileLocator

Return values
array<string|int, mixed>

supports()

Returns true if this class supports the given resource.

public supports(mixed $resource[, string|null $type = null ]) : bool

It supports both .php and .inc extensions.

Parameters
$resource : mixed

A resource.

$type : string|null = null

The resource type.

Return values
bool

true if this class supports the given resource, false otherwise.


        
On this page

Search results