jaromirnyklicek/okmexportparser

OkmExportParser 是一个用于解析 Komercni Banka 在 OKM (BEST KB) 格式导出的单类库。

dev-master 2016-02-07 11:36 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:52:59 UTC


README

KB OKM 导出文件的简单 PHP 解析器(BEST KB 客户端文件格式)。

这个库只解析 OKM 导出文件的内容。它没有任何理解其语义等的目的。

通过 composer 安装

$ composer require jaromirnyklicek/okmexportparser

用法

<?php

use C3poCz\OkmExportParser;

$okmFileContent = file_get_contents('/path/to/my/file.okm');
$parser = new OkmExportParser($okmFileContent);

$parser->getHeader(); // returns header of OKM file as array
$parser->getFooter(); // returns footer of OKM file as array
$parser->getTurnover(); // returns turnover sentence of OKM file as array
$parser->getTransactions(); // returns list of transactions as nested array