|
1
|
|
|
<?php |
|
2
|
|
|
declare(strict_types=1); |
|
3
|
|
|
|
|
4
|
|
|
/* |
|
5
|
|
|
* Copyright (C) |
|
6
|
|
|
* Nathan Boiron <[email protected]> |
|
7
|
|
|
* Romain Canon <[email protected]> |
|
8
|
|
|
* |
|
9
|
|
|
* This file is part of the TYPO3 NotiZ project. |
|
10
|
|
|
* It is free software; you can redistribute it and/or modify it |
|
11
|
|
|
* under the terms of the GNU General Public License, either |
|
12
|
|
|
* version 3 of the License, or any later version. |
|
13
|
|
|
* |
|
14
|
|
|
* For the full copyright and license information, see: |
|
15
|
|
|
* http://www.gnu.org/licenses/gpl-3.0.html |
|
16
|
|
|
*/ |
|
17
|
|
|
|
|
18
|
|
|
namespace CuyZ\Notiz\Core\Exception; |
|
19
|
|
|
|
|
20
|
|
|
use CuyZ\Notiz\Core\Definition\Tree\EventGroup\Event\Connection\Hook; |
|
21
|
|
|
|
|
22
|
|
|
class ClassNotFoundException extends NotizException |
|
23
|
|
|
{ |
|
24
|
|
|
const DEFINITION_SOURCE_CLASS_NOT_FOUND = 'The definition source class `%s` was not found.'; |
|
25
|
|
|
|
|
26
|
|
|
const DEFINITION_PROCESSOR_CLASS_NOT_FOUND = 'The definition processor class `%s` was not found.'; |
|
27
|
|
|
|
|
28
|
|
|
const EVENT_CLASS_NOT_FOUND = 'The event class `%s` was not found.'; |
|
29
|
|
|
|
|
30
|
|
|
const TAG_SERVICE_PROPERTY_CLASS_NOT_FOUND = 'Trying to set an identifier (value: `%s`) for a property whose class was not found: `%s`.'; |
|
31
|
|
|
|
|
32
|
|
|
const NOTIFICATION_CLASS_NOT_FOUND = 'The notification class `%s` was not found.'; |
|
33
|
|
|
|
|
34
|
|
|
const NOTIFICATION_PROCESSOR_CLASS_NOT_FOUND = 'The processor class `%s` for the notification `%s` was not found.'; |
|
35
|
|
|
|
|
36
|
|
|
const NOTIFICATION_SETTINGS_CLASS_NOT_FOUND = 'The notification settings class `%s` was not found.'; |
|
37
|
|
|
|
|
38
|
|
|
const EVENT_HOOK_INTERFACE_NOT_FOUND = 'The interface `%s` was not found (used in the hook connection at the path `%s`).'; |
|
39
|
|
|
|
|
40
|
|
|
const EVENT_CONFIGURATION_FLEX_FORM_PROVIDER_CLASS_NOT_FOUND = 'The FlexForm provider class name `%s` was not found.'; |
|
41
|
|
|
|
|
42
|
|
|
const CHANNEL_SETTINGS_CLASS_NOT_FOUND = 'The channel settings class `%s` was not found.'; |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* @param string $className |
|
46
|
|
|
* @return self |
|
47
|
|
|
*/ |
|
48
|
|
|
public static function definitionSourceClassNotFound(string $className): self |
|
49
|
|
|
{ |
|
50
|
|
|
return self::makeNewInstance( |
|
51
|
|
|
self::DEFINITION_SOURCE_CLASS_NOT_FOUND, |
|
52
|
|
|
1503849399, |
|
53
|
|
|
[$className] |
|
54
|
|
|
); |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* @param string $className |
|
59
|
|
|
* @return self |
|
60
|
|
|
*/ |
|
61
|
|
|
public static function definitionProcessorClassNotFound(string $className): self |
|
62
|
|
|
{ |
|
63
|
|
|
return self::makeNewInstance( |
|
64
|
|
|
self::DEFINITION_PROCESSOR_CLASS_NOT_FOUND, |
|
65
|
|
|
1503849990, |
|
66
|
|
|
[$className] |
|
67
|
|
|
); |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
/** |
|
71
|
|
|
* @param string $className |
|
72
|
|
|
* @return self |
|
73
|
|
|
*/ |
|
74
|
|
|
public static function eventClassNotFound(string $className): self |
|
75
|
|
|
{ |
|
76
|
|
|
return self::makeNewInstance( |
|
77
|
|
|
self::EVENT_CLASS_NOT_FOUND, |
|
78
|
|
|
1503873178, |
|
79
|
|
|
[$className] |
|
80
|
|
|
); |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
/** |
|
84
|
|
|
* @param string $propertyType |
|
85
|
|
|
* @param string $identifier |
|
86
|
|
|
* @return self |
|
87
|
|
|
*/ |
|
88
|
|
|
public static function tagServicePropertyClassNotFound(string $propertyType, string $identifier): self |
|
89
|
|
|
{ |
|
90
|
|
|
return self::makeNewInstance( |
|
91
|
|
|
self::TAG_SERVICE_PROPERTY_CLASS_NOT_FOUND, |
|
92
|
|
|
1504167128, |
|
93
|
|
|
[$identifier, $propertyType] |
|
94
|
|
|
); |
|
95
|
|
|
} |
|
96
|
|
|
|
|
97
|
|
|
/** |
|
98
|
|
|
* @param string $className |
|
99
|
|
|
* @return self |
|
100
|
|
|
*/ |
|
101
|
|
|
public static function notificationClassNotFound(string $className): self |
|
102
|
|
|
{ |
|
103
|
|
|
return self::makeNewInstance( |
|
104
|
|
|
self::NOTIFICATION_CLASS_NOT_FOUND, |
|
105
|
|
|
1505821147, |
|
106
|
|
|
[$className] |
|
107
|
|
|
); |
|
108
|
|
|
} |
|
109
|
|
|
|
|
110
|
|
|
/** |
|
111
|
|
|
* @param string $notificationClassName |
|
112
|
|
|
* @param string $processorClassName |
|
113
|
|
|
* @return self |
|
114
|
|
|
*/ |
|
115
|
|
|
public static function notificationProcessorClassNotFound(string $notificationClassName, string $processorClassName): self |
|
116
|
|
|
{ |
|
117
|
|
|
return self::makeNewInstance( |
|
118
|
|
|
self::NOTIFICATION_PROCESSOR_CLASS_NOT_FOUND, |
|
119
|
|
|
1505829871, |
|
120
|
|
|
[$processorClassName, $notificationClassName] |
|
121
|
|
|
); |
|
122
|
|
|
} |
|
123
|
|
|
|
|
124
|
|
|
/** |
|
125
|
|
|
* @param string $className |
|
126
|
|
|
* @return self |
|
127
|
|
|
*/ |
|
128
|
|
|
public static function notificationSettingsClassNotFound(string $className): self |
|
129
|
|
|
{ |
|
130
|
|
|
return self::makeNewInstance( |
|
131
|
|
|
self::NOTIFICATION_SETTINGS_CLASS_NOT_FOUND, |
|
132
|
|
|
1506245086, |
|
133
|
|
|
[$className] |
|
134
|
|
|
); |
|
135
|
|
|
} |
|
136
|
|
|
|
|
137
|
|
|
/** |
|
138
|
|
|
* @param string $interface |
|
139
|
|
|
* @param Hook $hook |
|
140
|
|
|
* @return self |
|
141
|
|
|
*/ |
|
142
|
|
|
public static function eventHookInterfaceNotFound(string $interface, Hook $hook): self |
|
143
|
|
|
{ |
|
144
|
|
|
return self::makeNewInstance( |
|
145
|
|
|
self::EVENT_HOOK_INTERFACE_NOT_FOUND, |
|
146
|
|
|
1506800274, |
|
147
|
|
|
[ |
|
148
|
|
|
$interface, |
|
149
|
|
|
$hook->getPath() |
|
150
|
|
|
] |
|
151
|
|
|
); |
|
152
|
|
|
} |
|
153
|
|
|
|
|
154
|
|
|
/** |
|
155
|
|
|
* @param string $className |
|
156
|
|
|
* @return self |
|
157
|
|
|
*/ |
|
158
|
|
|
public static function eventConfigurationFlexFormProviderClassNotFound(string $className): self |
|
159
|
|
|
{ |
|
160
|
|
|
return self::makeNewInstance( |
|
161
|
|
|
self::EVENT_CONFIGURATION_FLEX_FORM_PROVIDER_CLASS_NOT_FOUND, |
|
162
|
|
|
1506952128, |
|
163
|
|
|
[$className] |
|
164
|
|
|
); |
|
165
|
|
|
} |
|
166
|
|
|
|
|
167
|
|
|
/** |
|
168
|
|
|
* @param string $className |
|
169
|
|
|
* @return self |
|
170
|
|
|
*/ |
|
171
|
|
|
public static function channelSettingsClassNotFound(string $className): self |
|
172
|
|
|
{ |
|
173
|
|
|
return self::makeNewInstance( |
|
174
|
|
|
self::CHANNEL_SETTINGS_CLASS_NOT_FOUND, |
|
175
|
|
|
1507409137, |
|
176
|
|
|
[$className] |
|
177
|
|
|
); |
|
178
|
|
|
} |
|
179
|
|
|
} |
|
180
|
|
|
|