PHP code example of manychois / pompom

1. Go to this page and download the library: Download manychois/pompom 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/ */

    

manychois / pompom example snippets


use Manychois\Pompom\Engine;
use Manychois\Pompom\Internal\Psr4ComponentResolver;

$resolver = new Psr4ComponentResolver([
    'MyApp\\Components' => __DIR__ . '/src/Components',
]);

$engine = new Engine($resolver);
$document = $engine->render('hello-page', ['name' => 'World']);

echo $document->saveHtml();