Skip to content

A pretty standard template engine without all that overhead

License

Notifications You must be signed in to change notification settings

e7o-de/morosity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the Morosity Template Engine

This is a small template engine with a pretty similar syntax to other existing ones, like Twig or Smarty or so.

The main idea behind it was to have something where I can reuse existing .twig files without all that fat Twig implementation with all that fancy caches etc. And, of course, just the fun of it.

Code quality might improve in future, as well as the feature set, but for now it's pretty acceptable.

Quick start

composer require e7o/morosity

For now, you might need an "minimum-stability": "dev" in your composer.json.

Simplest usage:

$template = new \e7o\Morosity\Morosity(
	new \e7o\Morosity\Loader\FileLoader('templates')
);
echo $template->render(
	'hello.htm',
	['var1' => 'hello world']
);

Status & license

The engine is actually working.

License is kept simple, just a LGPLv3 or later.

Tests?

Functionality:

php spec/verify.php

Speed:

php spec/measure.php

Yes, this aren't actual unit tests you might have expected.

About

A pretty standard template engine without all that overhead

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages