empress-php / empress

Empress is a flexible microframework for creating async web applications in PHP 8.1.
MIT License
15 stars 0 forks source link

Introduce template renderers #24

Closed jakobmats closed 2 years ago

jakobmats commented 3 years ago

Empress strives to have a minimal core so I don't want to provide any builtin template renderers. However some general functionality and interfaces should be provided so that inside route handlers the context object can set the body to be rendered by whatever template renderer is registered. Something along the lines of:

$ctx->render('plates', $stringOrStream, $params);

This issue remains open so I can share my ideas on the matter in the comments.

jakobmats commented 2 years ago

It's too much code in the core. The templates can be rendered externally altogether.