PHP code example of guglielmopepe / tiler

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

    

guglielmopepe / tiler example snippets



// path file: /child/theme/template.php

<p><strong> echo $data['foo']; 


// path file: /parent/theme/template.php

<p><b> echo $data['foo']; 


// path file: /ancestor/theme/template.php

<p> echo $data['foo']; 

$data = new \Classes\Data(['foo'=>'bar']);

$handler = new \Tiler\Classes\Handler('/directory/of/child/theme');
$handler->connect(new \Tiler\Classes\Handler('/directory/of/parent/theme'));
$handler->connect(new \Tiler\Classes\Handler('/directory/of/ancestor/theme'));

$command = new \Tiler\Classes\Command($data, $handler);
echo $command->render('/template.php');