Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dotfry committed Sep 20, 2018
0 parents commit 05f5cda
Show file tree
Hide file tree
Showing 12 changed files with 1,930 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.idea/
/vendor/
/.temp/
/ext/
compile*.log
stubs/streamparser
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
StreamReader Collection
===============

## PHP XML Stream Reader
Reads XML from either a string or a stream, allowing the registration of callbacks when an elemnt is found that matches path.

## Installation
* [Install Zephir](https://docs.zephir-lang.com/ru/0.10/installation)
* `zephir build`
* Add `extension=streamparser` to your `php.ini`

Usage Example
-------------
```php
<?php
declare(strict_types = 1);

(new SixDreams\StreamReader\XmlStreamReader())
->registerCallback('/root/sport', '/root/sport/groups/group/events/event', function (string $rawXml) {
echo 'XML: ' . $rawXml . "\n";
});
```

## PHP JSON Stream Reader

@todo...

10 changes: 10 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "6dreams/stream-reader",
"license": "proprietary",
"type": "project",
"autoload": {
},
"require-dev": {
"phpunit/phpunit": "7.2.7"
}
}
Loading

0 comments on commit 05f5cda

Please sign in to comment.