Documentation

messages
in package

Class messages

Tags
author

Lutz Boldt boldt@bitstore-online.de

Table of Contents

Properties

$tsystemmessages  : tab_systemmessages

Methods

__construct()  : void
Constructor method.
__destruct()  : void
Destructor method.
all()  : array<string|int, mixed>|bool
Get all system messages.
delete()  : bool
Deletes system messages based on a given value and column.
get()  : array<string|int, mixed>|bool
Retrieves a specific value from the tsystemmessages object based on the provided parameters.
getpriority()  : string
getview()  : string
insert()  : bool
Inserts a new system message into the database.
update()  : bool
Updates a system message.

Properties

Methods

__construct()

Constructor method.

public __construct() : void

This method is used to initialize the object of the class and set the initial values. It creates a new instance of the "tab_systemmessages" class and assigns it to the property "$tsystemmessages".

__destruct()

Destructor method.

public __destruct() : void

This method is automatically called when the object of the class is destroyed. It is used to clean up any resources or perform any final operations before the object is destroyed. In this case, it unsets the property "$tsystemmessages" to release the memory associated with it.

all()

Get all system messages.

public all([string $val = '' ][, string $col = 'active' ]) : array<string|int, mixed>|bool
Parameters
$val : string = ''

(optional) The value to search for in the system messages. Defaults to an empty string.

$col : string = 'active'

(optional) The column to search for the value in the system messages table. Defaults to 'active'.

Return values
array<string|int, mixed>|bool

Returns an array of system messages or false if an error occurred.

delete()

Deletes system messages based on a given value and column.

public delete(string $val[, string $col = 'id' ]) : bool
Parameters
$val : string

The value to search for in the specified column.

$col : string = 'id'

The column in which to search for the specified value.

Return values
bool

True if the system messages were deleted successfully, false otherwise.

get()

Retrieves a specific value from the tsystemmessages object based on the provided parameters.

public get(string $val[, string $col = 'id' ]) : array<string|int, mixed>|bool
Parameters
$val : string

The value to search for.

$col : string = 'id'

The column to search in. Default value is 'id'.

Return values
array<string|int, mixed>|bool

Returns an array if the value is found, or a boolean false if not found.

getpriority()

public getpriority(string $class) : string
Parameters
$class : string
Return values
string

getview()

public getview(array<string|int, mixed> $s) : string
Parameters
$s : array<string|int, mixed>
Return values
string

insert()

Inserts a new system message into the database.

public insert(string $end, string $class, string $title, string $message, string $active) : bool
Parameters
$end : string

The end timestamp of the system message.

$class : string

The css-class of the system message.

$title : string

The title of the system message.

$message : string

The content of the system message.

$active : string

The active status of the system message.

Return values
bool

Returns true if the system message was successfully inserted, false otherwise.

update()

Updates a system message.

public update(string $col, string $val, string $id) : bool
Parameters
$col : string

The column to update in the system message table.

$val : string

The new value to set for the specified column.

$id : string

The ID of the system message to update.

Return values
bool

True if the update was successful, false otherwise.


        
On this page

Search results