PHPackages                             krylach/ymlparser - 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. krylach/ymlparser

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

krylach/ymlparser
=================

YML (Yandex Market Language) parser

v1.0.1(2y ago)08MITPHPPHP &gt;=7.4

Since Jan 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/krylach/ymlparser)[ Packagist](https://packagist.org/packages/krylach/ymlparser)[ Docs](https://github.com/krylach/ymlparser)[ RSS](/packages/krylach-ymlparser/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

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

[](#installation)

Use the package manager [composer](https://getcomposer.org/) to install YML Parser.

```
composer require krylach/ymlparser
```

Usage
-----

[](#usage)

```
use Krylach\YMLParser\YML;

$yml = new YML($path);
$yml = new YML("./ymldocument.xml");

$yml = $yml->parse();
```

### Shop

[](#shop)

```
$shop = $yml->getShop();

$shop->getName();
$shop->getUrl();
$shop->getPhone();
$shop->getCompany();
```

### Category

[](#category)

```
$categories = $yml->getCategories();

foreach ($categories as $category) {
    $id = $category->getId();
    $parentId = $category->getParentId();
    $name = $category->getName();
}
```

### Offer

[](#offer)

```
$offers = $yml->getOffers();

foreach ($offers as $offer) {
   $pictures = $offer->getPictures();
   $parameters = $offer->getParameters();
}
```

#### Offer`s pictures

[](#offers-pictures)

```
foreach ($pictures as $picture) {
    $url = $picture->getUrl();
}
```

#### Offer`s parameters

[](#offers-parameters)

```
foreach ($parameters as $parameter) {
    $name = $parameter->getName();
    $value = $parameter->getValue();
}
```

#### Other attribute parameters

[](#other-attribute-parameters)

You can get any value specified in the offer of your YML document. For example:

```
foreach ($offers as $offer) {
    $name           = $offer->getName();
    $categoryId     = $offer->getCategoryId();
    $price          = $offer->getPrice();
    $vendorCode     = $offer->getVendorCode();
    $description    = $offer->getDescription();
    $available      = $offer->getAvailable();
    $currencyId     = $offer->getCurrencyId();
}
```

### Currency

[](#currency)

```
foreach ($currencies as $currency) {
    $id = $currency->getId();
    $rate = $currency->getRate();
}
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

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

Total

2

Last Release

900d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d31d6b3702e0c10bc379deb4feaa9a5afbf2ae2105bf2755c8e81f673e321b1?d=identicon)[krylach](/maintainers/krylach)

---

Top Contributors

[![krylach](https://avatars.githubusercontent.com/u/45463984?v=4)](https://github.com/krylach "krylach (7 commits)")

---

Tags

parserymlyandexmarket

### Embed Badge

![Health badge](/badges/krylach-ymlparser/health.svg)

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

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k954.1M2.5k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k960.0M160](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

15.1k156.8M870](/packages/erusev-parsedown)[masterminds/html5

An HTML5 parser and serializer.

1.8k269.7M322](/packages/masterminds-html5)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[matomo/device-detector

The Universal Device Detection library, that parses User Agents and detects devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, media players, mobile apps, feed readers, libraries, etc), operating systems, devices, brands and models.

3.5k26.4M183](/packages/matomo-device-detector)

PHPackages © 2026

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