PHP code example of vssl / render
1. Go to this page and download the library: Download vssl/render 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/ */
vssl / render example snippets
use Vssl\Resolver;
use Journey\Cache\LocalAdapter;
$config = [
'cache' => new LocalAdapter('/tmp')
];
Resolver::config($config);
// for manual instantiation, you can also pass in a configuration.
$resolver = new Resolver($request, $config);
namespace App\Controllers;
class YourController {
/**
* Any controller method.
*/
public function anypage(ServerRequestInterface $request)
{
$page = $request->getAttribute('vssl-page');
}
}