Skip to content
This repository has been archived by the owner on May 19, 2021. It is now read-only.
Kevin Herrera edited this page May 12, 2013 · 1 revision

The PHP compactor class, Herrera\Box\Compactor\PHP, uses the code used to define the Composer\Compiler::stripWhitespace() method.

To use it with Box, simply create a new instance and pass it to the Box::addCompactor() method:

<?php

use Herrera\Box\Box;
use Herrera\Box\Compactor\Php;

$box = Box::create('test.phar');
$box->addCompactor(new Php());

By default, only files using the .php file extension will be compacted.

You may define your own list of supported file extensions by passing it as an array to the Php::__construct() method.

Clone this wiki locally