Completed
Branch EDTR/master (da238f)
by
unknown
09:58 queued 01:23
created

EspressoVenueEditor::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
namespace EventEspresso\core\domain\entities\routing\specifications\admin;
4
5
use EventEspresso\core\domain\entities\routing\specifications\MatchAnyRouteSpecification;
6
use EventEspresso\core\exceptions\InvalidEntityException;
7
use EventEspresso\core\services\request\RequestInterface;
8
9
/**
10
 * Class EspressoEventEditor
11
 * Composite MatchAnyRouteSpecification using EspressoVenueEditorEdit and EspressoVenueEditorAddNew
12
 * that will return true if either of the supplied Route Match Specifications returns true
13
 *  ie: returns true when the current request is for the Espresso Venue editor
14
 *      regardless of whether the user is editing or creating a new venue
15
 *
16
 * @package EventEspresso\core\domain\entities\routing\specifications
17
 * @author  Brent Christensen
18
 * @since   4.9.71.p
19
 */
20
class EspressoVenueEditor extends MatchAnyRouteSpecification
21
{
22
    /**
23
     * EspressoVenueEditor constructor.
24
     *
25
     * @param EspressoVenueEditorEdit $edit_venue_route_match
26
     * @param EspressoVenueEditorAddNew $create_venue_route_match
27
     * @param RequestInterface          $request
28
     * @throws InvalidEntityException
29
     */
30
    public function __construct(
31
        EspressoVenueEditorEdit $edit_venue_route_match,
32
        EspressoVenueEditorAddNew $create_venue_route_match,
33
        RequestInterface $request
34
    ) {
35
        parent::__construct(
36
            array($edit_venue_route_match, $create_venue_route_match),
37
            $request
38
        );
39
    }
40
}
41