pe/component-class-compiler

Component allows to compile multiple classes into one big string which can be dumped to file

v1.0.0 2017-12-06 11:07 UTC

This package is auto-updated.

Last update: 2024-12-05 19:42:41 UTC


README

Installation

php composer.phar require cmf/component-class-compiler:1.0.0

Usage

use CMF\Component\ClassCompiler\ClassCache;
use CMF\Component\ClassCompiler\ClassCompiler;

// Instantiate class compiler
$classCompiler = new ClassCompiler();

// Add classes to compile (include dependencies)
$classCompiler->addClasses([
    'Foo',
    'Bar',
]);

// Compiles classes to string which can be saved as php file
$classCompiler->compile();