PHPackages                             fabrn/ydk-file-reader - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. fabrn/ydk-file-reader

ActiveLibrary[File &amp; Storage](/categories/file-storage)

fabrn/ydk-file-reader
=====================

Simple PHP library for YDK file reading

1.0.0(2y ago)017MITPHPPHP ^8.1

Since Dec 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Fabrn/ydkfilereader)[ Packagist](https://packagist.org/packages/fabrn/ydk-file-reader)[ RSS](/packages/fabrn-ydk-file-reader/feed)WikiDiscussions main Synced today

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

YDK File Reader
===============

[](#ydk-file-reader)

Simple PHP library that make `.ydk` file reading easier.

Install using Composer
----------------------

[](#install-using-composer)

```
composer require fabrn/ydkfilereader
```

Usage
-----

[](#usage)

In order to parse a specific YDK file, the `Ydk::readFile` will do the job :

```
$ydk = Ydk::readFile('my_file.ydk');
```

Once you've done that, you get an `Ydk` instance that contains everything you need to read the parsed file using **public properties** :

- author : if mentioned, the author can be retrieved
- mainDeck : list of card IDs of the main deck
- extraDeck : list of card IDs of the extra deck
- sideDeck : list of card IDs of the side deck

Using a custom parser
---------------------

[](#using-a-custom-parser)

If, for some reason, you need to use a custom YDK parser, you can create one :

```
class MyYdkParser implements YdkParserInterface
{
    public function parse(string $ydk): array
    {
        // TODO : parse YDK content
    }
}
```

Then use the parser by giving it as a second argument to the `readFile` method :

```
$ydk = Ydk::readFile('my_file.ydk', new MyYdkParser());
```

Directly parse YDK content
--------------------------

[](#directly-parse-ydk-content)

The `Ydk` class' constructor takes some raw YDK content to parse. The `readFile` is useful to get a file's content and construct the `Ydk` instance with it. But, if you need to, you can give it yourself :

```
$ydk = new Ydk($ydkContent);
```

Note that you can also use a custom parser using the constructor :

```
$ydk = new Ydk($ydkContent, new MyYdkParser());
```

License and legal notice
------------------------

[](#license-and-legal-notice)

This package is available under [MIT license](https://choosealicense.com/licenses/mit/).

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

924d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5dda17035387c9e23197486ae1f3f284562522294b267caf861fcc2eb05cfbe0?d=identicon)[Fabrn](/maintainers/Fabrn)

### Embed Badge

![Health badge](/badges/fabrn-ydk-file-reader/health.svg)

```
[![Health](https://phpackages.com/badges/fabrn-ydk-file-reader/health.svg)](https://phpackages.com/packages/fabrn-ydk-file-reader)
```

PHPackages © 2026

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