pfSense-pkg-RESTAPI

BaseTraits

Defines a standard set of traits for all classes defined by this package. When class use this trait they will automatically inherit all resources included.

Table of Contents

Properties

$__log_level  : int

Methods

get_class_fqn()  : string
Obtains the fully qualified name of the called class.
get_class_shortname()  : string
Obtains the shortname of the called class.
get_classes_in_namespace()  : array<string|int, mixed>
Obtains all classes associated with this class's current namespace.
log()  : void
Writes a log entry to the applicable log file

Properties

Methods

get_class_fqn()

Obtains the fully qualified name of the called class.

public static get_class_fqn() : string
Return values
string

The FQN for this object's class.

get_class_shortname()

Obtains the shortname of the called class.

public static get_class_shortname() : string
Return values
string

The shortname for this object's class.

get_classes_in_namespace()

Obtains all classes associated with this class's current namespace.

public get_classes_in_namespace([bool $shortnames = false ]) : array<string|int, mixed>
Parameters
$shortnames : bool = false
Return values
array<string|int, mixed>

An array of classes currently in this object's namespace

log()

Writes a log entry to the applicable log file

public static log(int $level, string $message[, string $logfile = 'restapi' ]) : void
Parameters
$level : int

The log level to write. This should be one of the LOG_* constants defined by syslog.

$message : string

The message to write to the log file.

$logfile : string = 'restapi'

The log file to write to. This must be a valid logging facility defined in the package's info.xml file.


        
On this page

Search results