Skip to content

Commit e00b002

Browse files
committed
Separate Element definition from Processor
1 parent 4c25fa7 commit e00b002

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ A Processor for Markup based on the [LHTML](https://github.com/Ouxsoft/LHTML) st
2020
Allows extraction of Markup into a data structure, orchestrated manipulation of said structure, and output as
2121
(optimized) Markup.
2222

23-
**Basic Example**
23+
### Instructions
24+
Create a PHPMarkup Element class used for processing
2425
```php
25-
use Ouxsoft\PHPMarkup\Factory\ProcessorFactory;
26-
2726
/**
2827
* Class SayHello
2928
* DomElement process class
@@ -38,6 +37,12 @@ class SayHello extends Ouxsoft\PHPMarkup\Element
3837
return 'Hello, ' . $this->getArgByName('who') . $this->innerText();
3938
}
4039
}
40+
```
41+
42+
Then add the class with a processor.
43+
44+
```php
45+
use Ouxsoft\PHPMarkup\Factory\ProcessorFactory;
4146

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

7681
## Contributing
7782
PHPMarkup is an open source project. If you find a problem or want to discuss new features or improvements
78-
please create an issue, and/or if possible create a pull request.
79-
80-
[phpmarkup-stack](https://github.com/Ouxsoft/phpmarkup-stack) is docker development environment
81-
with test suite available to make contributing simpler.
83+
please create an issue, and/or if possible create a pull request. Contributing is made is with
84+
[phpmarkup-stack](https://github.com/Ouxsoft/phpmarkup-stack) a docker based development environment
85+
with test suite.
8286

8387
## Acknowledgement
8488
Thanks to Matthew Heroux for leading the development of PHPMarkup.

0 commit comments

Comments
 (0)