PHP code example of wherd / signal

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

    

wherd / signal example snippets


use Signal\Compiler;
use Signal\View;

$compiler = new Compiler(__DIR__ . '/views');
$compiler->setCacheDirectory(__DIR__ . '/tmp');

$signal = new View($compiler);

echo $signal->render('homepage', ['name' => 'John Doe']);

use Signal\Compiler;
use Signal\View;

$compiler = new Compiler(__DIR__ . '/views');
$compiler->setCacheDirectory(__DIR__ . '/tmp');

$signal = new View($compiler);

echo $signal->render('homepage', ['name' => 'John Doe']);