appserver-io/configuration

Provides basic functionality to handle XML data in a tree structure, like SimpleXML does.

3.0.0 2018-04-23 18:37 UTC

This package is auto-updated.

Last update: 2024-10-27 07:29:38 UTC


README

Latest Stable Version Total Downloads License Build Status Scrutinizer Code Quality Code Coverage

Introduction

This package provides generic XML handling functionality, designed to work in an application server like appserver.io. The configuration contains the XML structure in a simple object structure that makes it synchronziable between threads.

Issues

In order to bundle our efforts we would like to collect all issues regarding this package in the main project repository's issue tracker. Please reference the originating repository as the first element of the issue title e.g.: [appserver-io/<ORIGINATING_REPO>] A issue I am having

Usage

As described in the introduction the configuration is originally designed to work in a runtime environment like appserver.io provides it. The big advantage is, that it does not contain any not synchronizable instances which allows you to share it between threads.

The configuration needs a XML file, the structure is not important, and converts it into an object structure:

// initialize the configuration with the content XML configuration file
$configuration = new Configuration();
$configuration->initFromFile('/your/file.xml');

// add a new node XML to the root node 
$configuration->addChildWithNameAndValue('baseDirectory', '/application/base/directory');

External Links