https://github.com/letr0n/mako-optimizer
A command line task for the Mako framework that merges PHP source code files to help reduce the number of file includes
https://github.com/letr0n/mako-optimizer
mako-framework
Last synced: 4 months ago
JSON representation
A command line task for the Mako framework that merges PHP source code files to help reduce the number of file includes
- Host: GitHub
- URL: https://github.com/letr0n/mako-optimizer
- Owner: letr0n
- Created: 2014-05-14T11:59:35.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-01-14T00:44:16.000Z (over 9 years ago)
- Last Synced: 2025-12-14T17:58:46.620Z (7 months ago)
- Topics: mako-framework
- Language: PHP
- Size: 16.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mako Optimizer
Command line task for the Mako framework that compiles classes into a single file to reduce the ammount of file includes required to process a request.
### How do I use it?
First you'll have to register the package with your Mako application. This is done by adding ```letron\optimizer\OptimizerPackage``` to the list of packages in your ```app/config/application.php``` file.
Then you'll need to add the following lines to the ```index.php``` file (right after the part where it requires the init file).
if(file_exists(MAKO_APPLICATION_PATH . '/storage/compiled.php'))
{
include MAKO_APPLICATION_PATH . '/storage/compiled.php';
}
You can then execute the ```compile``` action of the optimizer compiler.
php reactor optimizer.compile
php reactor optimizer.compiler --strip-comments
If you want to clear the compiled files then you can do so by executing the ```clear``` action of the optimizer compiler.
php reactor optimizer.clear
### How much faster does it get?
That depends on a lot of factors so the easiest way to find out is to try for yourself.