AkismetObject
in package
Table of Contents
Properties
- $errors : mixed
Methods
- errorsExist() : bool
- Check if any errors exist
- getError() : mixed
- Return a specific error message from the errors array
- getErrors() : array<string|int, string>
- Return all errors in the object
- isError() : bool
- Check if a certain error exists
- setError() : void
- Add a new error to the errors array in the object
Properties
$errors
public
mixed
$errors
= array()
Methods
errorsExist()
Check if any errors exist
public
errorsExist() : bool
Return values
boolgetError()
Return a specific error message from the errors array
public
getError(string $name) : mixed
Parameters
- $name : string
-
The name of the error you want
Return values
mixed —Returns a String if the error exists, a false boolean if it does not exist
getErrors()
Return all errors in the object
public
getErrors() : array<string|int, string>
Return values
array<string|int, string>isError()
Check if a certain error exists
public
isError(string $name) : bool
Parameters
- $name : string
-
The name of the error you want
Return values
boolsetError()
Add a new error to the errors array in the object
public
setError(string $name, mixed $message) : void
Parameters
- $name : string
-
A name (array key) for the error
- $message : mixed