Location: PHPKode > projects > Open Power Template > docs/Opl/api.opl-class.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="pl">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="robots" content="all" />

	<title>Opl_Class class - Open Power Libs</title>
	
	<link rel="stylesheet" type="text/css" href="design/generic.css" media="all"  />
	<link rel="stylesheet" type="text/css" href="design/print.css" media="print" />
	<!--[if lte IE 6]><link rel="stylesheet" href="design/ie.css" type="text/css" /><![endif]-->	
	<!--[if IE 7]><link rel="stylesheet" href="design/ie7.css" type="text/css" /><![endif]-->
</head>
<body>

<div id="wrap">
	<div id="header">
		<h1>Open Power Libs 2.0</h1>
		<h2>Opl_Class class</h2>
		<p class="generated">@ 02.09.2010</p>
		<p class="location"><a href="index.html"><strong>User manual</strong></a> &raquo; <a href="api.html">API reference</a> &raquo; <a href="api.opl-class.html">Opl_Class</a></p>
	</div>
	
	<div id="content"><dl class="location"><dt><a href="api.html">4. API reference</a><br/>4.1. Opl_Class class</dt><dd class="prev">4. API reference<br/><a href="api.html">&laquo; Previous</a></dd><dd class="next">4.1.1. _pluginLoader()<br/><a href="api.opl-class._plugin-loader.html">Next &raquo;</a></dd></dl>	<h1>4.1. Opl_Class class</h1><h4>Table of Contents</h4><ul class="toc"><li><a href="api.opl-class._plugin-loader.html">4.1.1. _pluginLoader()</a></li><li><a href="api.opl-class._secure-path.html">4.1.2. _securePath()</a></li><li><a href="api.opl-class.get-config.html">4.1.3. getConfig()</a></li><li><a href="api.opl-class.load-config.html">4.1.4. loadConfig()</a></li><li><a href="api.opl-class.load-plugins.html">4.1.5. loadPlugins()</a></li></ul><div class="tf_reference"><table><tr><th>Construct</th><td>Abstract class</td></tr><tr><th>Extended by</th><td><code>Opc_Class</code>, <code>Opf_Class</code>, <code>Opt_Class</code></td></tr></table><hr/></div><p>Generic core class for the libraries. It provides the basic configuration and plugin management functionality.</p>

<h2>Configuration support</h2>

<p>The general library configuration should be done as public fields with short and intuitive names and default values set. However, <code>Opl_Class</code> supports also additional fields with <code>__get()</code> and <code>__set()</code> methods.</p>

<blockquote class="warning">
  <p>If you try to read the undefined directive, <code>Opl_OptionNotExists_Exception</code> is thrown.</p>
</blockquote>

<p>There is also a generic interface for loading and returning the configuration:</p>

<ol>
<li><a href="api.opl-class.load-config.html" title="4.1.4. Opl_Class::loadConfig()">Opl_Class::loadConfig()</a></li>
<li><a href="api.opl-class.get-config.html" title="4.1.3. Opl_Class::getConfig()">Opl_Class::getConfig()</a></li>
</ol>

<h2>Plugin support</h2>

<p>If the library is going to use plugins, it must implement <a href="api.opl-class._plugin-loader.html" title="4.1.1. Opl_Class::_pluginLoader()">Opl_Class::_pluginLoader()</a> protected method. <code>Opl_Class</code> defines three configuration directives for plugins:</p>

<dl>
<dt><strong>pluginDir</strong></dt>
<dd><code>string</code> A single directory with plugins.</dd>

<dd><code>array</code> A list of directories with plugins.</dd>

<dt><strong>pluginDataDir</strong></dt>
<dd><code>string</code> A directory for storing the plugin loader information. It must be writable by the script.</dd>

<dt><strong>pluginAutoload</strong></dt>
<dd><code>boolean</code> If set to <strong>true</strong>, the plugins are automatically detected and loaded once they are put in one of the <code>pluginDir</code> directories. If set fo <strong>false</strong>, you must manually remove the plugin loader information from <code>pluginDataDir</code>.</dd>
</dl>
<dl class="location location-bottom"><dt>4.1. Opl_Class class<br/><a href="api.html">4. API reference</a></dt><dd class="prev"><a href="api.html">&laquo; Previous</a><br/>4. API reference</dd><dd class="next"><a href="api.opl-class._plugin-loader.html">Next &raquo;</a><br/>4.1.1. _pluginLoader()</dd></dl>		</div>
	
	<div id="footer">
		<p>Copyright &copy; <a href="http://www.invenzzia.org/">Invenzzia Group 2008-2009</a></p>
		<p>Available under the terms of license: <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License 1.2</a></p>
		<p>Generated by <strong>TypeFriendly 0.1.4</strong> by <a href="http://www.invenzzia.org/">Invenzzia</a></p>
	</div>
</div>

</body>
</html>
Return current item: Open Power Template