Loading CakePHP Helpers, Components and Behaviors on the fly

Disclaimer: All credit goes to Jose Diaz-Gonzalez, whose post Adding a Helper/Behavior/Component on the fly, contains the 99% of the code I needed to create this component. He’s the one who came up with this idea, I just put it all into a component and added a few tweaks here and there. Thanks, Jose.

FlyLoader @ GitHub: Source (temporary location)

The FlyLoaderComponent will import and load Helpers, Components and Behaviors on the fly. Cases in which this may because useful is if the Helper/Component/Behavior is only needed in certain cases/actions.

Read More