https://github.com/s1syphos/php-dejure
Linking texts with dejure.org, the Class(y) way.
https://github.com/s1syphos/php-dejure
Last synced: about 1 month ago
JSON representation
Linking texts with dejure.org, the Class(y) way.
- Host: GitHub
- URL: https://github.com/s1syphos/php-dejure
- Owner: S1SYPHOS
- License: mit
- Created: 2021-06-22T10:44:23.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-10-26T04:37:45.000Z (almost 5 years ago)
- Last Synced: 2025-02-17T01:25:58.702Z (over 1 year ago)
- Language: PHP
- Size: 82 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php-dejure
[](https://github.com/S1SYPHOS/php-dejure/releases) [](https://github.com/S1SYPHOS/php-dejure/blob/master/LICENSE) [](https://github.com/S1SYPHOS/php-dejure/issues) [](https://travis-ci.org/S1SYPHOS/php-dejure)
A PHP library for linking legal norms in texts with [dejure.org](https://dejure.org).
## History
This library started as an OOP port of `vernetzungsfunction.inc.php`, which can be [downloaded here](https://dejure.org/vernetzung.html). Since then, `php-dejure` heavily modified the underlying caching mechanism, now providing a broad range of fully configurable cache drivers while featuring more text processing options.
## Getting started
Install this package with [Composer](https://getcomposer.org):
```text
composer require S1SYPHOS/php-dejure
```
An example implementation could look something like this:
```php
setEmail('hello@mydomain.com');
$object->setTarget('_blank');
$text = '
';
$text .= 'This is a simple HTML text.';
$text .= 'It contains legal norms, like Art. 12 GG.';
$text .= '.. or § 433 BGB!';
$text .= '';
echo $object->dejurify($text);
```
## Roadmap
- [x] ~~Add tests~~
- [x] ~~Add checks to `__construct`~~
- [x] ~~Attempt cache directory creation~~
- [x] ~~Improve code~~
- [x] ~~Improve code more~~
- [x] ~~Translate code (almost done)~~
- [x] ~~`join` paths, so trailing slash is no longer required~~
- [x] ~~Add cache reset function~~
**Happy coding!**