{"id":14985661,"url":"https://github.com/lireincore/ymlparser","last_synced_at":"2025-04-11T22:04:35.159Z","repository":{"id":46905159,"uuid":"67229745","full_name":"lireincore/ymlparser","owner":"lireincore","description":"YML (Yandex Market Language) parser","archived":false,"fork":false,"pushed_at":"2021-10-08T13:03:55.000Z","size":60,"stargazers_count":22,"open_issues_count":5,"forks_count":16,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-25T17:53:32.256Z","etag":null,"topics":["parser","php","yandex","yandex-market-language","yml"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lireincore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-02T14:33:31.000Z","updated_at":"2025-01-22T10:49:51.000Z","dependencies_parsed_at":"2022-09-12T10:10:34.255Z","dependency_job_id":null,"html_url":"https://github.com/lireincore/ymlparser","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lireincore%2Fymlparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lireincore%2Fymlparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lireincore%2Fymlparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lireincore%2Fymlparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lireincore","download_url":"https://codeload.github.com/lireincore/ymlparser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247927266,"owners_count":21019505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["parser","php","yandex","yandex-market-language","yml"],"created_at":"2024-09-24T14:11:26.906Z","updated_at":"2025-04-11T22:04:35.113Z","avatar_url":"https://github.com/lireincore.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YML (Yandex Market Language) parser\n\n[![Latest Stable Version](https://poser.pugx.org/lireincore/ymlparser/v/stable)](https://packagist.org/packages/lireincore/ymlparser)\n[![Total Downloads](https://poser.pugx.org/lireincore/ymlparser/downloads)](https://packagist.org/packages/lireincore/ymlparser)\n[![License](https://poser.pugx.org/lireincore/ymlparser/license)](https://packagist.org/packages/lireincore/ymlparser)\n\n## About\n\n[YML (Yandex Market Language)](https://yandex.ru/support/partnermarket/yml/about-yml.xml) streaming parser with validation.\nBased on XMLReader. Suitable for large files.\n\n## Install\n\nAdd the `\"lireincore/ymlparser\": \"^3.2\"` package to your `require` section in the `composer.json` file\n\nor\n\n``` bash\n$ php composer.phar require lireincore/ymlparser\n```\n\n## Usage\n\n```php\nuse LireinCore\\YMLParser\\YML;\n\n$yml = new YML();\ntry {\n    $yml-\u003eparse($filepath);\n    $date = $yml-\u003egetDate();\n    $shop = $yml-\u003egetShop();\n    if ($shop-\u003eisValid()) {\n        $offersCount = $shop-\u003egetOffersCount();\n        $shopData = $shop-\u003egetData();\n        //...\n        foreach ($yml-\u003egetOffers() as $offer) {\n            if ($offer-\u003eisValid()) {\n                $offerCategoryHierarchy = $shop-\u003egetCategoryHierarchy($offer-\u003egetCategoryId());\n                $offerData = $offer-\u003egetData();\n                //...\n            } else {\n                var_dump($offer-\u003egetErrors());\n                //...\n            }\n        }\n    } else {\n        var_dump($shop-\u003egetErrors());\n        //...\n    }\n} catch (\\Exception $e) {\n    echo $e-\u003egetMessage();\n    //...\n}\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flireincore%2Fymlparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flireincore%2Fymlparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flireincore%2Fymlparser/lists"}