Documentation

XmlFileLoader extends FileLoader
in package

XmlFileLoader loads configuration parameters from xml file.

Tags
author

Cristiano Cinotti cristianocinotti@gmail.com

Table of Contents

Properties

$converter  : Converter
The xml converter object.

Methods

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

Properties

$converter

The xml converter object.

private Converter $converter

Methods

__construct()

public __construct(FileLocatorInterface $fileLocator[, bool $keepFirstTag = false ]) : mixed
Parameters
$fileLocator : FileLocatorInterface
$keepFirstTag : bool = false

load()

Loads a Xml file.

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

The resource to load.

$type : string|null = null

The resource type.

Tags
throws
ConverterException

If an error occurs while parsing the xml.

ConfigurationBuilderException

If an error occurs while reading the xml file.

Return values
array<int|string, mixed>

supports()

Returns true if this class supports the given resource.

public supports(mixed $resource[, string|null $type = null ]) : bool
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