PHP code example of davidecesarano / embryo-assets

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

    

davidecesarano / embryo-assets example snippets


use Embryo\Assets\Assets;
use Embryo\Http\Factory\ServerRequestFactory;

$request = (new ServerRequestFactory)->createServerRequestFromServer();
$css = Assets::css([
    '/path/to/css/file1.css',
    '/path/to/css/file2.css',
    '/path/to/css/file3.css'
])
->setRequest($request)
->build('/path/to/source/compilers/');

<style>
     echo $css; 

Assets::css([
    '/path/to/css/file1.css',
    '/path/to/css/file2.css',
    '/path/to/css/file3.css'
])
->setRequest($request)
->build('/path/to/assets/');