simple_plugin_operations View code

This operations class handles reading and writing simple plugins.

this is a singleton class.

package

CMS

license

GPL

since 2.3
author

Robert Campbell

Methods

__construct() 

Constructor

get_instance() : \CMSMS\simple_plugin_operations

Get the single instance

static
get_list() : array<mixed,string>|null

List all known simple plugins.

Reads from the assets/simple_plugins directory.

Response

array<mixed,string>|null

get_plugin_filename(string $name) : string

Get the filename where a plugin should be stored or read from.

Arguments

string $name

The plugin name

Response

string

plugin_exists(string $name) : boolean

Test if a plugin exists

Arguments

string $name

The plugin name

Response

boolean

is_valid_plugin_name(string $name) : boolean

Test whether a name is a suitable plugin name

Arguments

string $name

The plugin name

Response

boolean

load_plugin(string $name) : string

Load a plugin

Arguments

string $name

The plugin name

Response

string

The name of the callable that this plugin is loaded into.

call_plugin(string $name, array $args = array()) : mixed

Call a user plugin

Arguments

string $name

The plugin name to call

array $args

Optional plugin arguments

Response

mixed