PHPackages                             devtoolboxuk/engrafo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. devtoolboxuk/engrafo

ActiveLibrary

devtoolboxuk/engrafo
====================

File Library

1.1.7(5y ago)04.8k1MITPHPPHP &gt;=5.4.16

Since Feb 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/devtoolboxuk/engrafo)[ Packagist](https://packagist.org/packages/devtoolboxuk/engrafo)[ RSS](/packages/devtoolboxuk-engrafo/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (3)Versions (19)Used By (1)

Engrafo
=======

[](#engrafo)

Basic file read / write service for CSV, JSON and XML. Write Service writes a file from an Array, and the read service reads a file to an Array

[![Total Downloads](https://camo.githubusercontent.com/29d367914eebc4dd9ab5997a5231294a273f0adfe76f7b934115650c29ea8edd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646576746f6f6c626f78756b2f656e677261666f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devtoolboxuk/engrafo)[![License](https://camo.githubusercontent.com/00a829cae5c3d6f3315aaae5fad3f580023493698e0e13bbe838dc1a0dc996e3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646576746f6f6c626f78756b2f656e677261666f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devtoolboxuk/engrafo)

Table of Contents
-----------------

[](#table-of-contents)

- [Background](#Background)
- [Usage](#Usage)
- [Maintainers](#Maintainers)
- [License](#License)

Background
----------

[](#background)

Usage
-----

[](#usage)

Usage of the XML service

```
$ composer require devtoolboxuk/xml
```

Then include Composer's generated vendor/autoload.php to enable autoloading:

```
require 'vendor/autoload.php';
```

```
use devtoolboxuk/xml;

$this->xmlService = new xmlService();
```

### Write XML Service

[](#write-xml-service)

##### Create the Writing XML service

[](#create-the-writing-xml-service)

```
$this->writeXMLService = $this->xmlService->writeXMLService();
```

##### Setting the Writing XML root name

[](#setting-the-writing-xml-root-name)

By default the root name is `root`

```
$this->writeXMLService->setRootName('products');
```

##### Example of Writing an XML

[](#example-of-writing-an-xml)

Plain XML

```
echo $this->writeXMLService->createDoc();
echo $this->writeXMLService->endDoc();
```

```

```

XML with attributes

```
echo $this->writeXMLService->createDoc();
echo $this->writeXMLService->endDoc([
    '@a' => [
        'xml_version' => '1.0',
    ]
]);
```

```

```

XML with data

```
echo $this->writeXMLService->createDoc();

echo $this->writeXMLService->create('product',[
    '@t'=>[
        'sku'=>12345,
        'text'=>'I am text',
    ]
]);

echo $this->writeXMLService->endDoc([
    '@a' => [
        'xml_version' => '1.0',
    ]
]);
```

```

    12345
    I am text

```

Maintainers
-----------

[](#maintainers)

[@DevToolboxUk](https://github.com/DevToolBoxUk).

License
-------

[](#license)

[MIT](LICENSE) © DevToolboxUK

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~34 days

Recently: every ~86 days

Total

18

Last Release

2077d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11e7828108a460ad0b3dc92c08fa9e0e863168b8dae2b4d7041a6d699f936faa?d=identicon)[devtoolboxuk](/maintainers/devtoolboxuk)

---

Top Contributors

[![devtoolboxuk](https://avatars.githubusercontent.com/u/6337609?v=4)](https://github.com/devtoolboxuk "devtoolboxuk (21 commits)")

---

Tags

csv writerxml generatorXml ReaderXml Formattercsv readerJSON WriterJSON Reader

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/devtoolboxuk-engrafo/health.svg)

```
[![Health](https://phpackages.com/badges/devtoolboxuk-engrafo/health.svg)](https://phpackages.com/packages/devtoolboxuk-engrafo)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[filament/actions

Easily add beautiful action modals to any Livewire component.

1220.8M36](/packages/filament-actions)[myoutdeskllc/salesforce-php

salesforce library for php8+

1560.8k](/packages/myoutdeskllc-salesforce-php)[tonirilix/nested-json-flattener

A php package to flatten nested json objects and nested arrays. It also allows you to create csv files from the flattened data.

28107.6k](/packages/tonirilix-nested-json-flattener)[inspirum/xml

Simple XML writer and memory efficient XML reader with powerful xml-to-array cast

1012.5k2](/packages/inspirum-xml)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
