PHP code example of jsnlib / codeigniter-prototype-converter

1. Go to this page and download the library: Download jsnlib/codeigniter-prototype-converter 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/ */

    

jsnlib / codeigniter-prototype-converter example snippets


 
$config = 
[
    'assets' => 
    [
        'assets'
    ],
    'pages' => 
    [
        'product/index' => 'product.html',
        'product/content/001' => 'product_content_001.html',
        'product/content/002' => null, // 自動轉換為 product_content_002.html
    ],
    'put' => 'static-pages'
];

class Build extends CI_Controller {

    public function index()
    {
        $this->prototype = new \Jsnlib\Codeigniter\Prototype\Converter;
        
        $result = $this->prototype->build(
        [
            'download' => false
        ]);

        var_dump($result);
    }

}