PHP code example of crecket / dependency-manager

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

    

crecket / dependency-manager example snippets


<script src="/minify.php{{ getFilesLink(true, 'jsGroupName') }}">

<link href="/minify.php echo Crecket\DependencyManager\Loader::getFilesLink(true, 'cssGroupName'); 

$options = array(
    // Location that the default Doctrine/FilesystemCache will use. Location is based on the root
    // Required if no custom cache object is given
    'CacheLocation' => '/cache',

    // Optional, namespace to use for the doctrine file system cache
    'CacheNamespace'  => 'DependencyManagerNamespace',
);

define('ROOT', __DIR__); // Don't forget this!

try{
    $Response = new Crecket\DependencyManager\Response($options);

    echo $Response->getResult();
}catch(Crecket\DependencyManager\Exception $ex){ // catch errors
    echo $ex->getTitle();
    echo '<br>';
    echo $ex->getMessage();
}

<script src="/minify/ echo Loader::getHash(true, 'jsGroupExample'); 

$file_list = array('/some/js/file.js', '/another/js/files.js');
$Response = new Crecket\DependencyManager\Response($options, $file_list);