PHP code example of codemonster-ru / view-ssr
1. Go to this page and download the library: Download codemonster-ru/view-ssr 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/ */
codemonster-ru / view-ssr example snippets
use Codemonster\View\View;
use Codemonster\View\Engines\SsrEngine;
use Codemonster\Ssr\SsrBridge; // from codemonster-ru/ssr-bridge
$bridge = new SsrBridge([
// ...bridge-specific options: mode, entry paths, server URL, etc.
]);
$engine = new SsrEngine($bridge);
$view = new View(['ssr' => $engine], 'ssr');
echo $view->render('home', ['message' => 'Hello']);