Skip to content

Commit

Permalink
Merge pull request #3 from Ouxsoft/hxtree/php-8.0
Browse files Browse the repository at this point in the history
Separate Element definition from Processor
  • Loading branch information
hxtree authored Apr 5, 2021
2 parents b801d60 + e00b002 commit 7c5d62c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ A Processor for Markup based on the [LHTML](https://github.com/Ouxsoft/LHTML) st
Allows extraction of Markup into a data structure, orchestrated manipulation of said structure, and output as
(optimized) Markup.

**Basic Example**
### Instructions
Create a PHPMarkup Element class used for processing
```php
use Ouxsoft\PHPMarkup\Factory\ProcessorFactory;

/**
* Class SayHello
* DomElement process class
Expand All @@ -38,6 +37,12 @@ class SayHello extends Ouxsoft\PHPMarkup\Element
return 'Hello, ' . $this->getArgByName('who') . $this->innerText();
}
}
```

Then add the class with a processor.

```php
use Ouxsoft\PHPMarkup\Factory\ProcessorFactory;

// Instantiate Processor and configure to parse output buffer
$processor = ProcessorFactory::getInstance();
Expand Down Expand Up @@ -75,10 +80,9 @@ Read our docs for usage [phpmarkup.readthedocs.io](https://phpmarkup.readthedocs

## Contributing
PHPMarkup is an open source project. If you find a problem or want to discuss new features or improvements
please create an issue, and/or if possible create a pull request.

[phpmarkup-stack](https://github.com/Ouxsoft/phpmarkup-stack) is docker development environment
with test suite available to make contributing simpler.
please create an issue, and/or if possible create a pull request. Contributing is made is with
[phpmarkup-stack](https://github.com/Ouxsoft/phpmarkup-stack) a docker based development environment
with test suite.

## Acknowledgement
Thanks to Matthew Heroux for leading the development of PHPMarkup.
Expand Down

0 comments on commit 7c5d62c

Please sign in to comment.