minify() публичный Метод

Strip Javascript/CSS files of extraneous whitespaces and comments; Return combined output as a minified string
public minify ( $files, $mime = NULL, $header = TRUE, $path = NULL ) : string
$files string|array
$mime string
$header bool
$path string
Результат string
Пример #1
0
    Graphics::identicon(f3::get('PARAMS.id'), f3::get('PARAMS.size'));
});
$app->route('GET /invert', function () {
    Graphics::invert('{{@GUI}}test.jpg');
});
$app->route('GET /thumb', function () {
    Graphics::thumb('{{@GUI}}large.jpg', 256, 192);
}, 60);
$app->route('GET /screenshot', function () {
    Graphics::screenshot('http://www.yahoo.com', 150, 200);
});
$app->route('GET /google/map', function () {
    Google::staticmap('Brooklyn Bridge', 12, '256x256');
});
$app->route('GET /minified/@script', function () use($app) {
    Web::minify($app->get('GUI'), array(f3::get('PARAMS.script')));
});
$app->run();
class Obj
{
    public function hello()
    {
        echo 'hello';
    }
}
class CustomObj
{
    public function hello()
    {
        echo 'hello';
    }
Пример #2
0
 function minified()
 {
     if (isset($_GET['base']) && isset($_GET['files'])) {
         $_GET = $this->scrub($_GET);
         Web::minify($_GET['base'], explode(',', $_GET['files']));
     }
 }