PHPackages                             pajkho/siephp - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. pajkho/siephp

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

pajkho/siephp
=============

Library for export to the Swedish SIE-format. Currently only a subset of the specification is supported, like export to SIE4 (verification/transaction data).

1.0.2(3y ago)0637MITPHPPHP &gt;=5.4.0

Since Jan 8Pushed 3y agoCompare

[ Source](https://github.com/pajkho/siephp)[ Packagist](https://packagist.org/packages/pajkho/siephp)[ RSS](/packages/pajkho-siephp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

SIEPHP
======

[](#siephp)

About
-----

[](#about)

SIEPHP is a library that enables export of bookkeeping-data to the Swedish SIE-format. For more information about SIE see

Currently only a subset of the specification is supported, like export to SIE4 (verification/transaction data). In the future a loader-class for SIE could be written as well, and support of more features in the SIE-standard.

It's built around simple data-classes that represents a Company / Verifications / Transactions by the model in the SIE-standard. It also comes with a dumper-class that can dump the data to SIE-format.

Installation
------------

[](#installation)

Install the latest version with

```
$ composer require pajkho/siephp
```

Usage
-----

[](#usage)

[examples/](examples) holds some examples on how to use SIE-PHP. This is [examples/simple.php](examples/simple.php):

```
// create a company
$company = (new SIE\Data\Company())
    // set company name
    ->setCompanyName('My company')
    // add a verification series
    ->addVerificationSeries(new SIE\Data\VerificationSeries())
    // add two accounts
    ->addAccount((new SIE\Data\Account(1511))->setName('Kundfordringar'))
    ->addAccount((new SIE\Data\Account(3741))->setName('Öresutjämning'))
;

// add a verification with two transactions
$verification = (new SIE\Data\Verification(591000490))->setDate('20150105')
    ->addTransaction(
        (new SIE\Data\Transaction())
            ->setAccount($company->getAccount(1511))
            ->setAmount(-0.24)
    )
    ->addTransaction(
        (new SIE\Data\Transaction())
            ->setAccount($company->getAccount(3741))
            ->setAmount(0.24)
    )
;
// add the verification to the company
$company->getVerificationSeriesAll()[0]->addVerification($verification);
// validate data, will throw Exception if invalid data
$company->validate();

$dumper = new SIE\Dumper\SIEDumper();
$output = $dumper->dump($company);
echo $output;
```

And it will generate the following output (in PC8/CP437 encoding):

```
#FLAGGA 0
#FORMAT PC8
#SIETYP 4
#PROGRAM "SIE-PHP exporter"
#GEN 20150921
#FNAMN "My company"
#KONTO 1511 Kundfordringar
#KONTO 3741 Öresutjämning

#VER A 591000490 20150105
{
    #TRANS 1511 {} -0.24 20150105
    #TRANS 3741 {} 0.24 20150105
}

```

See [examples/TSVtoSIE.php](examples/TSVtoSIE.php) for a custom TSV to SIE converter, loading the same data from a TSV-file.

Author
------

[](#author)

Johan Wilfer - johan \[at\] jttech.se -

Licence
-------

[](#licence)

SIE-PHP is licensed under the MIT License - see the LICENSE file for details

Thanks to
---------

[](#thanks-to)

Mitronic AB () that funded this work.

Questions?
----------

[](#questions)

Send an email to johan \[at\] jttech.se

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~504 days

Total

3

Last Release

1314d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/836fe1fad7a98b8ffe6357f8c00808f16cef9e935184c8ae24f8cd98aa8feae3?d=identicon)[pajkho](/maintainers/pajkho)

---

Top Contributors

[![johanwilfer](https://avatars.githubusercontent.com/u/1157420?v=4)](https://github.com/johanwilfer "johanwilfer (10 commits)")[![pajkho](https://avatars.githubusercontent.com/u/8545572?v=4)](https://github.com/pajkho "pajkho (10 commits)")[![PatNowak](https://avatars.githubusercontent.com/u/9477704?v=4)](https://github.com/PatNowak "PatNowak (2 commits)")

### Embed Badge

![Health badge](/badges/pajkho-siephp/health.svg)

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

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

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