Documentation

Base uses trait:short

Base trait for all available classes in your plugin. The trait itself should not be directly used, use the UtilsProvider trait instead in your plugin! But you can still use the methods defined there.

Table of Contents

Methods

debug()  : string
Simple-to-use error_log debug log. This debug is only printed out when you define _DEBUG constant in wp-config.php
getCore()  : mixed
Get the functions instance.
getPluginClassInstance()  : mixed
Get a new instance of a plugin class from string (supports namespaces, too).
getPluginConstant()  : null|mixed|string
Get a value from a defined constant with no prefix.
getPluginConstantPrefix()  : string
Get the plugins' constant prefix. Will be overwritten by the UtilsProvider class.
getTableName()  : string
Get a plugin relevant table name depending on the _DB_PREFIX constant.

Methods

debug()

Simple-to-use error_log debug log. This debug is only printed out when you define _DEBUG constant in wp-config.php

public debug(mixed $message[, string $methodOrFunction = null ]) : string
Parameters
$message : mixed

The message

$methodOrFunction : string = null

METHOD or FUNCTION

Return values
string

getPluginClassInstance()

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

public getPluginClassInstance(string $name) : mixed
Parameters
$name : string

getPluginConstant()

Get a value from a defined constant with no prefix.

public getPluginConstant([string $name = null ]) : null|mixed|string

The prefix is plugin relevant.

Parameters
$name : string = null
Return values
null|mixed|string

getPluginConstantPrefix()

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

public getPluginConstantPrefix() : string
Return values
string

getTableName()

Get a plugin relevant table name depending on the _DB_PREFIX constant.

public getTableName([string $name = '' ]) : string
Parameters
$name : string = ''

Append this name to the plugins relevant table with _{$name}.

Return values
string

        
On this page

Search results