ZMObject
|
+--ZMPlugins
public class ZMPlugins
extends ZMObject
| Constructor Summary | |
|---|---|
Create new instance. |
|
| Method Summary | |
|---|---|
| static string | filterResponse(string contents) Call filterContents(string) on all available plugin handler. |
| array | getAllPlugins(string scope, boolean configured) Get all plugins. |
| static ZMPlugin | getPluginForId(string id, string type) Get plugin for the given id. |
| array | Get a list of available plugin types. |
| static array | getPluginsForType(string type, string scope, boolean configured) Get all plugins for the given type. |
| static void | initPlugins(string type, string scope) Init all plugins of the given type and scope. |
| static void | instance() Get instance. |
| Methods inherited from org.zenmagick.ZMObject | |
|---|---|
| backtrace, create, log, singleton | |
public ZMPlugins()
Create new instance. /
public static string filterResponse(string contents)
Call filterContents(string) on all available plugin handler.
public array getAllPlugins(string scope, boolean configured)
Get all plugins.
ZM_SCOPE_ALL.true, return only configured provider: default is true.ZMPlugin instances grouped by type.public static ZMPlugin getPluginForId(string id, string type)
Get plugin for the given id.
null.public array getPluginTypes()
Get a list of available plugin types.
public static array getPluginsForType(string type, string scope, boolean configured)
Get all plugins for the given type.
ZM_SCOPE_ALL.true, return only configured provider: default is true.ZMPlugin instances.public static void initPlugins(string type, string scope)
Init all plugins of the given type and scope.
public static void instance()
Get instance. /
Plugins.
Plugins are similar to zen-cart modules. Basically,
ZMPlugincan be used as base class for a zen-cart module (zen-cart will use the properties and methods marked deprecated...).The plugin type is controlled by the base directory within the plugins directory. Please note that even though it is valid to create payment, shipping and order_total directories/plugins, zen-cart will not (yet) recognize them as such.
For now, plugins are a simple way to add configuration options to zen-cart without the need to write custom installer/uninstaller.Plugins may consist of either:
ZMPlugin..phpwith the same name as the directory in the directory, containing the main plugin class. Again, the classname is expected to be the same as the filename (without the.phpextension). It is the plugins responsibility to load all other files it depons upon.Plugins are grouped according to the way they are used/required. Valid groups (subdirectories) are: