1. Go to this page and download the library: Download davidecesarano/embryo-view 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/ */
davidecesarano / embryo-view example snippets
use Embryo\Http\Emitter\Emitter;
use Embryo\Http\Factory\{ResponseFactory, StreamFactory};
use Embryo\View\View;
$response = (new ResponseFactory)->createResponse(200);
$templatePath = __DIR__.DIRECTORY_SEPARATOR.'views';
$compilerPath = __DIR__.DIRECTORY_SEPARATOR.'compilers';
$view = new View($templatePath, $compilerPath);
$response = $view->render($response, 'page', ['message' => 'Hello World!', 'status' => 1]);
$emitter = new Emitter;
$emitter->emit($response);