PHP code example of antonkalmykov / piece

1. Go to this page and download the library: Download antonkalmykov/piece 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/ */

    

antonkalmykov / piece example snippets


// settings array
$settings = [
    // folder, where you store your view's
    'viewsFolder' => __DIR__ . '/views',
    // file extension, which you use for your
    // template and views files
    'fileExtension' => '.phtml'
];

use Piece\ViewEngine;
$view = new ViewEngine($settings);

$view->render('home', ['content'=>'Some content for home page.']);