Skip to content

masicek/PhpMinifi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhpMinifi

Class for minifing PHP files

  • it allows minifi more files together
  • it allows retain PHPDocs
// default do not include PHPDocs
$minifi = new \PhpMinifi\Minifi();

// set header of minifi version
$minifi->setHeader('PhpMinifi: Minified version of PhpMinifi. @author Viktor Mašíček');

// default include PHPDocs
$minifi->setDefaultPhpdocs(\PhpMinifi\Minifi::PHPDOCS_INCLUDE);

// one file with PHPDocs
$minifi->add('./myFile_A.php');
// one directory with PHPDocs
$minifi->add('./myDirectory_A');
// one files and one directory with PHPDocs
$minifi->add(array('./myFile_B.php', './myDirectory_B'));
// more files and directories without PHPDocs
$minifi->add(
    array(
        './myFile_C.php',
        './myFile_E.php'
        './myDirectory_C',
        './myDirectory_E',
    ),
    \PhpMinifi\Minifi::PHPDOCS_REMOVE
);

// get minifi content into variable
$content = $minifi->minifi();

// save minify content into set file and return it
$content = $minifi->minifi('./myMinifi.php');

About

Class for minifing PHP files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages