-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExceptionAttributesInterface.php
executable file
·44 lines (38 loc) · 1.17 KB
/
ExceptionAttributesInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/*
* This file is part of the `src-run/augustus-exception-library` project.
*
* (c) Rob Frawley 2nd <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace SR\Exception;
interface ExceptionAttributesInterface extends \Throwable
{
/**
* Returns the attributes array.
*/
public function getAttributes(): array;
/**
* Sets an attribute property using the index and value provided.
*
* @param string $index Index string
* @param mixed $value Value to set
*/
public function setAttribute(string $index, mixed $value): ExceptionInterface;
/**
* Returns true if an attribute with the specified index exists.
*
* @param string $index The attribute index to search for
*/
public function hasAttribute(string $index): bool;
/**
* Returns the value of an attribute with the specified index, or null if such an attribute does not exist.
*
* @param string $index The attribute index to search for
*
* @return mixed|null
*/
public function getAttribute(string $index): mixed;
}