\FOFAutoloaderComponent
An autoloader for FOF-powered components. It allows the autoloading of various classes related to the operation of a component, from Controllers and Models to Helpers and Fields. If a class doesn't exist, it will be created on the fly.
Synopsis
class FOFAutoloaderComponent
{
- // members
- public FOFAutoloaderComponent $autoloader;
- public $fofPath;
- protected $fofComponents;
- // methods
- public static FOFAutoloaderComponent init()
- public void __construct()
- public boolean isFOFComponent()
- private void class_alias()
- public void autoload_fof_controller()
- public void autoload_fof_model()
- public void autoload_fof_view()
- public void autoload_fof_table()
- public void autoload_fof_helper()
- public void autoload_fof_toolbar()
- public void autoload_fof_field()
Members
protected
- $fofComponents
—
array
An array holding component names and their FOF-ness status
public
- $autoloader
—
FOFAutoloaderComponent
An instance of this autoloader - $fofPath
—
string
The path to the FOF root directory
Methods
private
- class_alias() — Creates class aliases. On systems where eval() is enabled it creates a real class. On other systems it merely creates an alias. The eval() method is preferred as class_aliases result in the name of the class being instanciated not being available, making it impossible to create a class instance without passing a $config array :(
public
- __construct() — Public constructor. Registers the autoloader with PHP.
- autoload_fof_controller() — Autoload Controllers
- autoload_fof_field() — Autoload Fields
- autoload_fof_helper() — Autoload Helpers
- autoload_fof_model() — Autoload Models
- autoload_fof_table() — Autoload Tables
- autoload_fof_toolbar() — Autoload Toolbars
- autoload_fof_view() — Autoload Views
- init() — Initialise this autoloader
- isFOFComponent() — Returns true if this is a FOF-powered component, i.e. if it has a fof.xml file in its main directory.