Skip to content

ErrorsCollection

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\ErrorsCollection

Collection of errors

Implements:

ArrayAccess, Countable, Serializable, JsonSerializable, Stringable

Methods

Name Description
__construct ErrorsCollection constructor.
__toString Converts errors list to string
add Adds an
clear Clear errors list
count
getHtml Gets errors list as HTML
isEmpty Is empty?
jsonSerialize
offsetExists Checks if offset exists
offsetGet Gets by pos
offsetSet Sets by pos
offsetUnset Tries to unset by offset but instead returns error
serialize
toArray Export data to array
toJson Export data to json
unserialize

ErrorsCollection::__construct

Description

public __construct (int $mode)

ErrorsCollection constructor.

Parameters

  • (int) $mode

Return Values

void


ErrorsCollection::__toString

Description

public __toString (void)

Converts errors list to string

Parameters

This function has no parameters.

Return Values

string


ErrorsCollection::add

Description

public add (array $err_data)

Adds an

Parameters

  • (array) $err_data

Return Values

void


ErrorsCollection::clear

Description

public clear (void)

Clear errors list

Parameters

This function has no parameters.

Return Values

void


ErrorsCollection::count

Description

 count (void)

Parameters

This function has no parameters.

Return Values

void


ErrorsCollection::getHtml

Description

public getHtml (void)

Gets errors list as HTML

Parameters

This function has no parameters.

Return Values

string

html listing the errors


ErrorsCollection::isEmpty

Description

public isEmpty (void)

Is empty?

Parameters

This function has no parameters.

Return Values

bool


ErrorsCollection::jsonSerialize

Description

 jsonSerialize (void)

Parameters

This function has no parameters.

Return Values

void


ErrorsCollection::offsetExists

Description

public offsetExists (mixed $offset)

Checks if offset exists

Parameters

  • (mixed) $offset

Return Values

bool


ErrorsCollection::offsetGet

Description

public offsetGet (mixed $offset)

Gets by pos

Parameters

  • (mixed) $offset

Return Values

mixed


ErrorsCollection::offsetSet

Description

public offsetSet (mixed $offset, mixed $value)

Sets by pos

Parameters

  • (mixed) $offset
  • (mixed) $value

Return Values

void


ErrorsCollection::offsetUnset

Description

public offsetUnset (mixed $offset)

Tries to unset by offset but instead returns error

Parameters

  • (mixed) $offset

Return Values

void

Throws Exceptions

\UnsetErrorException


ErrorsCollection::serialize

Description

 serialize (void)

Parameters

This function has no parameters.

Return Values

void


ErrorsCollection::toArray

Description

public toArray (void)

Export data to array

Parameters

This function has no parameters.

Return Values

array


ErrorsCollection::toJson

Description

public toJson (void)

Export data to json

Parameters

This function has no parameters.

Return Values

string


ErrorsCollection::unserialize

Description

 unserialize (void)

Parameters

This function has no parameters.

Return Values

void