Completed
Branch EDTR/refactor-fast-api-fetch (cef37c)
by
unknown
09:44 queued 46s
created

GraphQLManager   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 39
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A init() 0 5 1
1
<?php
2
/**
3
 *     Event Espresso
4
 *     Manage events, sell tickets, and receive payments from your WordPress website.
5
 *     Copyright (c) 2008-2019 Event Espresso  All Rights Reserved.
6
 *
7
 *     This program is free software: you can redistribute it and/or modify
8
 *     it under the terms of the GNU General Public License as published by
9
 *     the Free Software Foundation, either version 3 of the License, or
10
 *     (at your option) any later version.
11
 *
12
 *     This program is distributed in the hope that it will be useful,
13
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *     GNU General Public License for more details.
16
 *
17
 *     You should have received a copy of the GNU General Public License
18
 *     along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
 */
20
21
namespace EventEspresso\core\services\graphql;
22
23
use EventEspresso\core\services\collections\CollectionDetailsException;
24
use EventEspresso\core\services\collections\CollectionLoaderException;
25
26
/**
27
 * Class GraphQLManager
28
 * Loads and initializes all of the components required for integrating EE with GraphQL
29
 *
30
 * @package EventEspresso\core\services\graphql
31
 * @author  Brent Christensen
32
 * @since   $VID:$
33
 */
34
class GraphQLManager
35
{
36
37
    /**
38
     * @var TypesManager $types_manager
39
     */
40
    protected $types_manager;
41
42
    /**
43
     * @var ConnectionsManager $connections_manager
44
     */
45
    protected $connections_manager;
46
47
48
    /**
49
     * GraphQLManager constructor.
50
     *
51
     * @param TypesManager $types_manager
52
     * @param ConnectionsManager $connections_manager
53
     */
54
    public function __construct(TypesManager $types_manager, ConnectionsManager $connections_manager)
55
    {
56
        $this->types_manager = $types_manager;
57
        $this->connections_manager = $connections_manager;
58
    }
59
60
61
    /**
62
     * @throws CollectionDetailsException
63
     * @throws CollectionLoaderException
64
     * @since $VID:$
65
     */
66
    public function init()
67
    {
68
        $this->types_manager->init();
69
        $this->connections_manager->init();
70
    }
71
72
}