1. Go to this page and download the library: Download romanzaycev/tooolooop 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/ */
use Romanzaycev\Tooolooop\Engine;
use Psr\Container\ContainerInterface;
/** @var ContainerInterface $container */
$container = ...; // Initialize PSR-11 container
// and define implementation of Romanzaycev\Tooolooop\Scope\ScopeInterface
$engine = new Engine(__DIR__ . '/views');
$engine->setContainer($container);
$template = $engine->make('page'); // <-- Scope in this template will be obtained from container
use Romanzaycev\Tooolooop\Engine;
use Romanzaycev\Tooolooop\Scope\Scope;
use Romanzaycev\Tooolooop\Scope\ScopeInterface;
class UserSpecificScope extends Scope implements ScopeInterface {
// Implement your additions, ex. widget system :-)
}
$engine = new Engine(__DIR__ . '/views');
$engine->setScopeClass(UserSpecificScope::class);
html
$this->extend('layout')
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.