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
|
|
|
} |