Skip to content

Commit

Permalink
v0.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Jan 1, 2021
1 parent 4a39732 commit efd81e9
Show file tree
Hide file tree
Showing 19 changed files with 1,242 additions and 182 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/xsd/
/vendor/
/nbproject/
/composer.lock
1 change: 1 addition & 0 deletions .phpunit.result.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C:37:"PHPUnit\Runner\DefaultTestResultCache":4394:{a:2:{s:7:"defects";a:40:{s:40:"Test\mServer\ClientTest::testprocessInit";i:4;s:38:"Test\mServer\ClientTest::testlogBanner";i:4;s:34:"Test\mServer\ClientTest::testsetUp";i:4;s:36:"Test\mServer\ClientTest::testsetAuth";i:3;s:40:"Test\mServer\ClientTest::testsetInstance";i:4;s:43:"Test\mServer\ClientTest::testsetApplication";i:4;s:46:"Test\mServer\ClientTest::testsetCheckDuplicity";i:4;s:37:"Test\mServer\ClientTest::testcurlInit";i:4;s:42:"Test\mServer\ClientTest::testsetPostFields";i:4;s:42:"Test\mServer\ClientTest::testdoCurlRequest";i:4;s:43:"Test\mServer\ClientTest::testperformRequest";i:4;s:44:"Test\mServer\ClientTest::testprocessResponse";i:4;s:38:"Test\mServer\ClientTest::testgetStatus";i:4;s:37:"Test\mServer\ClientTest::testtakeData";i:4;s:35:"Test\mServer\ClientTest::testcreate";i:4;s:40:"Test\mServer\ClientTest::testaddToPohoda";i:2;s:43:"Test\mServer\ClientTest::testupdateInPohoda";i:2;s:39:"Test\mServer\ClientTest::testfilterToMe";i:4;s:49:"Test\mServer\ClientTest::testgetColumnsFromPohoda";i:2;s:37:"Test\mServer\ClientTest::test__wakeup";i:2;s:39:"Test\mServer\AdressbookTest::testcreate";i:4;s:36:"Test\mServer\InvoiceTest::testcreate";i:4;s:37:"Test\mServer\InvoiceTest::testaddItem";i:4;s:35:"Test\mServer\InvoiceTest::testextId";i:4;s:40:"Test\mServer\ResponseTest::testuseCaller";i:4;s:50:"Test\mServer\ResponseTest::testprocessResponsePack";i:4;s:54:"Test\mServer\ResponseTest::testprocessResponsePackItem";i:4;s:53:"Test\mServer\ResponseTest::testprocessProducedDetails";i:4;s:51:"Test\mServer\ResponseTest::testprocessImportDetails";i:4;s:50:"Test\mServer\ResponseTest::testprocessResponseData";i:4;s:43:"Test\mServer\ResponseTest::testtypesToArray";i:4;s:42:"Test\mServer\ResponseTest::testtypeToArray";i:4;s:38:"Test\mServer\ResponseTest::testgetNote";i:4;s:35:"Test\mServer\ResponseTest::testisOk";i:4;s:39:"Test\mServer\ResponseTest::testgetState";i:4;s:44:"Test\mServer\ResponseTest::testgetAgendaData";i:4;s:45:"Test\mServer\ResponseTest::testprepareElement";i:4;s:44:"Test\mServer\ResponseTest::testanyXmlToArray";i:4;s:36:"Test\mServer\ResponseTest::testparse";i:4;s:41:"Test\mServer\ResponseTest::testxmlToArray";i:4;}s:5:"times";a:40:{s:40:"Test\mServer\ClientTest::testprocessInit";d:0.004;s:38:"Test\mServer\ClientTest::testlogBanner";d:0.001;s:34:"Test\mServer\ClientTest::testsetUp";d:0.001;s:36:"Test\mServer\ClientTest::testsetAuth";d:0.001;s:40:"Test\mServer\ClientTest::testsetInstance";d:0.001;s:43:"Test\mServer\ClientTest::testsetApplication";d:0;s:46:"Test\mServer\ClientTest::testsetCheckDuplicity";d:0.001;s:37:"Test\mServer\ClientTest::testcurlInit";d:0;s:42:"Test\mServer\ClientTest::testsetPostFields";d:0;s:42:"Test\mServer\ClientTest::testdoCurlRequest";d:0;s:43:"Test\mServer\ClientTest::testperformRequest";d:0.001;s:44:"Test\mServer\ClientTest::testprocessResponse";d:0.001;s:38:"Test\mServer\ClientTest::testgetStatus";d:26.706;s:37:"Test\mServer\ClientTest::testtakeData";d:37.494;s:35:"Test\mServer\ClientTest::testcreate";d:0.003;s:40:"Test\mServer\ClientTest::testaddToPohoda";d:1.216;s:43:"Test\mServer\ClientTest::testupdateInPohoda";d:1.017;s:39:"Test\mServer\ClientTest::testfilterToMe";d:0.002;s:49:"Test\mServer\ClientTest::testgetColumnsFromPohoda";d:0.975;s:37:"Test\mServer\ClientTest::test__wakeup";d:0.003;s:39:"Test\mServer\AdressbookTest::testcreate";d:0.002;s:36:"Test\mServer\InvoiceTest::testcreate";d:0.001;s:37:"Test\mServer\InvoiceTest::testaddItem";d:0;s:35:"Test\mServer\InvoiceTest::testextId";d:0;s:40:"Test\mServer\ResponseTest::testuseCaller";d:0;s:50:"Test\mServer\ResponseTest::testprocessResponsePack";d:0;s:54:"Test\mServer\ResponseTest::testprocessResponsePackItem";d:0;s:53:"Test\mServer\ResponseTest::testprocessProducedDetails";d:0;s:51:"Test\mServer\ResponseTest::testprocessImportDetails";d:0;s:50:"Test\mServer\ResponseTest::testprocessResponseData";d:0.001;s:43:"Test\mServer\ResponseTest::testtypesToArray";d:0;s:42:"Test\mServer\ResponseTest::testtypeToArray";d:0;s:38:"Test\mServer\ResponseTest::testgetNote";d:0;s:35:"Test\mServer\ResponseTest::testisOk";d:0;s:39:"Test\mServer\ResponseTest::testgetState";d:0;s:44:"Test\mServer\ResponseTest::testgetAgendaData";d:0;s:45:"Test\mServer\ResponseTest::testprepareElement";d:0;s:44:"Test\mServer\ResponseTest::testanyXmlToArray";d:0;s:36:"Test\mServer\ResponseTest::testparse";d:0;s:41:"Test\mServer\ResponseTest::testxmlToArray";d:0;}}}
41 changes: 38 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,49 @@
![Project Logo](phpmserver.svg?raw=true)

# PHPmServer
client library for Stormware's Pohoda mServer
client library for Stormware's [mPohoda mServer](https://www.stormware.cz/pohoda/xml/mserver/)

Features:

* Create/Update/Delete AddressBook record
* Create/Update/Delete Invoice record

Installation:
-------------

Install using composer:

```shell
composer require vitexsoftware/pohoda-connector
```

Or clone https://github.com/VitexSoftware/PHP-Pohoda-Connector.git

Configuration
-------------

Classess check at startup for this constants or environment variables:

* POHODA_ICO - company indentificator
* POHODA_URL - mServer endpoint
* POHODA_USERNAME - Pohoda user's login
* POHODA_PASSWORD - Pohoda user's password
* POHODA_TIMEOUT - Curl timeout
* POHODA_COMPRESS - compress is disabled by default
* POHODA_DEBUG - debug mode is disabled by default


Usage
-----

See usage examples in [tests](tests) directory

* [Check Connection](tests/check-connection.php)
* [Add Addressbook record](tests/insert-address.php)
* [Create Invoice](tests/insert-invoice.php)
* [Addressbook reading](tests/read-address.php)
* [Address update](tests/update-address.php)

See also: https://github.com/Spoje-NET/PohodaSQL , https://github.com/Spoje-NET/php-abraflexi

See also my other libraries: https://github.com/Spoje-NET/PohodaSQL , https://github.com/Spoje-NET/php-abraflexi

The Response class was taken from https://github.com/jakubdusek/PohodaResponseParser By @jakubdusek
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
"require": {
"ext-curl": "*",
"ext-iconv": "*",
"ext-simplexml": "*",
"riesenia/pohoda": ">=1.5 || dev-master",
"vitexsoftware/ease-core": ">=1.9",
"lightools/xml": "v2.0.0",
"sabre/xml": "2.2.3"
"lightools/xml": "v2.0.0"
},
"autoload": {
"psr-4": {
Expand Down
203 changes: 203 additions & 0 deletions phpmserver.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true" bootstrap="./tests/bootstrap.php">
<testsuites>
<testsuite name="all">
<directory>./tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">src/mServer</directory>
</whitelist>
</filter>

<!-- logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-text" target="php://stdout"/>
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging -->
</phpunit>
Loading

0 comments on commit efd81e9

Please sign in to comment.