ZMObject
└─ZMPlugin
public abstract class ZMPlugin
extends ZMObject
| Constant Summary | |
|---|---|
| final static str | Load all files including subfolder. |
| final static str | Load files from the plugin folder, but ignore subfolder. |
| final static str | Load all files from a lib subfolder, including subfolder. |
| final static str | Do not load any plugin files (except, of course, the plugin itself). |
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | __construct(array properties) Create new plugin with some defaults. |
| int | Get the context flags. |
| string | Get the description. |
| string | getId() Get the id. |
| string | Get this plugin's loader policy. |
| string | getName() Get the name. |
| string | Get the plugin directory. |
| string | Get the version. |
| abstract void | init() Init this plugin. |
| boolean | Check if this plugin is enabled. |
| void | setContext(int context) Set the context flags. |
| void | setDescription(string description) Set the description. |
| void | setEnabled(boolean status) Enable/disable this plugin. |
| void | setId(string id) Set the id. |
| void | setLoaderPolicy(string loaderPolicy) Set the loader policy for this plugin. |
| void | setName(string name) Set the name. |
| void | setPluginDirectory(string directory) Set the plugin directory. |
| void | setVersion(string version) Set the version. |
| Methods inherited from org.zenmagick.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set | |
public final static str LP_ALL = 'ALL'
Load all files including subfolder.
public final static str LP_FOLDER = 'FOLDER'
Load files from the plugin folder, but ignore subfolder.
public final static str LP_LIB = 'LIB'
Load all files from a lib subfolder, including subfolder.
public final static str LP_NONE = 'NONE'
Do not load any plugin files (except, of course, the plugin itself).
public void __construct(array properties)
Create new plugin with some defaults.
public int getContext()
Get the context flags.
public string getDescription()
Get the description.
public string getId()
Get the id.
public string getLoaderPolicy()
Get this plugin's loader policy.
The policy controlls the extend of automatic ZMLoader support this plugin requires.
It also affects the code included in core.php. Valid values are:
.php) files can be added to core.php.public string getName()
Get the name.
public string getPluginDirectory()
Get the plugin directory.
public string getVersion()
Get the version.
public abstract void init()
Init this plugin.
Code to set up internal resources, etc. should be called here, rather than in the * constructor.
public boolean isEnabled()
Check if this plugin is enabled.
true if the plugin is enabled, false if not.public void setContext(int context)
Set the context flags.
public void setDescription(string description)
Set the description.
public void setEnabled(boolean status)
Enable/disable this plugin.
public void setId(string id)
Set the id.
public void setLoaderPolicy(string loaderPolicy)
Set the loader policy for this plugin.
public void setName(string name)
Set the name.
public void setPluginDirectory(string directory)
Set the plugin directory.
public void setVersion(string version)
Set the version.
Abstract base class for plugins.
Plugins are a simple way to add custom code to ZenMagick.
This base class comes with the following defaults:
null; unless the status is explicitely set, the setting zenmagick.core.plugins.[id].enabled will be checked instead.ZMPlugin::LP_LIB.Files affected by the loader policy are all .php files, as documented for
ZMLoader.