|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace EventEspresso\core\domain\entities\routing\handlers\admin; |
|
4
|
|
|
|
|
5
|
|
|
use EE_Dependency_Map; |
|
6
|
|
|
use EventEspresso\core\services\routing\PrimaryRoute; |
|
7
|
|
|
use EventEspresso\core\services\routing\Route; |
|
8
|
|
|
use EventEspresso\core\services\routing\Router; |
|
9
|
|
|
|
|
10
|
|
|
/** |
|
11
|
|
|
* Class ActivationRequests |
|
12
|
|
|
* registers dependencies for activation request |
|
13
|
|
|
* |
|
14
|
|
|
* @package EventEspresso\core\domain\entities\routing\handlers\shared |
|
15
|
|
|
* @author Brent Christensen |
|
16
|
|
|
* @since $VID:$ |
|
17
|
|
|
*/ |
|
18
|
|
|
class ActivationRequests extends PrimaryRoute |
|
19
|
|
|
{ |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* returns true if the current request matches this route |
|
23
|
|
|
* |
|
24
|
|
|
* @return bool |
|
25
|
|
|
* @since $VID:$ |
|
26
|
|
|
*/ |
|
27
|
|
|
public function matchesCurrentRequest() |
|
28
|
|
|
{ |
|
29
|
|
|
return $this->request->isActivation(); |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* @since $VID:$ |
|
35
|
|
|
*/ |
|
36
|
|
|
protected function registerDependencies() |
|
37
|
|
|
{ |
|
38
|
|
|
$this->dependency_map->registerDependencies( |
|
39
|
|
|
'EventEspresso\core\domain\entities\routing\handlers\admin\AdminRoute', |
|
40
|
|
|
['EE_Admin_Config' => EE_Dependency_Map::load_from_cache] + Route::$default_dependencies |
|
41
|
|
|
); |
|
42
|
|
|
$this->dependency_map->registerDependencies( |
|
43
|
|
|
'EventEspresso\core\domain\entities\routing\handlers\admin\PueRequests', |
|
44
|
|
|
Route::$default_dependencies |
|
45
|
|
|
); |
|
46
|
|
|
$this->dependency_map->registerDependencies( |
|
47
|
|
|
'EventEspresso\core\domain\entities\routing\handlers\admin\WordPressPluginsPage', |
|
48
|
|
|
Route::$default_dependencies |
|
49
|
|
|
); |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* implements logic required to run during request |
|
55
|
|
|
* |
|
56
|
|
|
* @return bool |
|
57
|
|
|
* @since $VID:$ |
|
58
|
|
|
*/ |
|
59
|
|
|
protected function requestHandler() |
|
60
|
|
|
{ |
|
61
|
|
|
$this->setRouteRequestType(PrimaryRoute::ROUTE_REQUEST_TYPE_ACTIVATION); |
|
62
|
|
|
return true; |
|
63
|
|
|
} |
|
64
|
|
|
} |
|
65
|
|
|
|