- 4. API reference
4.1. Opl_Class class - 4. API reference
« Previous - 4.1.1. _pluginLoader()
Next »
4.1. Opl_Class class
Table of Contents
| Construct | Abstract class |
|---|---|
| Extended by | Opc_Class, Opf_Class, Opt_Class |
Generic core class for the libraries. It provides the basic configuration and plugin management functionality.
Configuration support
The general library configuration should be done as public fields with short and intuitive names and default values set. However, Opl_Class supports also additional fields with __get() and __set() methods.
If you try to read the undefined directive,
Opl_OptionNotExists_Exceptionis thrown.
There is also a generic interface for loading and returning the configuration:
Plugin support
If the library is going to use plugins, it must implement Opl_Class::_pluginLoader() protected method. Opl_Class defines three configuration directives for plugins:
- pluginDir
stringA single directory with plugins.arrayA list of directories with plugins.- pluginDataDir
stringA directory for storing the plugin loader information. It must be writable by the script.- pluginAutoload
booleanIf set to true, the plugins are automatically detected and loaded once they are put in one of thepluginDirdirectories. If set fo false, you must manually remove the plugin loader information frompluginDataDir.
- 4.1. Opl_Class class
4. API reference - « Previous
4. API reference - Next »
4.1.1. _pluginLoader()