Canvas Framework
Last updated: 2026-10-31
Canvas is a PHP framework for serving HTTP requests through controller methods. A route annotation connects a URL to a method; the method returns a response directly or renders a template. Controllers can use dependency injection, aspects, and optional packages such as ObjectQuel.
How the pieces fit together
Canvas discovers annotated controllers, matches an incoming request to a route, runs any configured aspects, and calls the controller method. The method returns a Symfony HTTP response. A controller extending BaseController can use helpers such as render(), json(), and redirect(). See Routing, Request & Response, and Base Controller for the details.
<?php
namespace App\Controllers;
use Quellabs\Canvas\Annotations\Route;
use Quellabs\Canvas\Controllers\BaseController;
use Symfony\Component\HttpFoundation\Response;
class HomeController extends BaseController {
/** @Route("/hello/{name}") */
public function hello(string $name): Response {
return $this->render('hello.tpl', ['name' => $name]);
}
} A request to /hello/Ada passes Ada to hello(). The render() helper gives that value to templates/hello.tpl and returns the rendered page as a response. See Templating for template setup.