PHP code example of icanboogie / bind-render

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

    

icanboogie / bind-render example snippets




/* @var ICanBoogie\Application $app */

echo get_class($app->template_engines);  // ICanBoogie\Render\EngineCollection
echo get_class($app->template_resolver); // ICanBoogie\Binding\Render\ApplicationTemplateResolver
echo get_class($app->renderer);          // ICanBoogie\Render\Renderer

$app->render($app->models['articles']->one);



// config/render.php

namespace ICanBoogie\Binding\Render;

use ICanBoogie\Render\PHPEngine;

return [

	RenderConfig::ENGINES => [

		'.phtml' => PHPEngine::class

	]

];