Пример #1
0
<?php

/**
 * @link      https://github.com/basselin/php-minify
 * @copyright (c) 2014, Benoit Asselin contact(at)ab-d.fr
 * @license   MIT Licence
 */
require 'phpminify.php';
$phpMinify = new PhpMinify(array('source' => './', 'target' => './demo/'));
var_dump($phpMinify->run());
Пример #2
0
} catch (PhpMinify_Exception $ex) {
    echo 'ERROR: ' . $ex->getMessage();
}
$options = array(PhpMinify::OPT_INPUT_PATH => dirname(__FILE__) . '/src/Backend/AdminBundle/Controller', PhpMinify::OPT_OUTPUT_PATH => dirname(__FILE__) . '/target/src/Backend/AdminBundle/Controller', PhpMinify::OPT_TRACK_MINIFIED => true, PhpMinify::OPT_STRIP_TABULATION => true);
try {
    $minifier = new PhpMinify($options);
    $minifier->run();
} catch (PhpMinify_Exception $ex) {
    echo 'ERROR: ' . $ex->getMessage();
}
$options = array(PhpMinify::OPT_INPUT_PATH => dirname(__FILE__) . '/src/Backend/CustomerAdminBundle/Controller', PhpMinify::OPT_OUTPUT_PATH => dirname(__FILE__) . '/target/src/Backend/CustomerAdminBundle/Controller', PhpMinify::OPT_TRACK_MINIFIED => true, PhpMinify::OPT_STRIP_TABULATION => true);
try {
    $minifier = new PhpMinify($options);
    $minifier->run();
} catch (PhpMinify_Exception $ex) {
    echo 'ERROR: ' . $ex->getMessage();
}
$options = array(PhpMinify::OPT_INPUT_PATH => dirname(__FILE__) . '/src/Backend/CustomerBundle/Controller', PhpMinify::OPT_OUTPUT_PATH => dirname(__FILE__) . '/target/src/Backend/CustomerBundle/Controller', PhpMinify::OPT_TRACK_MINIFIED => true, PhpMinify::OPT_STRIP_TABULATION => true);
try {
    $minifier = new PhpMinify($options);
    $minifier->run();
} catch (PhpMinify_Exception $ex) {
    echo 'ERROR: ' . $ex->getMessage();
}
$options = array(PhpMinify::OPT_INPUT_PATH => dirname(__FILE__) . '/src/Backend/UserBundle/Controller', PhpMinify::OPT_OUTPUT_PATH => dirname(__FILE__) . '/target/src/Backend/UserBundle/Controller', PhpMinify::OPT_TRACK_MINIFIED => true, PhpMinify::OPT_STRIP_TABULATION => true);
try {
    $minifier = new PhpMinify($options);
    $minifier->run();
} catch (PhpMinify_Exception $ex) {
    echo 'ERROR: ' . $ex->getMessage();
}