Skip to content

Commit d41f21a

Browse files
committed
Update docs
1 parent e34f024 commit d41f21a

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ HTTP Status Codes and Exceptions
99

1010
## Requirements
1111

12-
- **php**: ^7.1
12+
- **php**: ^7.1 | ^8.0
1313

1414
## Installing
1515

@@ -25,6 +25,19 @@ composer require 'corpus/http'
2525

2626
Base Exception class all HTTP Exception Classes Extend
2727

28+
#### Method: AbstractHttpException->__construct
29+
30+
```php
31+
function __construct([ $message = '' [, ?\Throwable $previous = null]])
32+
```
33+
34+
Construct the *HttpException.
35+
36+
##### Parameters:
37+
38+
- ***string*** `$message`
39+
- ***\Throwable*** | ***null*** `$previous`
40+
2841
### Class: \Corpus\Http\Exceptions\ClientError\AbstractClientErrorException
2942

3043
Base of Exceptions Representing The 4xx Class

src/Exceptions/AbstractHttpException.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
*/
1010
abstract class AbstractHttpException extends \RuntimeException implements StatusAwareInterface {
1111

12+
/**
13+
* Construct the *HttpException.
14+
*
15+
* Use the HTTP Status code as the base exceptions code.
16+
*
17+
* @param string $message
18+
*/
1219
public function __construct( $message = '', ?\Throwable $previous = null ) {
1320
parent::__construct($message, $this->getHttpStatusCode(), $previous);
1421
}

0 commit comments

Comments
 (0)