for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace XHGui;
use Slim\Http\Response;
use Slim\Slim as App;
use Slim\Views\Twig;
abstract class AbstractController
{
/** @var App */
private $app;
public function __construct(App $app)
$this->app = $app;
}
protected function render(string $template, array $data = [])
/** @var Response $response */
$response = $this->app->response;
/** @var Twig $renderer */
$renderer = $this->app->view;
$renderer->appendData($data);
$body = $renderer->fetch($template);
$response->write($body);
protected function config(string $key)
return $this->app->config($key);