{"id":19445150,"url":"https://github.com/superreal/edi-parser","last_synced_at":"2025-08-17T20:09:56.273Z","repository":{"id":6327941,"uuid":"7563195","full_name":"superReal/edi-parser","owner":"superReal","description":null,"archived":false,"fork":false,"pushed_at":"2014-03-21T10:40:58.000Z","size":385,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-19T17:06:36.097Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"gocql/gocql","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superReal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-11T16:41:11.000Z","updated_at":"2020-06-23T06:11:42.000Z","dependencies_parsed_at":"2022-08-27T14:04:50.515Z","dependency_job_id":null,"html_url":"https://github.com/superReal/edi-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/superReal/edi-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superReal%2Fedi-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superReal%2Fedi-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superReal%2Fedi-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superReal%2Fedi-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superReal","download_url":"https://codeload.github.com/superReal/edi-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superReal%2Fedi-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270899579,"owners_count":24664720,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-10T16:09:31.739Z","updated_at":"2025-08-17T20:09:56.244Z","avatar_url":"https://github.com/superReal.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"edi-parser\n==========\n\nThis is a parser for [UN/EDIFACT](https://de.wikipedia.org/wiki/EDIFACT) messages.\n\n## Usage\n\nTo parse a message initialize a new EDIParser Instance with a path to the file you want to parse.\n```php\n//To\n$parser = new EDIParser(__DIR__ . \"/PAORES.edi\");\n$parser-\u003eparse();\n```\n\nTo retrieve the parsed message call:\n```php\n$oMessage = $parser-\u003egetOMessage();\n```\n\n#INVRPT (Inventory report message)\n\nThe only message type implemented at the moment is [INVRPT](http://www.unece.org/trade/untdid/d08a/trmd/invrpt_c.htm).\n\nAn INVRPT basically consists of several LINE ITEM Elements ([LIN](http://www.unece.org/trade/untdid/d08a/trsd/trsdlin.htm)), each followed by a QUANTITY Element ([QTY](http://www.unece.org/trade/untdid/d08a/trsd/trsdqty.htm)).\n\nExample:   \n```php\nforeach($this-\u003eoMessage-\u003egetLineItems() as $oLineItem) {\n    if (in_array($oLineItem-\u003egetItemNumber(), array_keys($aVariantIds))) {\n        $aStockChanges[] = array(\n            'OXID'      =\u003e $aVariantIds[$oLineItem-\u003egetItemNumber()],\n            'OXSTOCK'   =\u003e $oLineItem-\u003egetQuantity()\n        );\n\n        $aParentChanges[] = array(\n            'OXID'      =\u003e $aParentIds[$oLineItem-\u003egetItemNumber()]\n        );\n    }\n}\n```\n\nTo retrieve the Line Items from the Message call:\n```php\n$oMessage-\u003egetLineItems();\n```\n\nMethods available on Line Item Objects (LIN) to ease access to parsed data:\n```php\n$oLIN-\u003egetLineItemNumber();\n$oLIN-\u003egetActionRequest();\n$oLIN-\u003egetItemNumber();\n$oLIN-\u003egetItemNumberType();\n$oLIN-\u003egetQuantityQualifier();\n$oLIN-\u003egetQuantity();\n$oLIN-\u003egetMeasureUnit();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperreal%2Fedi-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperreal%2Fedi-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperreal%2Fedi-parser/lists"}