ThrowableTrait
Trait to provide a throwable behavior to models.
This trait allows a class to specify whether its methods should throw exceptions or handle errors silently.
Tags
Table of Contents
Constants
- THROWABLE = 'throwable'
- Key used in initialization arrays to set throwable behavior.
Properties
- $throwable : bool
- Determines if methods should throw exceptions.
Methods
- initializeThrowable() : static
- Initializes the throwable property from an array of options.
Constants
THROWABLE
Key used in initialization arrays to set throwable behavior.
public
mixed
THROWABLE
= 'throwable'
Properties
$throwable
Determines if methods should throw exceptions.
public
bool
$throwable
= false
Methods
initializeThrowable()
Initializes the throwable property from an array of options.
public
initializeThrowable([array<string, mixed> $init = [] ]) : static
Parameters
- $init : array<string, mixed> = []
-
Initialization options