- 7. API Reference
7.1. Opt_Class class - 7. API Reference
« Previous - 7.1.1. getBufferState()
Next »
7.1. Opt_Class class
Table of Contents
- 7.1.1. getBufferState()
- 7.1.2. getCache()
- 7.1.3. getCompiler()
- 7.1.4. getTranslationInterface()
- 7.1.5. loadConfig()
- 7.1.6. register()
- 7.1.7. setBufferState()
- 7.1.8. setCache()
- 7.1.9. setTranslationInterface()
- 7.1.10. setup()
| Construct | Class |
|---|
This is the main class of Open Power Template. It provides the configuration, plugin support and initialization issues. You need only one object of this class in your script. Below, a sample initialization is shown:
$tpl = new Opt_Class; // Load part of the configuration from the external INI file $tpl->loadConfig('./someconfig.ini'); // Configure the paths $tpl->sourceDir = './templates/'; $tpl->compileDir = './templates_c/'; // Register new add-ons $tpl->register(Opt_Class::OPT_COMPONENT, 'opt:myComponent', 'My_Component_Class'); // Perform the initialization $tpl->setup();
Now we can create Opt_View objects and parse the templates.
Do not forget to call Opt_Class::setup() method.
- 7.1. Opt_Class class
7. API Reference - « Previous
7. API Reference - Next »
7.1.1. getBufferState()