• PHP

Cyrus is a tool for creating HTML with PHP. It’s not really a templating language, more a sort of wierd recreation of the DOM. I created it because I wanted a way to generate HTML using PHP object method chaining. It’s a visually logical way of showing what gets generated, and it allows for programatically affecting what HTML is generated without wrapping raw tags in PHP.

$element = new Livy\Cyrus;
$element->class('this-is-the-class')->content('Here is some content!')->display();
<div class="this-is-the-class">Here is some content!</div>

You can also generate more heavily nested elements:

$nest = new Livy\Cyrus;
    ->o()->el('p')->content("You've arrived at my web site!")->c()
<div class="wrapper">
    <h1 class="h1">Welcome</h1>
    <p>You've arrived at my web site!</p>

nest() allows allows you to nest elements even after you’ve closed an element:

$list = new Livy\Cryus;

foreach (['one', 'two', 'three'] as $item) :

<div class="wrapper">