\MatthiasWeb\UtilsPluginReceiver

This trait is used via Base trait and allows to consume the prefix filled but the UtilsProvider in your plugin. That allows you to dynamically get plugin data within your composer package.

Summary

Methods
Properties
Constants
getPluginConstant()
getPluginClassInstance()
getCore()
getPluginConstantPrefix()
$PLUGIN_CONST_FILE
$PLUGIN_CONST_INC
$PLUGIN_CONST_PATH
$PLUGIN_CONST_ROOT_SLUG
$PLUGIN_CONST_SLUG
$PLUGIN_CONST_TEXT_DOMAIN
$PLUGIN_CONST_DEBUG
$PLUGIN_CONST_DB_PREFIX
$PLUGIN_CONST_OPT_PREFIX
$PLUGIN_CONST_VERSION
$PLUGIN_CONST_NS
$PLUGIN_CLASS_ACTIVATOR
$PLUGIN_CLASS_ASSETS
$PLUGIN_CLASS_LOCALIZATION
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$PLUGIN_CONST_FILE

$PLUGIN_CONST_FILE :

Type

$PLUGIN_CONST_INC

$PLUGIN_CONST_INC :

Type

$PLUGIN_CONST_PATH

$PLUGIN_CONST_PATH :

Type

$PLUGIN_CONST_ROOT_SLUG

$PLUGIN_CONST_ROOT_SLUG :

Type

$PLUGIN_CONST_SLUG

$PLUGIN_CONST_SLUG :

Type

$PLUGIN_CONST_TEXT_DOMAIN

$PLUGIN_CONST_TEXT_DOMAIN :

Type

$PLUGIN_CONST_DEBUG

$PLUGIN_CONST_DEBUG :

Type

$PLUGIN_CONST_DB_PREFIX

$PLUGIN_CONST_DB_PREFIX :

Type

$PLUGIN_CONST_OPT_PREFIX

$PLUGIN_CONST_OPT_PREFIX :

Type

$PLUGIN_CONST_VERSION

$PLUGIN_CONST_VERSION :

Type

$PLUGIN_CONST_NS

$PLUGIN_CONST_NS :

Type

$PLUGIN_CLASS_ACTIVATOR

$PLUGIN_CLASS_ACTIVATOR :

Type

$PLUGIN_CLASS_ASSETS

$PLUGIN_CLASS_ASSETS :

Type

$PLUGIN_CLASS_LOCALIZATION

$PLUGIN_CLASS_LOCALIZATION :

Type

Methods

getPluginConstant()

getPluginConstant(string  $name = null): null|mixed|string

Get a value from a defined constant with no prefix.

The prefix is plugin relevant.

Parameters

string $name

Returns

null|mixed|string

getPluginClassInstance()

getPluginClassInstance(string  $name): mixed

Get a new instance of a plugin class from string (supports namespaces, too).

Parameters

string $name

Returns

mixed

getCore()

getCore(): mixed

Get the functions instance.

Returns

mixed

getPluginConstantPrefix()

getPluginConstantPrefix(): string

Get the plugins' constant prefix. Will be overwritten by the UtilsProvider class.

Returns

string