1. Go to this page and download the library: Download lucasdavies/wikitextbuilder library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lucasdavies / wikitextbuilder example snippets
use LucasDavies\WikitextBuilder\Builder;
$builder = new Builder();
use LucasDavies\WikitextBuilder\Components\Table\TableCell;
$cell = new TableCell('value')->textCenter();
echo $cell->render();
// |style="text-align:center"|value
use LucasDavies\WikitextBuilder\Components\Table\TableCell;
$cell = new TableCell('value')->textCenter()->styles(['color' => 'red']);
echo $cell->render();
// |style="text-align:center;color:red"|value
use LucasDavies\WikitextBuilder\Components\Table\TableCell;
// Custom style applied after predefined style
$cell = new TableCell('value')->textCenter()->styles(['color' => 'red', 'text-align' => 'left']);
echo $cell->render();
// |style="color:red;text-align:left"|value
// Predefined style applied after custom style
$cell = new TableCell('value')->styles(['text-align' => 'left', 'color' => 'green'])->textRight();
echo $cell->render();
// |style="color:red;text-align:right"|value
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.