PHP code example of zvax / assets

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

    

zvax / assets example snippets


function testCompositeAsset()
    {
        $engine = new Assets\Engine();
        $map = [
            'default' => [
                'base',
                'base2',
            ],
        ];
        $engine->addCompositeAsset('javascript',$map,new Storage\FileLoader(__DIR__.'/testjs', 'js'));

        $js = $engine->serve('javascript', 'default');
    }