<<css mode="next" class="sidebar"></css>> (((
- '''<a href="/docs/fLoader">Class Documentation</a>''' - <a href="/api/fLoader">API Reference</a> - <a href="https://github.com/flourishlib/flourish-classes/blob/master/fLoader.php" target="_blank">Source Code</a>
<<toc></toc>> )))
The fLoader class is designed to load Flourish class. By default it detects the optimal type of loading to perform based on the server environment. In addition to loading classes, it creates constructor functions for the various Flourish value object classes.
Loading Flourish should normally be performed by calling the static method ::best().
If an opcode cache (e.g. APC, XCache, etc) is detected, all class file are immediately included. If an opcode cache is not detected, an autoload function is registered via `spl_autoload_register()`.
If you need explicit control over what type of loading is performed, you should call one of the static methods ::eager() or ::lazy() instead.
Constructor functions is a term used to refer to functions that simply call the constructor of a class. The functions have the same name as the class, which effectively means that the `new` keyword is not required, and that method calls may be changed off of the constructor.
fLoader automatically creates constructor functions for all value object classes:
- fDate - fMoney - fNumber - fTime - fTimestamp
The static method ::hasOpcodeCache() can be used to create intelligent loading functionality for other code.