Skip to content

ErrorsTrait

MekDrop edited this page Sep 13, 2022 · 1 revision
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!# Imponeer\ObjectErrors\ErrorsTrait

Trait that can be used when replacing old ImpressCMS or it's modules code Or maybe somewhere else... if you want it!

Methods

Name Description
__construct ErrorsTrait constructor.
getErrors return the errors for this object as an array
getHtmlErrors Returns the errors for this object as html
hasError Has some errors
setErrors add an error

ErrorsTrait::__construct

Description

public __construct (void)

ErrorsTrait constructor.

Parameters

This function has no parameters.

Return Values

void


ErrorsTrait::getErrors

Description

public getErrors (bool $ashtml)

return the errors for this object as an array

Parameters

  • (bool) $ashtml : Format using HTML?

Return Values

array|string

an array of errors


ErrorsTrait::getHtmlErrors

Description

public getHtmlErrors (void)

Returns the errors for this object as html

Parameters

This function has no parameters.

Return Values

string


ErrorsTrait::hasError

Description

public hasError (void)

Has some errors

Parameters

This function has no parameters.

Return Values

bool


ErrorsTrait::setErrors

Description

public setErrors (string $err_str)

add an error

Parameters

  • (string) $err_str : error to add

Return Values

void