Simple client for sending wikitext to RESTBase to be converted into html.
More...
Simple client for sending wikitext to RESTBase to be converted into html.
The class name predates the switch from Parsoid to RESTBase as the backing API provider. RESTBase still talks to Parsoid under the covers.
- Author
- Bryan Davis bd808.nosp@m.@wik.nosp@m.imedi.nosp@m.a.or.nosp@m.g
- Copyright
- © 2016 Bryan Davis, Wikimedia Foundation and contributors.
- See also
- https://www.mediawiki.org/wiki/RESTBase
-
https://en.wikipedia.org/api/rest_v1/
◆ __construct()
Wikimedia\Slimapp\ParsoidClient::__construct |
( |
| $url, |
|
|
| $cache, |
|
|
| $logger = null ) |
- Parameters
-
string | $url | URL to RESTBase /transform/wikitext/to/html API |
string | $cache | Cache directory |
LoggerInterface | $logger | Log channel |
◆ cacheGet()
Wikimedia\Slimapp\ParsoidClient::cacheGet |
( |
| $key | ) |
|
|
protected |
- Parameters
-
- Returns
- string Cached parse result
◆ cachePut()
Wikimedia\Slimapp\ParsoidClient::cachePut |
( |
| $key, |
|
|
| $value ) |
|
protected |
- Parameters
-
string | $key | Cache key |
string | $value | Parse result |
◆ fetchParse()
Wikimedia\Slimapp\ParsoidClient::fetchParse |
( |
| $text | ) |
|
|
protected |
- Parameters
-
- Returns
- string|bool False on failure, html otherwise
◆ parse()
Wikimedia\Slimapp\ParsoidClient::parse |
( |
| $text | ) |
|
- Parameters
-
- Returns
- string Parsed text
The documentation for this class was generated from the following file: