Completed
Branch FET/rest-relation-endpoints (02db8d)
by
unknown
27:05 queued 18:22
created

RestPasswordRequiredException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
1
<?php
2
3
namespace EventEspresso\core\exceptions;
4
5
use EventEspresso\core\libraries\rest_api\RestException;
6
7
/**
8
 * Class RestPasswordRequired
9
 *
10
 * An exception thrown by the REST API when a password is required to access something.
11
 * Can be caught in cases where upstream logic knows the password isn't required, and instead other consequences actions
12
 * taken (eg, removing protected fields, or nothing)
13
 *
14
 * @package     Event Espresso
15
 * @author         Mike Nelson
16
 * @since         4.9.74.p
17
 *
18
 */
19
class RestPasswordRequiredException extends RestException
20
{
21
    public function __construct($previous = null)
22
    {
23
        parent::__construct(
24
            'rest_post_password_required',
25
            esc_html__('A password is required to access this content.', 'event_espresso'),
26
            array(
27
                'status' => 403,
28
            ),
29
            $previous
30
        );
31
    }
32
}
33
// End of file RestPasswordRequired.php
34
// Location: EventEspresso\core\exceptions/RestPasswordRequired.php
35