PHP code example of oscarpalmer / yogurt

1. Go to this page and download the library: Download oscarpalmer/yogurt library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

oscarpalmer / yogurt example snippets


use oscarpalmer\Yogurt\Yogurt;

$yogurt = new Yogurt("./directory/for/templates", "template-extension");

$flavour = $yogurt->flavour("my-template");
# Or $flavour = new Flavour($yogurt, "my-template");

$flavour->data(array(
  "title" => "My Title"
));

$flavour->tagline = "My tagline.";

echo $flavour->taste();
# Or just echo $flavour;
html
<!-- lude file -->