@@ -15,71 +15,71 @@ |
||
| 15 | 15 | class PueRequests extends Route |
| 16 | 16 | { |
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * returns true if the current request matches this route |
|
| 20 | - * |
|
| 21 | - * @return bool |
|
| 22 | - * @since $VID:$ |
|
| 23 | - */ |
|
| 24 | - public function matchesCurrentRequest() |
|
| 25 | - { |
|
| 26 | - return $this->request->isAdmin() && apply_filters('FHEE__EE_System__brew_espresso__load_pue', true); |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * returns true if the current request matches this route |
|
| 20 | + * |
|
| 21 | + * @return bool |
|
| 22 | + * @since $VID:$ |
|
| 23 | + */ |
|
| 24 | + public function matchesCurrentRequest() |
|
| 25 | + { |
|
| 26 | + return $this->request->isAdmin() && apply_filters('FHEE__EE_System__brew_espresso__load_pue', true); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * @since $VID:$ |
|
| 32 | - */ |
|
| 33 | - protected function registerDependencies() |
|
| 34 | - { |
|
| 35 | - $this->dependency_map->registerDependencies( |
|
| 36 | - 'EventEspresso\core\services\licensing\LicenseService', |
|
| 37 | - [ |
|
| 38 | - 'EventEspresso\core\domain\services\pue\Stats' => EE_Dependency_Map::load_from_cache, |
|
| 39 | - 'EventEspresso\core\domain\services\pue\Config' => EE_Dependency_Map::load_from_cache, |
|
| 40 | - ] |
|
| 41 | - ); |
|
| 42 | - $this->dependency_map->registerDependencies( |
|
| 43 | - 'EventEspresso\core\domain\services\pue\Stats', |
|
| 44 | - [ |
|
| 45 | - 'EventEspresso\core\domain\services\pue\Config' => EE_Dependency_Map::load_from_cache, |
|
| 46 | - 'EE_Maintenance_Mode' => EE_Dependency_Map::load_from_cache, |
|
| 47 | - 'EventEspresso\core\domain\services\pue\StatsGatherer' => EE_Dependency_Map::load_from_cache, |
|
| 48 | - ] |
|
| 49 | - ); |
|
| 50 | - $this->dependency_map->registerDependencies( |
|
| 51 | - 'EventEspresso\core\domain\services\pue\Config', |
|
| 52 | - [ |
|
| 53 | - 'EE_Network_Config' => EE_Dependency_Map::load_from_cache, |
|
| 54 | - 'EE_Config' => EE_Dependency_Map::load_from_cache, |
|
| 55 | - ] |
|
| 56 | - ); |
|
| 57 | - $this->dependency_map->registerDependencies( |
|
| 58 | - 'EventEspresso\core\domain\services\pue\StatsGatherer', |
|
| 59 | - [ |
|
| 60 | - 'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache, |
|
| 61 | - 'EEM_Event' => EE_Dependency_Map::load_from_cache, |
|
| 62 | - 'EEM_Datetime' => EE_Dependency_Map::load_from_cache, |
|
| 63 | - 'EEM_Ticket' => EE_Dependency_Map::load_from_cache, |
|
| 64 | - 'EEM_Registration' => EE_Dependency_Map::load_from_cache, |
|
| 65 | - 'EEM_Transaction' => EE_Dependency_Map::load_from_cache, |
|
| 66 | - 'EE_Config' => EE_Dependency_Map::load_from_cache, |
|
| 67 | - ] |
|
| 68 | - ); |
|
| 69 | - } |
|
| 30 | + /** |
|
| 31 | + * @since $VID:$ |
|
| 32 | + */ |
|
| 33 | + protected function registerDependencies() |
|
| 34 | + { |
|
| 35 | + $this->dependency_map->registerDependencies( |
|
| 36 | + 'EventEspresso\core\services\licensing\LicenseService', |
|
| 37 | + [ |
|
| 38 | + 'EventEspresso\core\domain\services\pue\Stats' => EE_Dependency_Map::load_from_cache, |
|
| 39 | + 'EventEspresso\core\domain\services\pue\Config' => EE_Dependency_Map::load_from_cache, |
|
| 40 | + ] |
|
| 41 | + ); |
|
| 42 | + $this->dependency_map->registerDependencies( |
|
| 43 | + 'EventEspresso\core\domain\services\pue\Stats', |
|
| 44 | + [ |
|
| 45 | + 'EventEspresso\core\domain\services\pue\Config' => EE_Dependency_Map::load_from_cache, |
|
| 46 | + 'EE_Maintenance_Mode' => EE_Dependency_Map::load_from_cache, |
|
| 47 | + 'EventEspresso\core\domain\services\pue\StatsGatherer' => EE_Dependency_Map::load_from_cache, |
|
| 48 | + ] |
|
| 49 | + ); |
|
| 50 | + $this->dependency_map->registerDependencies( |
|
| 51 | + 'EventEspresso\core\domain\services\pue\Config', |
|
| 52 | + [ |
|
| 53 | + 'EE_Network_Config' => EE_Dependency_Map::load_from_cache, |
|
| 54 | + 'EE_Config' => EE_Dependency_Map::load_from_cache, |
|
| 55 | + ] |
|
| 56 | + ); |
|
| 57 | + $this->dependency_map->registerDependencies( |
|
| 58 | + 'EventEspresso\core\domain\services\pue\StatsGatherer', |
|
| 59 | + [ |
|
| 60 | + 'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache, |
|
| 61 | + 'EEM_Event' => EE_Dependency_Map::load_from_cache, |
|
| 62 | + 'EEM_Datetime' => EE_Dependency_Map::load_from_cache, |
|
| 63 | + 'EEM_Ticket' => EE_Dependency_Map::load_from_cache, |
|
| 64 | + 'EEM_Registration' => EE_Dependency_Map::load_from_cache, |
|
| 65 | + 'EEM_Transaction' => EE_Dependency_Map::load_from_cache, |
|
| 66 | + 'EE_Config' => EE_Dependency_Map::load_from_cache, |
|
| 67 | + ] |
|
| 68 | + ); |
|
| 69 | + } |
|
| 70 | 70 | |
| 71 | 71 | |
| 72 | - /** |
|
| 73 | - * implements logic required to run during request |
|
| 74 | - * |
|
| 75 | - * @return bool |
|
| 76 | - * @since $VID:$ |
|
| 77 | - */ |
|
| 78 | - protected function requestHandler() |
|
| 79 | - { |
|
| 80 | - // pew pew pew |
|
| 81 | - $this->loader->getShared('EventEspresso\core\services\licensing\LicenseService'); |
|
| 82 | - do_action('AHEE__EE_System__brew_espresso__after_pue_init'); |
|
| 83 | - return true; |
|
| 84 | - } |
|
| 72 | + /** |
|
| 73 | + * implements logic required to run during request |
|
| 74 | + * |
|
| 75 | + * @return bool |
|
| 76 | + * @since $VID:$ |
|
| 77 | + */ |
|
| 78 | + protected function requestHandler() |
|
| 79 | + { |
|
| 80 | + // pew pew pew |
|
| 81 | + $this->loader->getShared('EventEspresso\core\services\licensing\LicenseService'); |
|
| 82 | + do_action('AHEE__EE_System__brew_espresso__after_pue_init'); |
|
| 83 | + return true; |
|
| 84 | + } |
|
| 85 | 85 | } |
@@ -16,109 +16,109 @@ |
||
| 16 | 16 | class EspressoLegacyAdmin extends Route |
| 17 | 17 | { |
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * returns true if the current request matches this route |
|
| 21 | - * |
|
| 22 | - * @return bool |
|
| 23 | - * @since $VID:$ |
|
| 24 | - */ |
|
| 25 | - public function matchesCurrentRequest() |
|
| 26 | - { |
|
| 27 | - return $this->request->isAdmin() || $this->request->isAdminAjax(); |
|
| 28 | - } |
|
| 19 | + /** |
|
| 20 | + * returns true if the current request matches this route |
|
| 21 | + * |
|
| 22 | + * @return bool |
|
| 23 | + * @since $VID:$ |
|
| 24 | + */ |
|
| 25 | + public function matchesCurrentRequest() |
|
| 26 | + { |
|
| 27 | + return $this->request->isAdmin() || $this->request->isAdminAjax(); |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * @since $VID:$ |
|
| 33 | - */ |
|
| 34 | - protected function registerDependencies() |
|
| 35 | - { |
|
| 36 | - $this->dependency_map->registerDependencies( |
|
| 37 | - 'EventEspresso\core\domain\services\assets\EspressoLegacyAdminAssetManager', |
|
| 38 | - [ |
|
| 39 | - 'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache, |
|
| 40 | - 'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache, |
|
| 41 | - 'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache, |
|
| 42 | - ] |
|
| 43 | - ); |
|
| 44 | - $this->dependency_map->registerDependencies( |
|
| 45 | - 'EE_Admin_Transactions_List_Table', |
|
| 46 | - [ |
|
| 47 | - null, |
|
| 48 | - 'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache, |
|
| 49 | - ] |
|
| 50 | - ); |
|
| 51 | - $this->dependency_map->registerDependencies( |
|
| 52 | - 'EventEspresso\caffeinated\modules\recaptcha_invisible\RecaptchaAdminSettings', |
|
| 53 | - ['EE_Registration_Config' => EE_Dependency_Map::load_from_cache] |
|
| 54 | - ); |
|
| 55 | - $this->dependency_map->registerDependencies( |
|
| 56 | - 'EventEspresso\admin_pages\general_settings\OrganizationSettings', |
|
| 57 | - [ |
|
| 58 | - 'EE_Registry' => EE_Dependency_Map::load_from_cache, |
|
| 59 | - 'EE_Organization_Config' => EE_Dependency_Map::load_from_cache, |
|
| 60 | - 'EE_Core_Config' => EE_Dependency_Map::load_from_cache, |
|
| 61 | - 'EE_Network_Core_Config' => EE_Dependency_Map::load_from_cache, |
|
| 62 | - 'EventEspresso\core\services\address\CountrySubRegionDao' => EE_Dependency_Map::load_from_cache, |
|
| 63 | - ] |
|
| 64 | - ); |
|
| 65 | - $this->dependency_map->registerDependencies( |
|
| 66 | - 'EventEspresso\core\services\address\CountrySubRegionDao', |
|
| 67 | - [ |
|
| 68 | - 'EEM_State' => EE_Dependency_Map::load_from_cache, |
|
| 69 | - 'EventEspresso\core\services\validators\JsonValidator' => EE_Dependency_Map::load_from_cache |
|
| 70 | - ] |
|
| 71 | - ); |
|
| 72 | - $this->dependency_map->registerDependencies( |
|
| 73 | - 'EventEspresso\core\domain\services\admin\registrations\list_table\QueryBuilder', |
|
| 74 | - [ |
|
| 75 | - null, |
|
| 76 | - 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 77 | - 'EEM_Registration' => EE_Dependency_Map::load_from_cache, |
|
| 78 | - ] |
|
| 79 | - ); |
|
| 80 | - $this->dependency_map->registerDependencies( |
|
| 81 | - 'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\AttendeeFilterHeader', |
|
| 82 | - [ |
|
| 83 | - 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 84 | - 'EEM_Attendee' => EE_Dependency_Map::load_from_cache, |
|
| 85 | - ] |
|
| 86 | - ); |
|
| 87 | - $this->dependency_map->registerDependencies( |
|
| 88 | - 'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\DateFilterHeader', |
|
| 89 | - [ |
|
| 90 | - 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 91 | - 'EEM_Datetime' => EE_Dependency_Map::load_from_cache, |
|
| 92 | - ] |
|
| 93 | - ); |
|
| 94 | - $this->dependency_map->registerDependencies( |
|
| 95 | - 'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\EventFilterHeader', |
|
| 96 | - [ |
|
| 97 | - 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 98 | - 'EEM_Event' => EE_Dependency_Map::load_from_cache, |
|
| 99 | - ] |
|
| 100 | - ); |
|
| 101 | - $this->dependency_map->registerDependencies( |
|
| 102 | - 'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\TicketFilterHeader', |
|
| 103 | - [ |
|
| 104 | - 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 105 | - 'EEM_Ticket' => EE_Dependency_Map::load_from_cache, |
|
| 106 | - ] |
|
| 107 | - ); |
|
| 108 | - } |
|
| 31 | + /** |
|
| 32 | + * @since $VID:$ |
|
| 33 | + */ |
|
| 34 | + protected function registerDependencies() |
|
| 35 | + { |
|
| 36 | + $this->dependency_map->registerDependencies( |
|
| 37 | + 'EventEspresso\core\domain\services\assets\EspressoLegacyAdminAssetManager', |
|
| 38 | + [ |
|
| 39 | + 'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache, |
|
| 40 | + 'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache, |
|
| 41 | + 'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache, |
|
| 42 | + ] |
|
| 43 | + ); |
|
| 44 | + $this->dependency_map->registerDependencies( |
|
| 45 | + 'EE_Admin_Transactions_List_Table', |
|
| 46 | + [ |
|
| 47 | + null, |
|
| 48 | + 'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache, |
|
| 49 | + ] |
|
| 50 | + ); |
|
| 51 | + $this->dependency_map->registerDependencies( |
|
| 52 | + 'EventEspresso\caffeinated\modules\recaptcha_invisible\RecaptchaAdminSettings', |
|
| 53 | + ['EE_Registration_Config' => EE_Dependency_Map::load_from_cache] |
|
| 54 | + ); |
|
| 55 | + $this->dependency_map->registerDependencies( |
|
| 56 | + 'EventEspresso\admin_pages\general_settings\OrganizationSettings', |
|
| 57 | + [ |
|
| 58 | + 'EE_Registry' => EE_Dependency_Map::load_from_cache, |
|
| 59 | + 'EE_Organization_Config' => EE_Dependency_Map::load_from_cache, |
|
| 60 | + 'EE_Core_Config' => EE_Dependency_Map::load_from_cache, |
|
| 61 | + 'EE_Network_Core_Config' => EE_Dependency_Map::load_from_cache, |
|
| 62 | + 'EventEspresso\core\services\address\CountrySubRegionDao' => EE_Dependency_Map::load_from_cache, |
|
| 63 | + ] |
|
| 64 | + ); |
|
| 65 | + $this->dependency_map->registerDependencies( |
|
| 66 | + 'EventEspresso\core\services\address\CountrySubRegionDao', |
|
| 67 | + [ |
|
| 68 | + 'EEM_State' => EE_Dependency_Map::load_from_cache, |
|
| 69 | + 'EventEspresso\core\services\validators\JsonValidator' => EE_Dependency_Map::load_from_cache |
|
| 70 | + ] |
|
| 71 | + ); |
|
| 72 | + $this->dependency_map->registerDependencies( |
|
| 73 | + 'EventEspresso\core\domain\services\admin\registrations\list_table\QueryBuilder', |
|
| 74 | + [ |
|
| 75 | + null, |
|
| 76 | + 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 77 | + 'EEM_Registration' => EE_Dependency_Map::load_from_cache, |
|
| 78 | + ] |
|
| 79 | + ); |
|
| 80 | + $this->dependency_map->registerDependencies( |
|
| 81 | + 'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\AttendeeFilterHeader', |
|
| 82 | + [ |
|
| 83 | + 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 84 | + 'EEM_Attendee' => EE_Dependency_Map::load_from_cache, |
|
| 85 | + ] |
|
| 86 | + ); |
|
| 87 | + $this->dependency_map->registerDependencies( |
|
| 88 | + 'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\DateFilterHeader', |
|
| 89 | + [ |
|
| 90 | + 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 91 | + 'EEM_Datetime' => EE_Dependency_Map::load_from_cache, |
|
| 92 | + ] |
|
| 93 | + ); |
|
| 94 | + $this->dependency_map->registerDependencies( |
|
| 95 | + 'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\EventFilterHeader', |
|
| 96 | + [ |
|
| 97 | + 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 98 | + 'EEM_Event' => EE_Dependency_Map::load_from_cache, |
|
| 99 | + ] |
|
| 100 | + ); |
|
| 101 | + $this->dependency_map->registerDependencies( |
|
| 102 | + 'EventEspresso\core\domain\services\admin\registrations\list_table\page_header\TicketFilterHeader', |
|
| 103 | + [ |
|
| 104 | + 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 105 | + 'EEM_Ticket' => EE_Dependency_Map::load_from_cache, |
|
| 106 | + ] |
|
| 107 | + ); |
|
| 108 | + } |
|
| 109 | 109 | |
| 110 | 110 | |
| 111 | - /** |
|
| 112 | - * implements logic required to run during request |
|
| 113 | - * |
|
| 114 | - * @return bool |
|
| 115 | - * @since $VID:$ |
|
| 116 | - */ |
|
| 117 | - protected function requestHandler() |
|
| 118 | - { |
|
| 119 | - do_action('AHEE__EE_System__load_controllers__load_admin_controllers'); |
|
| 120 | - $this->loader->getShared('EventEspresso\core\domain\services\assets\EspressoLegacyAdminAssetManager'); |
|
| 121 | - $this->loader->getShared('EE_Admin'); |
|
| 122 | - return true; |
|
| 123 | - } |
|
| 111 | + /** |
|
| 112 | + * implements logic required to run during request |
|
| 113 | + * |
|
| 114 | + * @return bool |
|
| 115 | + * @since $VID:$ |
|
| 116 | + */ |
|
| 117 | + protected function requestHandler() |
|
| 118 | + { |
|
| 119 | + do_action('AHEE__EE_System__load_controllers__load_admin_controllers'); |
|
| 120 | + $this->loader->getShared('EventEspresso\core\domain\services\assets\EspressoLegacyAdminAssetManager'); |
|
| 121 | + $this->loader->getShared('EE_Admin'); |
|
| 122 | + return true; |
|
| 123 | + } |
|
| 124 | 124 | } |
@@ -19,109 +19,109 @@ |
||
| 19 | 19 | class PersonalDataRequests extends Route |
| 20 | 20 | { |
| 21 | 21 | |
| 22 | - /** |
|
| 23 | - * @var EE_Maintenance_Mode $maintenance_mode |
|
| 24 | - */ |
|
| 25 | - private $maintenance_mode; |
|
| 22 | + /** |
|
| 23 | + * @var EE_Maintenance_Mode $maintenance_mode |
|
| 24 | + */ |
|
| 25 | + private $maintenance_mode; |
|
| 26 | 26 | |
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * Route constructor. |
|
| 30 | - * |
|
| 31 | - * @param EE_Dependency_Map $dependency_map |
|
| 32 | - * @param EE_Maintenance_Mode $maintenance_mode |
|
| 33 | - * @param LoaderInterface $loader |
|
| 34 | - * @param RequestInterface $request |
|
| 35 | - */ |
|
| 36 | - public function __construct( |
|
| 37 | - EE_Dependency_Map $dependency_map, |
|
| 38 | - EE_Maintenance_Mode $maintenance_mode, |
|
| 39 | - LoaderInterface $loader, |
|
| 40 | - RequestInterface $request |
|
| 41 | - ) { |
|
| 42 | - $this->maintenance_mode = $maintenance_mode; |
|
| 43 | - parent::__construct($dependency_map, $loader, $request); |
|
| 44 | - } |
|
| 28 | + /** |
|
| 29 | + * Route constructor. |
|
| 30 | + * |
|
| 31 | + * @param EE_Dependency_Map $dependency_map |
|
| 32 | + * @param EE_Maintenance_Mode $maintenance_mode |
|
| 33 | + * @param LoaderInterface $loader |
|
| 34 | + * @param RequestInterface $request |
|
| 35 | + */ |
|
| 36 | + public function __construct( |
|
| 37 | + EE_Dependency_Map $dependency_map, |
|
| 38 | + EE_Maintenance_Mode $maintenance_mode, |
|
| 39 | + LoaderInterface $loader, |
|
| 40 | + RequestInterface $request |
|
| 41 | + ) { |
|
| 42 | + $this->maintenance_mode = $maintenance_mode; |
|
| 43 | + parent::__construct($dependency_map, $loader, $request); |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | 46 | |
| 47 | - /** |
|
| 48 | - * returns true if the current request matches this route |
|
| 49 | - * |
|
| 50 | - * @return bool |
|
| 51 | - * @since $VID:$ |
|
| 52 | - */ |
|
| 53 | - public function matchesCurrentRequest() |
|
| 54 | - { |
|
| 55 | - return ($this->request->isAdmin() || $this->request->isAjax()) && $this->maintenance_mode->models_can_query(); |
|
| 56 | - } |
|
| 47 | + /** |
|
| 48 | + * returns true if the current request matches this route |
|
| 49 | + * |
|
| 50 | + * @return bool |
|
| 51 | + * @since $VID:$ |
|
| 52 | + */ |
|
| 53 | + public function matchesCurrentRequest() |
|
| 54 | + { |
|
| 55 | + return ($this->request->isAdmin() || $this->request->isAjax()) && $this->maintenance_mode->models_can_query(); |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | 58 | |
| 59 | - /** |
|
| 60 | - * @since $VID:$ |
|
| 61 | - */ |
|
| 62 | - protected function registerDependencies() |
|
| 63 | - { |
|
| 64 | - $this->dependency_map->registerDependencies( |
|
| 65 | - 'EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy', |
|
| 66 | - [ |
|
| 67 | - 'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache, |
|
| 68 | - 'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache |
|
| 69 | - ] |
|
| 70 | - ); |
|
| 71 | - $this->dependency_map->registerDependencies( |
|
| 72 | - 'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendee', |
|
| 73 | - ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
|
| 74 | - ); |
|
| 75 | - $this->dependency_map->registerDependencies( |
|
| 76 | - 'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendeeBillingData', |
|
| 77 | - [ |
|
| 78 | - 'EEM_Attendee' => EE_Dependency_Map::load_from_cache, |
|
| 79 | - 'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache |
|
| 80 | - ] |
|
| 81 | - ); |
|
| 82 | - $this->dependency_map->registerDependencies( |
|
| 83 | - 'EventEspresso\core\domain\services\admin\privacy\export\ExportCheckins', |
|
| 84 | - ['EEM_Checkin' => EE_Dependency_Map::load_from_cache] |
|
| 85 | - ); |
|
| 86 | - $this->dependency_map->registerDependencies( |
|
| 87 | - 'EventEspresso\core\domain\services\admin\privacy\export\ExportRegistration', |
|
| 88 | - ['EEM_Registration' => EE_Dependency_Map::load_from_cache] |
|
| 89 | - ); |
|
| 90 | - $this->dependency_map->registerDependencies( |
|
| 91 | - 'EventEspresso\core\domain\services\admin\privacy\export\ExportTransaction', |
|
| 92 | - ['EEM_Transaction' => EE_Dependency_Map::load_from_cache] |
|
| 93 | - ); |
|
| 94 | - $this->dependency_map->registerDependencies( |
|
| 95 | - 'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAttendeeData', |
|
| 96 | - ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
|
| 97 | - ); |
|
| 98 | - $this->dependency_map->registerDependencies( |
|
| 99 | - 'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAnswers', |
|
| 100 | - [ |
|
| 101 | - 'EEM_Answer' => EE_Dependency_Map::load_from_cache, |
|
| 102 | - 'EEM_Question' => EE_Dependency_Map::load_from_cache, |
|
| 103 | - ] |
|
| 104 | - ); |
|
| 105 | - $this->dependency_map->registerDependencies( |
|
| 106 | - 'EventEspresso\core\domain\services\admin\privacy\forms\PrivacySettingsFormHandler', |
|
| 107 | - [ |
|
| 108 | - 'EE_Registry' => EE_Dependency_Map::load_from_cache, |
|
| 109 | - 'EE_Config' => EE_Dependency_Map::load_from_cache |
|
| 110 | - ] |
|
| 111 | - ); |
|
| 112 | - } |
|
| 59 | + /** |
|
| 60 | + * @since $VID:$ |
|
| 61 | + */ |
|
| 62 | + protected function registerDependencies() |
|
| 63 | + { |
|
| 64 | + $this->dependency_map->registerDependencies( |
|
| 65 | + 'EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy', |
|
| 66 | + [ |
|
| 67 | + 'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache, |
|
| 68 | + 'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache |
|
| 69 | + ] |
|
| 70 | + ); |
|
| 71 | + $this->dependency_map->registerDependencies( |
|
| 72 | + 'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendee', |
|
| 73 | + ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
|
| 74 | + ); |
|
| 75 | + $this->dependency_map->registerDependencies( |
|
| 76 | + 'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendeeBillingData', |
|
| 77 | + [ |
|
| 78 | + 'EEM_Attendee' => EE_Dependency_Map::load_from_cache, |
|
| 79 | + 'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache |
|
| 80 | + ] |
|
| 81 | + ); |
|
| 82 | + $this->dependency_map->registerDependencies( |
|
| 83 | + 'EventEspresso\core\domain\services\admin\privacy\export\ExportCheckins', |
|
| 84 | + ['EEM_Checkin' => EE_Dependency_Map::load_from_cache] |
|
| 85 | + ); |
|
| 86 | + $this->dependency_map->registerDependencies( |
|
| 87 | + 'EventEspresso\core\domain\services\admin\privacy\export\ExportRegistration', |
|
| 88 | + ['EEM_Registration' => EE_Dependency_Map::load_from_cache] |
|
| 89 | + ); |
|
| 90 | + $this->dependency_map->registerDependencies( |
|
| 91 | + 'EventEspresso\core\domain\services\admin\privacy\export\ExportTransaction', |
|
| 92 | + ['EEM_Transaction' => EE_Dependency_Map::load_from_cache] |
|
| 93 | + ); |
|
| 94 | + $this->dependency_map->registerDependencies( |
|
| 95 | + 'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAttendeeData', |
|
| 96 | + ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
|
| 97 | + ); |
|
| 98 | + $this->dependency_map->registerDependencies( |
|
| 99 | + 'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAnswers', |
|
| 100 | + [ |
|
| 101 | + 'EEM_Answer' => EE_Dependency_Map::load_from_cache, |
|
| 102 | + 'EEM_Question' => EE_Dependency_Map::load_from_cache, |
|
| 103 | + ] |
|
| 104 | + ); |
|
| 105 | + $this->dependency_map->registerDependencies( |
|
| 106 | + 'EventEspresso\core\domain\services\admin\privacy\forms\PrivacySettingsFormHandler', |
|
| 107 | + [ |
|
| 108 | + 'EE_Registry' => EE_Dependency_Map::load_from_cache, |
|
| 109 | + 'EE_Config' => EE_Dependency_Map::load_from_cache |
|
| 110 | + ] |
|
| 111 | + ); |
|
| 112 | + } |
|
| 113 | 113 | |
| 114 | 114 | |
| 115 | - /** |
|
| 116 | - * implements logic required to run during request |
|
| 117 | - * |
|
| 118 | - * @return bool |
|
| 119 | - * @since $VID:$ |
|
| 120 | - */ |
|
| 121 | - protected function requestHandler() |
|
| 122 | - { |
|
| 123 | - $this->loader->getShared('EventEspresso\core\services\privacy\erasure\PersonalDataEraserManager'); |
|
| 124 | - $this->loader->getShared('EventEspresso\core\services\privacy\export\PersonalDataExporterManager'); |
|
| 125 | - return true; |
|
| 126 | - } |
|
| 115 | + /** |
|
| 116 | + * implements logic required to run during request |
|
| 117 | + * |
|
| 118 | + * @return bool |
|
| 119 | + * @since $VID:$ |
|
| 120 | + */ |
|
| 121 | + protected function requestHandler() |
|
| 122 | + { |
|
| 123 | + $this->loader->getShared('EventEspresso\core\services\privacy\erasure\PersonalDataEraserManager'); |
|
| 124 | + $this->loader->getShared('EventEspresso\core\services\privacy\export\PersonalDataExporterManager'); |
|
| 125 | + return true; |
|
| 126 | + } |
|
| 127 | 127 | } |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | { |
| 116 | 116 | /** @var RouteMatchSpecificationInterface $specification */ |
| 117 | 117 | $specification = $this->specifications->get($routeMatchSpecificationFqcn); |
| 118 | - if (! $specification instanceof $routeMatchSpecificationFqcn) { |
|
| 118 | + if ( ! $specification instanceof $routeMatchSpecificationFqcn) { |
|
| 119 | 119 | throw new InvalidClassException($routeMatchSpecificationFqcn); |
| 120 | 120 | } |
| 121 | 121 | return $specification->isMatchingRoute(); |
@@ -25,122 +25,122 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | class RouteMatchSpecificationManager |
| 27 | 27 | { |
| 28 | - /** |
|
| 29 | - * @var CollectionInterface[]|RouteMatchSpecificationInterface[] $specifications |
|
| 30 | - */ |
|
| 31 | - private $specifications; |
|
| 28 | + /** |
|
| 29 | + * @var CollectionInterface[]|RouteMatchSpecificationInterface[] $specifications |
|
| 30 | + */ |
|
| 31 | + private $specifications; |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * @var RouteMatchSpecificationFactory $specifications_factory |
|
| 35 | - */ |
|
| 36 | - private $specifications_factory; |
|
| 33 | + /** |
|
| 34 | + * @var RouteMatchSpecificationFactory $specifications_factory |
|
| 35 | + */ |
|
| 36 | + private $specifications_factory; |
|
| 37 | 37 | |
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * RouteMatchSpecificationManager constructor. |
|
| 41 | - * |
|
| 42 | - * @param RouteMatchSpecificationCollection $specifications |
|
| 43 | - * @param RouteMatchSpecificationFactory $specifications_factory |
|
| 44 | - */ |
|
| 45 | - public function __construct( |
|
| 46 | - RouteMatchSpecificationCollection $specifications, |
|
| 47 | - RouteMatchSpecificationFactory $specifications_factory |
|
| 48 | - ) { |
|
| 49 | - $this->specifications = $specifications; |
|
| 50 | - $this->specifications_factory = $specifications_factory; |
|
| 51 | - add_action('AHEE__EE_System__loadRouteMatchSpecifications', array($this, 'initialize')); |
|
| 52 | - } |
|
| 39 | + /** |
|
| 40 | + * RouteMatchSpecificationManager constructor. |
|
| 41 | + * |
|
| 42 | + * @param RouteMatchSpecificationCollection $specifications |
|
| 43 | + * @param RouteMatchSpecificationFactory $specifications_factory |
|
| 44 | + */ |
|
| 45 | + public function __construct( |
|
| 46 | + RouteMatchSpecificationCollection $specifications, |
|
| 47 | + RouteMatchSpecificationFactory $specifications_factory |
|
| 48 | + ) { |
|
| 49 | + $this->specifications = $specifications; |
|
| 50 | + $this->specifications_factory = $specifications_factory; |
|
| 51 | + add_action('AHEE__EE_System__loadRouteMatchSpecifications', array($this, 'initialize')); |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | 54 | |
| 55 | - /** |
|
| 56 | - * Perform any early setup required for block editors to functions |
|
| 57 | - * |
|
| 58 | - * @return void |
|
| 59 | - * @throws CollectionLoaderException |
|
| 60 | - * @throws CollectionDetailsException |
|
| 61 | - */ |
|
| 62 | - public function initialize() |
|
| 63 | - { |
|
| 64 | - $this->populateSpecificationCollection(); |
|
| 65 | - } |
|
| 55 | + /** |
|
| 56 | + * Perform any early setup required for block editors to functions |
|
| 57 | + * |
|
| 58 | + * @return void |
|
| 59 | + * @throws CollectionLoaderException |
|
| 60 | + * @throws CollectionDetailsException |
|
| 61 | + */ |
|
| 62 | + public function initialize() |
|
| 63 | + { |
|
| 64 | + $this->populateSpecificationCollection(); |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | 67 | |
| 68 | - /** |
|
| 69 | - * @return CollectionInterface|RouteMatchSpecificationInterface[] |
|
| 70 | - * @throws CollectionLoaderException |
|
| 71 | - * @throws CollectionDetailsException |
|
| 72 | - * @since 4.9.71.p |
|
| 73 | - */ |
|
| 74 | - private function populateSpecificationCollection() |
|
| 75 | - { |
|
| 76 | - $loader = new CollectionLoader( |
|
| 77 | - new CollectionDetails( |
|
| 78 | - // collection name |
|
| 79 | - RouteMatchSpecificationCollection::COLLECTION_NAME, |
|
| 80 | - // collection interface |
|
| 81 | - 'EventEspresso\core\domain\entities\routing\specifications\RouteMatchSpecificationInterface', |
|
| 82 | - // FQCNs for classes to add (all classes within each namespace will be loaded) |
|
| 83 | - apply_filters( |
|
| 84 | - 'FHEE__EventEspresso_core_services_route_match_RouteMatchSpecificationManager__populateSpecificationCollection__collection_FQCNs', |
|
| 85 | - array( |
|
| 86 | - 'EventEspresso\core\domain\entities\routing\specifications\admin', |
|
| 87 | - 'EventEspresso\core\domain\entities\routing\specifications\frontend', |
|
| 88 | - ) |
|
| 89 | - ), |
|
| 90 | - // filepaths to classes to add |
|
| 91 | - array(), |
|
| 92 | - // file mask to use if parsing folder for files to add |
|
| 93 | - '', |
|
| 94 | - // what to use as identifier for collection entities |
|
| 95 | - // using CLASS NAME prevents duplicates (works like a singleton) |
|
| 96 | - CollectionDetails::ID_CLASS_NAME |
|
| 97 | - ), |
|
| 98 | - $this->specifications, |
|
| 99 | - null, |
|
| 100 | - $this->specifications_factory |
|
| 101 | - ); |
|
| 102 | - return $loader->getCollection(); |
|
| 103 | - } |
|
| 68 | + /** |
|
| 69 | + * @return CollectionInterface|RouteMatchSpecificationInterface[] |
|
| 70 | + * @throws CollectionLoaderException |
|
| 71 | + * @throws CollectionDetailsException |
|
| 72 | + * @since 4.9.71.p |
|
| 73 | + */ |
|
| 74 | + private function populateSpecificationCollection() |
|
| 75 | + { |
|
| 76 | + $loader = new CollectionLoader( |
|
| 77 | + new CollectionDetails( |
|
| 78 | + // collection name |
|
| 79 | + RouteMatchSpecificationCollection::COLLECTION_NAME, |
|
| 80 | + // collection interface |
|
| 81 | + 'EventEspresso\core\domain\entities\routing\specifications\RouteMatchSpecificationInterface', |
|
| 82 | + // FQCNs for classes to add (all classes within each namespace will be loaded) |
|
| 83 | + apply_filters( |
|
| 84 | + 'FHEE__EventEspresso_core_services_route_match_RouteMatchSpecificationManager__populateSpecificationCollection__collection_FQCNs', |
|
| 85 | + array( |
|
| 86 | + 'EventEspresso\core\domain\entities\routing\specifications\admin', |
|
| 87 | + 'EventEspresso\core\domain\entities\routing\specifications\frontend', |
|
| 88 | + ) |
|
| 89 | + ), |
|
| 90 | + // filepaths to classes to add |
|
| 91 | + array(), |
|
| 92 | + // file mask to use if parsing folder for files to add |
|
| 93 | + '', |
|
| 94 | + // what to use as identifier for collection entities |
|
| 95 | + // using CLASS NAME prevents duplicates (works like a singleton) |
|
| 96 | + CollectionDetails::ID_CLASS_NAME |
|
| 97 | + ), |
|
| 98 | + $this->specifications, |
|
| 99 | + null, |
|
| 100 | + $this->specifications_factory |
|
| 101 | + ); |
|
| 102 | + return $loader->getCollection(); |
|
| 103 | + } |
|
| 104 | 104 | |
| 105 | 105 | |
| 106 | - /** |
|
| 107 | - * Given the FQCN for a RouteMatchSpecification, will return true if the current request matches |
|
| 108 | - * |
|
| 109 | - * @param string $routeMatchSpecificationFqcn fully qualified class name |
|
| 110 | - * @return bool |
|
| 111 | - * @throws InvalidClassException |
|
| 112 | - * @since 4.9.71.p |
|
| 113 | - */ |
|
| 114 | - public function routeMatchesCurrentRequest($routeMatchSpecificationFqcn) |
|
| 115 | - { |
|
| 116 | - /** @var RouteMatchSpecificationInterface $specification */ |
|
| 117 | - $specification = $this->specifications->get($routeMatchSpecificationFqcn); |
|
| 118 | - if (! $specification instanceof $routeMatchSpecificationFqcn) { |
|
| 119 | - throw new InvalidClassException($routeMatchSpecificationFqcn); |
|
| 120 | - } |
|
| 121 | - return $specification->isMatchingRoute(); |
|
| 122 | - } |
|
| 106 | + /** |
|
| 107 | + * Given the FQCN for a RouteMatchSpecification, will return true if the current request matches |
|
| 108 | + * |
|
| 109 | + * @param string $routeMatchSpecificationFqcn fully qualified class name |
|
| 110 | + * @return bool |
|
| 111 | + * @throws InvalidClassException |
|
| 112 | + * @since 4.9.71.p |
|
| 113 | + */ |
|
| 114 | + public function routeMatchesCurrentRequest($routeMatchSpecificationFqcn) |
|
| 115 | + { |
|
| 116 | + /** @var RouteMatchSpecificationInterface $specification */ |
|
| 117 | + $specification = $this->specifications->get($routeMatchSpecificationFqcn); |
|
| 118 | + if (! $specification instanceof $routeMatchSpecificationFqcn) { |
|
| 119 | + throw new InvalidClassException($routeMatchSpecificationFqcn); |
|
| 120 | + } |
|
| 121 | + return $specification->isMatchingRoute(); |
|
| 122 | + } |
|
| 123 | 123 | |
| 124 | 124 | |
| 125 | - /** |
|
| 126 | - * Handy method for development that returns |
|
| 127 | - * a list of existing RouteMatchSpecification classes |
|
| 128 | - * matching the current request that can be used to identify it. |
|
| 129 | - * If no matches are returned (or nothing acceptable) |
|
| 130 | - * then create a new one that better matches your requirements. |
|
| 131 | - * |
|
| 132 | - * @return array |
|
| 133 | - * @since 4.9.71.p |
|
| 134 | - */ |
|
| 135 | - public function findRouteMatchSpecificationsMatchingCurrentRequest() |
|
| 136 | - { |
|
| 137 | - $matches = array(); |
|
| 138 | - foreach ($this->specifications as $specification) { |
|
| 139 | - /** @var RouteMatchSpecificationInterface $specification */ |
|
| 140 | - if ($specification->isMatchingRoute()) { |
|
| 141 | - $matches[] = get_class($specification); |
|
| 142 | - } |
|
| 143 | - } |
|
| 144 | - return $matches; |
|
| 145 | - } |
|
| 125 | + /** |
|
| 126 | + * Handy method for development that returns |
|
| 127 | + * a list of existing RouteMatchSpecification classes |
|
| 128 | + * matching the current request that can be used to identify it. |
|
| 129 | + * If no matches are returned (or nothing acceptable) |
|
| 130 | + * then create a new one that better matches your requirements. |
|
| 131 | + * |
|
| 132 | + * @return array |
|
| 133 | + * @since 4.9.71.p |
|
| 134 | + */ |
|
| 135 | + public function findRouteMatchSpecificationsMatchingCurrentRequest() |
|
| 136 | + { |
|
| 137 | + $matches = array(); |
|
| 138 | + foreach ($this->specifications as $specification) { |
|
| 139 | + /** @var RouteMatchSpecificationInterface $specification */ |
|
| 140 | + if ($specification->isMatchingRoute()) { |
|
| 141 | + $matches[] = get_class($specification); |
|
| 142 | + } |
|
| 143 | + } |
|
| 144 | + return $matches; |
|
| 145 | + } |
|
| 146 | 146 | } |
@@ -19,22 +19,22 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | class WordPressPostsEditor extends MatchAnyRouteSpecification |
| 21 | 21 | { |
| 22 | - /** |
|
| 23 | - * WordPressPostsEditor constructor. |
|
| 24 | - * |
|
| 25 | - * @param WordPressPostsEditorEdit $edit_post_route_match |
|
| 26 | - * @param WordPressPostsEditorAddNew $create_post_route_match |
|
| 27 | - * @param RequestInterface $request |
|
| 28 | - * @throws InvalidEntityException |
|
| 29 | - */ |
|
| 30 | - public function __construct( |
|
| 31 | - WordPressPostsEditorEdit $edit_post_route_match, |
|
| 32 | - WordPressPostsEditorAddNew $create_post_route_match, |
|
| 33 | - RequestInterface $request |
|
| 34 | - ) { |
|
| 35 | - parent::__construct( |
|
| 36 | - array($edit_post_route_match, $create_post_route_match), |
|
| 37 | - $request |
|
| 38 | - ); |
|
| 39 | - } |
|
| 22 | + /** |
|
| 23 | + * WordPressPostsEditor constructor. |
|
| 24 | + * |
|
| 25 | + * @param WordPressPostsEditorEdit $edit_post_route_match |
|
| 26 | + * @param WordPressPostsEditorAddNew $create_post_route_match |
|
| 27 | + * @param RequestInterface $request |
|
| 28 | + * @throws InvalidEntityException |
|
| 29 | + */ |
|
| 30 | + public function __construct( |
|
| 31 | + WordPressPostsEditorEdit $edit_post_route_match, |
|
| 32 | + WordPressPostsEditorAddNew $create_post_route_match, |
|
| 33 | + RequestInterface $request |
|
| 34 | + ) { |
|
| 35 | + parent::__construct( |
|
| 36 | + array($edit_post_route_match, $create_post_route_match), |
|
| 37 | + $request |
|
| 38 | + ); |
|
| 39 | + } |
|
| 40 | 40 | } |
@@ -16,171 +16,171 @@ |
||
| 16 | 16 | class GQLRequests extends Route |
| 17 | 17 | { |
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * returns true if the current request matches this route |
|
| 21 | - * |
|
| 22 | - * @return bool |
|
| 23 | - * @since $VID:$ |
|
| 24 | - */ |
|
| 25 | - public function matchesCurrentRequest() |
|
| 26 | - { |
|
| 27 | - return PHP_VERSION_ID > 70000 |
|
| 28 | - && ( |
|
| 29 | - $this->request->isGQL() |
|
| 30 | - || $this->request->isUnitTesting() |
|
| 31 | - || ( |
|
| 32 | - $this->request->isAdmin() |
|
| 33 | - && $this->request->getRequestParam('page') === 'espresso_events' |
|
| 34 | - && ( |
|
| 35 | - $this->request->getRequestParam('action') === 'create_new' |
|
| 36 | - || $this->request->getRequestParam('action') === 'edit' |
|
| 37 | - ) |
|
| 38 | - ) |
|
| 39 | - ); |
|
| 40 | - } |
|
| 19 | + /** |
|
| 20 | + * returns true if the current request matches this route |
|
| 21 | + * |
|
| 22 | + * @return bool |
|
| 23 | + * @since $VID:$ |
|
| 24 | + */ |
|
| 25 | + public function matchesCurrentRequest() |
|
| 26 | + { |
|
| 27 | + return PHP_VERSION_ID > 70000 |
|
| 28 | + && ( |
|
| 29 | + $this->request->isGQL() |
|
| 30 | + || $this->request->isUnitTesting() |
|
| 31 | + || ( |
|
| 32 | + $this->request->isAdmin() |
|
| 33 | + && $this->request->getRequestParam('page') === 'espresso_events' |
|
| 34 | + && ( |
|
| 35 | + $this->request->getRequestParam('action') === 'create_new' |
|
| 36 | + || $this->request->getRequestParam('action') === 'edit' |
|
| 37 | + ) |
|
| 38 | + ) |
|
| 39 | + ); |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * @since $VID:$ |
|
| 45 | - */ |
|
| 46 | - protected function registerDependencies() |
|
| 47 | - { |
|
| 48 | - $this->dependency_map->registerDependencies( |
|
| 49 | - 'EventEspresso\core\services\graphql\GraphQLManager', |
|
| 50 | - [ |
|
| 51 | - 'EventEspresso\core\services\graphql\ConnectionsManager' => EE_Dependency_Map::load_from_cache, |
|
| 52 | - 'EventEspresso\core\services\graphql\DataLoaderManager' => EE_Dependency_Map::load_from_cache, |
|
| 53 | - 'EventEspresso\core\services\graphql\EnumsManager' => EE_Dependency_Map::load_from_cache, |
|
| 54 | - 'EventEspresso\core\services\graphql\InputsManager' => EE_Dependency_Map::load_from_cache, |
|
| 55 | - 'EventEspresso\core\services\graphql\TypesManager' => EE_Dependency_Map::load_from_cache, |
|
| 56 | - ] |
|
| 57 | - ); |
|
| 58 | - $this->dependency_map->registerDependencies( |
|
| 59 | - 'EventEspresso\core\services\graphql\TypesManager', |
|
| 60 | - [ |
|
| 61 | - 'EventEspresso\core\services\graphql\types\TypeCollection' => EE_Dependency_Map::load_from_cache, |
|
| 62 | - ] |
|
| 63 | - ); |
|
| 64 | - $this->dependency_map->registerDependencies( |
|
| 65 | - 'EventEspresso\core\services\graphql\InputsManager', |
|
| 66 | - [ |
|
| 67 | - 'EventEspresso\core\services\graphql\inputs\InputCollection' => EE_Dependency_Map::load_from_cache, |
|
| 68 | - ] |
|
| 69 | - ); |
|
| 70 | - $this->dependency_map->registerDependencies( |
|
| 71 | - 'EventEspresso\core\services\graphql\EnumsManager', |
|
| 72 | - [ |
|
| 73 | - 'EventEspresso\core\services\graphql\enums\EnumCollection' => EE_Dependency_Map::load_from_cache, |
|
| 74 | - ] |
|
| 75 | - ); |
|
| 76 | - $this->dependency_map->registerDependencies( |
|
| 77 | - 'EventEspresso\core\services\graphql\ConnectionsManager', |
|
| 78 | - [ |
|
| 79 | - 'EventEspresso\core\services\graphql\connections\ConnectionCollection' => EE_Dependency_Map::load_from_cache, |
|
| 80 | - ] |
|
| 81 | - ); |
|
| 82 | - $this->dependency_map->registerDependencies( |
|
| 83 | - 'EventEspresso\core\services\graphql\DataLoaderManager', |
|
| 84 | - [ |
|
| 85 | - 'EventEspresso\core\services\graphql\loaders\DataLoaderCollection' => EE_Dependency_Map::load_from_cache, |
|
| 86 | - ] |
|
| 87 | - ); |
|
| 88 | - $this->dependency_map->registerDependencies( |
|
| 89 | - 'EventEspresso\core\domain\services\graphql\types\Datetime', |
|
| 90 | - ['EEM_Datetime' => EE_Dependency_Map::load_from_cache] |
|
| 91 | - ); |
|
| 92 | - $this->dependency_map->registerDependencies( |
|
| 93 | - 'EventEspresso\core\domain\services\graphql\types\Attendee', |
|
| 94 | - ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
|
| 95 | - ); |
|
| 96 | - $this->dependency_map->registerDependencies( |
|
| 97 | - 'EventEspresso\core\domain\services\graphql\types\Event', |
|
| 98 | - ['EEM_Event' => EE_Dependency_Map::load_from_cache] |
|
| 99 | - ); |
|
| 100 | - $this->dependency_map->registerDependencies( |
|
| 101 | - 'EventEspresso\core\domain\services\graphql\types\Ticket', |
|
| 102 | - ['EEM_Ticket' => EE_Dependency_Map::load_from_cache] |
|
| 103 | - ); |
|
| 104 | - $this->dependency_map->registerDependencies( |
|
| 105 | - 'EventEspresso\core\domain\services\graphql\types\Price', |
|
| 106 | - ['EEM_Price' => EE_Dependency_Map::load_from_cache] |
|
| 107 | - ); |
|
| 108 | - $this->dependency_map->registerDependencies( |
|
| 109 | - 'EventEspresso\core\domain\services\graphql\types\PriceType', |
|
| 110 | - ['EEM_Price_Type' => EE_Dependency_Map::load_from_cache] |
|
| 111 | - ); |
|
| 112 | - $this->dependency_map->registerDependencies( |
|
| 113 | - 'EventEspresso\core\domain\services\graphql\types\Venue', |
|
| 114 | - ['EEM_Venue' => EE_Dependency_Map::load_from_cache] |
|
| 115 | - ); |
|
| 116 | - $this->dependency_map->registerDependencies( |
|
| 117 | - 'EventEspresso\core\domain\services\graphql\types\State', |
|
| 118 | - ['EEM_State' => EE_Dependency_Map::load_from_cache] |
|
| 119 | - ); |
|
| 120 | - $this->dependency_map->registerDependencies( |
|
| 121 | - 'EventEspresso\core\domain\services\graphql\types\Country', |
|
| 122 | - ['EEM_Country' => EE_Dependency_Map::load_from_cache] |
|
| 123 | - ); |
|
| 124 | - $this->dependency_map->registerDependencies( |
|
| 125 | - 'EventEspresso\core\domain\services\graphql\connections\EventDatetimesConnection', |
|
| 126 | - ['EEM_Datetime' => EE_Dependency_Map::load_from_cache] |
|
| 127 | - ); |
|
| 128 | - $this->dependency_map->registerDependencies( |
|
| 129 | - 'EventEspresso\core\domain\services\graphql\connections\RootQueryDatetimesConnection', |
|
| 130 | - ['EEM_Datetime' => EE_Dependency_Map::load_from_cache] |
|
| 131 | - ); |
|
| 132 | - $this->dependency_map->registerDependencies( |
|
| 133 | - 'EventEspresso\core\domain\services\graphql\connections\RootQueryAttendeesConnection', |
|
| 134 | - ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
|
| 135 | - ); |
|
| 136 | - $this->dependency_map->registerDependencies( |
|
| 137 | - 'EventEspresso\core\domain\services\graphql\connections\DatetimeTicketsConnection', |
|
| 138 | - ['EEM_Ticket' => EE_Dependency_Map::load_from_cache] |
|
| 139 | - ); |
|
| 140 | - $this->dependency_map->registerDependencies( |
|
| 141 | - 'EventEspresso\core\domain\services\graphql\connections\RootQueryTicketsConnection', |
|
| 142 | - ['EEM_Ticket' => EE_Dependency_Map::load_from_cache] |
|
| 143 | - ); |
|
| 144 | - $this->dependency_map->registerDependencies( |
|
| 145 | - 'EventEspresso\core\domain\services\graphql\connections\TicketPricesConnection', |
|
| 146 | - ['EEM_Price' => EE_Dependency_Map::load_from_cache] |
|
| 147 | - ); |
|
| 148 | - $this->dependency_map->registerDependencies( |
|
| 149 | - 'EventEspresso\core\domain\services\graphql\connections\RootQueryPricesConnection', |
|
| 150 | - ['EEM_Price' => EE_Dependency_Map::load_from_cache] |
|
| 151 | - ); |
|
| 152 | - $this->dependency_map->registerDependencies( |
|
| 153 | - 'EventEspresso\core\domain\services\graphql\connections\RootQueryPriceTypesConnection', |
|
| 154 | - ['EEM_Price_Type' => EE_Dependency_Map::load_from_cache] |
|
| 155 | - ); |
|
| 156 | - $this->dependency_map->registerDependencies( |
|
| 157 | - 'EventEspresso\core\domain\services\graphql\connections\TicketDatetimesConnection', |
|
| 158 | - ['EEM_Datetime' => EE_Dependency_Map::load_from_cache] |
|
| 159 | - ); |
|
| 160 | - $this->dependency_map->registerDependencies( |
|
| 161 | - 'EventEspresso\core\domain\services\graphql\connections\EventVenuesConnection', |
|
| 162 | - ['EEM_Venue' => EE_Dependency_Map::load_from_cache] |
|
| 163 | - ); |
|
| 164 | - } |
|
| 43 | + /** |
|
| 44 | + * @since $VID:$ |
|
| 45 | + */ |
|
| 46 | + protected function registerDependencies() |
|
| 47 | + { |
|
| 48 | + $this->dependency_map->registerDependencies( |
|
| 49 | + 'EventEspresso\core\services\graphql\GraphQLManager', |
|
| 50 | + [ |
|
| 51 | + 'EventEspresso\core\services\graphql\ConnectionsManager' => EE_Dependency_Map::load_from_cache, |
|
| 52 | + 'EventEspresso\core\services\graphql\DataLoaderManager' => EE_Dependency_Map::load_from_cache, |
|
| 53 | + 'EventEspresso\core\services\graphql\EnumsManager' => EE_Dependency_Map::load_from_cache, |
|
| 54 | + 'EventEspresso\core\services\graphql\InputsManager' => EE_Dependency_Map::load_from_cache, |
|
| 55 | + 'EventEspresso\core\services\graphql\TypesManager' => EE_Dependency_Map::load_from_cache, |
|
| 56 | + ] |
|
| 57 | + ); |
|
| 58 | + $this->dependency_map->registerDependencies( |
|
| 59 | + 'EventEspresso\core\services\graphql\TypesManager', |
|
| 60 | + [ |
|
| 61 | + 'EventEspresso\core\services\graphql\types\TypeCollection' => EE_Dependency_Map::load_from_cache, |
|
| 62 | + ] |
|
| 63 | + ); |
|
| 64 | + $this->dependency_map->registerDependencies( |
|
| 65 | + 'EventEspresso\core\services\graphql\InputsManager', |
|
| 66 | + [ |
|
| 67 | + 'EventEspresso\core\services\graphql\inputs\InputCollection' => EE_Dependency_Map::load_from_cache, |
|
| 68 | + ] |
|
| 69 | + ); |
|
| 70 | + $this->dependency_map->registerDependencies( |
|
| 71 | + 'EventEspresso\core\services\graphql\EnumsManager', |
|
| 72 | + [ |
|
| 73 | + 'EventEspresso\core\services\graphql\enums\EnumCollection' => EE_Dependency_Map::load_from_cache, |
|
| 74 | + ] |
|
| 75 | + ); |
|
| 76 | + $this->dependency_map->registerDependencies( |
|
| 77 | + 'EventEspresso\core\services\graphql\ConnectionsManager', |
|
| 78 | + [ |
|
| 79 | + 'EventEspresso\core\services\graphql\connections\ConnectionCollection' => EE_Dependency_Map::load_from_cache, |
|
| 80 | + ] |
|
| 81 | + ); |
|
| 82 | + $this->dependency_map->registerDependencies( |
|
| 83 | + 'EventEspresso\core\services\graphql\DataLoaderManager', |
|
| 84 | + [ |
|
| 85 | + 'EventEspresso\core\services\graphql\loaders\DataLoaderCollection' => EE_Dependency_Map::load_from_cache, |
|
| 86 | + ] |
|
| 87 | + ); |
|
| 88 | + $this->dependency_map->registerDependencies( |
|
| 89 | + 'EventEspresso\core\domain\services\graphql\types\Datetime', |
|
| 90 | + ['EEM_Datetime' => EE_Dependency_Map::load_from_cache] |
|
| 91 | + ); |
|
| 92 | + $this->dependency_map->registerDependencies( |
|
| 93 | + 'EventEspresso\core\domain\services\graphql\types\Attendee', |
|
| 94 | + ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
|
| 95 | + ); |
|
| 96 | + $this->dependency_map->registerDependencies( |
|
| 97 | + 'EventEspresso\core\domain\services\graphql\types\Event', |
|
| 98 | + ['EEM_Event' => EE_Dependency_Map::load_from_cache] |
|
| 99 | + ); |
|
| 100 | + $this->dependency_map->registerDependencies( |
|
| 101 | + 'EventEspresso\core\domain\services\graphql\types\Ticket', |
|
| 102 | + ['EEM_Ticket' => EE_Dependency_Map::load_from_cache] |
|
| 103 | + ); |
|
| 104 | + $this->dependency_map->registerDependencies( |
|
| 105 | + 'EventEspresso\core\domain\services\graphql\types\Price', |
|
| 106 | + ['EEM_Price' => EE_Dependency_Map::load_from_cache] |
|
| 107 | + ); |
|
| 108 | + $this->dependency_map->registerDependencies( |
|
| 109 | + 'EventEspresso\core\domain\services\graphql\types\PriceType', |
|
| 110 | + ['EEM_Price_Type' => EE_Dependency_Map::load_from_cache] |
|
| 111 | + ); |
|
| 112 | + $this->dependency_map->registerDependencies( |
|
| 113 | + 'EventEspresso\core\domain\services\graphql\types\Venue', |
|
| 114 | + ['EEM_Venue' => EE_Dependency_Map::load_from_cache] |
|
| 115 | + ); |
|
| 116 | + $this->dependency_map->registerDependencies( |
|
| 117 | + 'EventEspresso\core\domain\services\graphql\types\State', |
|
| 118 | + ['EEM_State' => EE_Dependency_Map::load_from_cache] |
|
| 119 | + ); |
|
| 120 | + $this->dependency_map->registerDependencies( |
|
| 121 | + 'EventEspresso\core\domain\services\graphql\types\Country', |
|
| 122 | + ['EEM_Country' => EE_Dependency_Map::load_from_cache] |
|
| 123 | + ); |
|
| 124 | + $this->dependency_map->registerDependencies( |
|
| 125 | + 'EventEspresso\core\domain\services\graphql\connections\EventDatetimesConnection', |
|
| 126 | + ['EEM_Datetime' => EE_Dependency_Map::load_from_cache] |
|
| 127 | + ); |
|
| 128 | + $this->dependency_map->registerDependencies( |
|
| 129 | + 'EventEspresso\core\domain\services\graphql\connections\RootQueryDatetimesConnection', |
|
| 130 | + ['EEM_Datetime' => EE_Dependency_Map::load_from_cache] |
|
| 131 | + ); |
|
| 132 | + $this->dependency_map->registerDependencies( |
|
| 133 | + 'EventEspresso\core\domain\services\graphql\connections\RootQueryAttendeesConnection', |
|
| 134 | + ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
|
| 135 | + ); |
|
| 136 | + $this->dependency_map->registerDependencies( |
|
| 137 | + 'EventEspresso\core\domain\services\graphql\connections\DatetimeTicketsConnection', |
|
| 138 | + ['EEM_Ticket' => EE_Dependency_Map::load_from_cache] |
|
| 139 | + ); |
|
| 140 | + $this->dependency_map->registerDependencies( |
|
| 141 | + 'EventEspresso\core\domain\services\graphql\connections\RootQueryTicketsConnection', |
|
| 142 | + ['EEM_Ticket' => EE_Dependency_Map::load_from_cache] |
|
| 143 | + ); |
|
| 144 | + $this->dependency_map->registerDependencies( |
|
| 145 | + 'EventEspresso\core\domain\services\graphql\connections\TicketPricesConnection', |
|
| 146 | + ['EEM_Price' => EE_Dependency_Map::load_from_cache] |
|
| 147 | + ); |
|
| 148 | + $this->dependency_map->registerDependencies( |
|
| 149 | + 'EventEspresso\core\domain\services\graphql\connections\RootQueryPricesConnection', |
|
| 150 | + ['EEM_Price' => EE_Dependency_Map::load_from_cache] |
|
| 151 | + ); |
|
| 152 | + $this->dependency_map->registerDependencies( |
|
| 153 | + 'EventEspresso\core\domain\services\graphql\connections\RootQueryPriceTypesConnection', |
|
| 154 | + ['EEM_Price_Type' => EE_Dependency_Map::load_from_cache] |
|
| 155 | + ); |
|
| 156 | + $this->dependency_map->registerDependencies( |
|
| 157 | + 'EventEspresso\core\domain\services\graphql\connections\TicketDatetimesConnection', |
|
| 158 | + ['EEM_Datetime' => EE_Dependency_Map::load_from_cache] |
|
| 159 | + ); |
|
| 160 | + $this->dependency_map->registerDependencies( |
|
| 161 | + 'EventEspresso\core\domain\services\graphql\connections\EventVenuesConnection', |
|
| 162 | + ['EEM_Venue' => EE_Dependency_Map::load_from_cache] |
|
| 163 | + ); |
|
| 164 | + } |
|
| 165 | 165 | |
| 166 | 166 | |
| 167 | - /** |
|
| 168 | - * implements logic required to run during request |
|
| 169 | - * |
|
| 170 | - * @return bool |
|
| 171 | - * @since $VID:$ |
|
| 172 | - */ |
|
| 173 | - protected function requestHandler() |
|
| 174 | - { |
|
| 167 | + /** |
|
| 168 | + * implements logic required to run during request |
|
| 169 | + * |
|
| 170 | + * @return bool |
|
| 171 | + * @since $VID:$ |
|
| 172 | + */ |
|
| 173 | + protected function requestHandler() |
|
| 174 | + { |
|
| 175 | 175 | |
| 176 | - if (! class_exists('WPGraphQL')) { |
|
| 177 | - require_once EE_THIRD_PARTY . 'wp-graphql/wp-graphql.php'; |
|
| 178 | - } |
|
| 179 | - // load handler for EE GraphQL requests |
|
| 180 | - $graphQL_manager = $this->loader->getShared( |
|
| 181 | - 'EventEspresso\core\services\graphql\GraphQLManager' |
|
| 182 | - ); |
|
| 183 | - $graphQL_manager->init(); |
|
| 184 | - return true; |
|
| 185 | - } |
|
| 176 | + if (! class_exists('WPGraphQL')) { |
|
| 177 | + require_once EE_THIRD_PARTY . 'wp-graphql/wp-graphql.php'; |
|
| 178 | + } |
|
| 179 | + // load handler for EE GraphQL requests |
|
| 180 | + $graphQL_manager = $this->loader->getShared( |
|
| 181 | + 'EventEspresso\core\services\graphql\GraphQLManager' |
|
| 182 | + ); |
|
| 183 | + $graphQL_manager->init(); |
|
| 184 | + return true; |
|
| 185 | + } |
|
| 186 | 186 | } |
@@ -173,8 +173,8 @@ |
||
| 173 | 173 | protected function requestHandler() |
| 174 | 174 | { |
| 175 | 175 | |
| 176 | - if (! class_exists('WPGraphQL')) { |
|
| 177 | - require_once EE_THIRD_PARTY . 'wp-graphql/wp-graphql.php'; |
|
| 176 | + if ( ! class_exists('WPGraphQL')) { |
|
| 177 | + require_once EE_THIRD_PARTY.'wp-graphql/wp-graphql.php'; |
|
| 178 | 178 | } |
| 179 | 179 | // load handler for EE GraphQL requests |
| 180 | 180 | $graphQL_manager = $this->loader->getShared( |
@@ -16,67 +16,67 @@ |
||
| 16 | 16 | class RestApiRequests extends Route |
| 17 | 17 | { |
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * returns true if the current request matches this route |
|
| 21 | - * |
|
| 22 | - * @return bool |
|
| 23 | - * @since $VID:$ |
|
| 24 | - */ |
|
| 25 | - public function matchesCurrentRequest() |
|
| 26 | - { |
|
| 27 | - return $this->request->isWordPressApi(); |
|
| 28 | - } |
|
| 19 | + /** |
|
| 20 | + * returns true if the current request matches this route |
|
| 21 | + * |
|
| 22 | + * @return bool |
|
| 23 | + * @since $VID:$ |
|
| 24 | + */ |
|
| 25 | + public function matchesCurrentRequest() |
|
| 26 | + { |
|
| 27 | + return $this->request->isWordPressApi(); |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * @since $VID:$ |
|
| 33 | - */ |
|
| 34 | - protected function registerDependencies() |
|
| 35 | - { |
|
| 36 | - $this->dependency_map->registerDependencies( |
|
| 37 | - 'EventEspresso\core\libraries\rest_api\CalculatedModelFields', |
|
| 38 | - [ |
|
| 39 | - 'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => EE_Dependency_Map::load_from_cache |
|
| 40 | - ] |
|
| 41 | - ); |
|
| 42 | - $this->dependency_map->registerDependencies( |
|
| 43 | - 'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory', |
|
| 44 | - ['EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache] |
|
| 45 | - ); |
|
| 46 | - $this->dependency_map->registerDependencies( |
|
| 47 | - 'EventEspresso\core\libraries\rest_api\controllers\model\Read', |
|
| 48 | - ['EventEspresso\core\libraries\rest_api\CalculatedModelFields' => EE_Dependency_Map::load_from_cache] |
|
| 49 | - ); |
|
| 50 | - $this->dependency_map->registerDependencies( |
|
| 51 | - 'EventEspresso\core\libraries\rest_api\calculations\Datetime', |
|
| 52 | - [ |
|
| 53 | - 'EEM_Datetime' => EE_Dependency_Map::load_from_cache, |
|
| 54 | - 'EEM_Registration' => EE_Dependency_Map::load_from_cache |
|
| 55 | - ] |
|
| 56 | - ); |
|
| 57 | - $this->dependency_map->registerDependencies( |
|
| 58 | - 'EventEspresso\core\libraries\rest_api\calculations\Event', |
|
| 59 | - [ |
|
| 60 | - 'EEM_Event' => EE_Dependency_Map::load_from_cache, |
|
| 61 | - 'EEM_Registration' => EE_Dependency_Map::load_from_cache |
|
| 62 | - ] |
|
| 63 | - ); |
|
| 64 | - $this->dependency_map->registerDependencies( |
|
| 65 | - 'EventEspresso\core\libraries\rest_api\calculations\Registration', |
|
| 66 | - ['EEM_Registration' => EE_Dependency_Map::load_from_cache] |
|
| 67 | - ); |
|
| 68 | - } |
|
| 31 | + /** |
|
| 32 | + * @since $VID:$ |
|
| 33 | + */ |
|
| 34 | + protected function registerDependencies() |
|
| 35 | + { |
|
| 36 | + $this->dependency_map->registerDependencies( |
|
| 37 | + 'EventEspresso\core\libraries\rest_api\CalculatedModelFields', |
|
| 38 | + [ |
|
| 39 | + 'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory' => EE_Dependency_Map::load_from_cache |
|
| 40 | + ] |
|
| 41 | + ); |
|
| 42 | + $this->dependency_map->registerDependencies( |
|
| 43 | + 'EventEspresso\core\libraries\rest_api\calculations\CalculatedModelFieldsFactory', |
|
| 44 | + ['EventEspresso\core\services\loaders\Loader' => EE_Dependency_Map::load_from_cache] |
|
| 45 | + ); |
|
| 46 | + $this->dependency_map->registerDependencies( |
|
| 47 | + 'EventEspresso\core\libraries\rest_api\controllers\model\Read', |
|
| 48 | + ['EventEspresso\core\libraries\rest_api\CalculatedModelFields' => EE_Dependency_Map::load_from_cache] |
|
| 49 | + ); |
|
| 50 | + $this->dependency_map->registerDependencies( |
|
| 51 | + 'EventEspresso\core\libraries\rest_api\calculations\Datetime', |
|
| 52 | + [ |
|
| 53 | + 'EEM_Datetime' => EE_Dependency_Map::load_from_cache, |
|
| 54 | + 'EEM_Registration' => EE_Dependency_Map::load_from_cache |
|
| 55 | + ] |
|
| 56 | + ); |
|
| 57 | + $this->dependency_map->registerDependencies( |
|
| 58 | + 'EventEspresso\core\libraries\rest_api\calculations\Event', |
|
| 59 | + [ |
|
| 60 | + 'EEM_Event' => EE_Dependency_Map::load_from_cache, |
|
| 61 | + 'EEM_Registration' => EE_Dependency_Map::load_from_cache |
|
| 62 | + ] |
|
| 63 | + ); |
|
| 64 | + $this->dependency_map->registerDependencies( |
|
| 65 | + 'EventEspresso\core\libraries\rest_api\calculations\Registration', |
|
| 66 | + ['EEM_Registration' => EE_Dependency_Map::load_from_cache] |
|
| 67 | + ); |
|
| 68 | + } |
|
| 69 | 69 | |
| 70 | 70 | |
| 71 | - /** |
|
| 72 | - * implements logic required to run during request |
|
| 73 | - * |
|
| 74 | - * @return bool |
|
| 75 | - * @since $VID:$ |
|
| 76 | - */ |
|
| 77 | - protected function requestHandler() |
|
| 78 | - { |
|
| 79 | - // rest api handled by module for now |
|
| 80 | - return true; |
|
| 81 | - } |
|
| 71 | + /** |
|
| 72 | + * implements logic required to run during request |
|
| 73 | + * |
|
| 74 | + * @return bool |
|
| 75 | + * @since $VID:$ |
|
| 76 | + */ |
|
| 77 | + protected function requestHandler() |
|
| 78 | + { |
|
| 79 | + // rest api handled by module for now |
|
| 80 | + return true; |
|
| 81 | + } |
|
| 82 | 82 | } |
@@ -16,111 +16,111 @@ |
||
| 16 | 16 | class AssetRequests extends Route |
| 17 | 17 | { |
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * returns true if the current request matches this route |
|
| 21 | - * |
|
| 22 | - * @return bool |
|
| 23 | - * @since $VID:$ |
|
| 24 | - */ |
|
| 25 | - public function matchesCurrentRequest() |
|
| 26 | - { |
|
| 27 | - return $this->request->isAdmin() |
|
| 28 | - || $this->request->isFrontend() |
|
| 29 | - || $this->request->isIframe() |
|
| 30 | - || $this->request->isWordPressApi(); |
|
| 31 | - } |
|
| 19 | + /** |
|
| 20 | + * returns true if the current request matches this route |
|
| 21 | + * |
|
| 22 | + * @return bool |
|
| 23 | + * @since $VID:$ |
|
| 24 | + */ |
|
| 25 | + public function matchesCurrentRequest() |
|
| 26 | + { |
|
| 27 | + return $this->request->isAdmin() |
|
| 28 | + || $this->request->isFrontend() |
|
| 29 | + || $this->request->isIframe() |
|
| 30 | + || $this->request->isWordPressApi(); |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * @since $VID:$ |
|
| 36 | - */ |
|
| 37 | - protected function registerDependencies() |
|
| 38 | - { |
|
| 39 | - $default_dependencies = [ |
|
| 40 | - 'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache, |
|
| 41 | - 'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache, |
|
| 42 | - 'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache, |
|
| 43 | - ]; |
|
| 44 | - $this->dependency_map->registerDependencies( |
|
| 45 | - 'EventEspresso\core\domain\services\assets\ReactAssetManager', |
|
| 46 | - $default_dependencies |
|
| 47 | - ); |
|
| 48 | - $this->dependency_map->registerDependencies( |
|
| 49 | - 'EventEspresso\core\domain\services\assets\CoreAssetManager', |
|
| 50 | - [ |
|
| 51 | - 'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache, |
|
| 52 | - 'EE_Currency_Config' => EE_Dependency_Map::load_from_cache, |
|
| 53 | - 'EE_Template_Config' => EE_Dependency_Map::load_from_cache, |
|
| 54 | - 'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache, |
|
| 55 | - 'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache, |
|
| 56 | - ] |
|
| 57 | - ); |
|
| 58 | - $this->dependency_map->registerDependencies( |
|
| 59 | - 'EventEspresso\core\services\editor\BlockRegistrationManager', |
|
| 60 | - [ |
|
| 61 | - 'EventEspresso\core\services\assets\BlockAssetManagerCollection' => EE_Dependency_Map::load_from_cache, |
|
| 62 | - 'EventEspresso\core\domain\entities\editor\BlockCollection' => EE_Dependency_Map::load_from_cache, |
|
| 63 | - 'EventEspresso\core\services\routing\RouteMatchSpecificationManager' => EE_Dependency_Map::load_from_cache, |
|
| 64 | - 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 65 | - ] |
|
| 66 | - ); |
|
| 67 | - $this->dependency_map->registerDependencies( |
|
| 68 | - 'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager', |
|
| 69 | - [ |
|
| 70 | - 'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache, |
|
| 71 | - 'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache, |
|
| 72 | - 'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache, |
|
| 73 | - ] |
|
| 74 | - ); |
|
| 75 | - $this->dependency_map->registerDependencies( |
|
| 76 | - 'EventEspresso\core\domain\services\blocks\EventAttendeesBlockRenderer', |
|
| 77 | - [ |
|
| 78 | - 'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache, |
|
| 79 | - 'EEM_Attendee' => EE_Dependency_Map::load_from_cache, |
|
| 80 | - ] |
|
| 81 | - ); |
|
| 82 | - $this->dependency_map->registerDependencies( |
|
| 83 | - 'EventEspresso\core\domain\entities\editor\blocks\EventAttendees', |
|
| 84 | - [ |
|
| 85 | - 'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager' => EE_Dependency_Map::load_from_cache, |
|
| 86 | - 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 87 | - 'EventEspresso\core\domain\services\blocks\EventAttendeesBlockRenderer' => EE_Dependency_Map::load_from_cache, |
|
| 88 | - ] |
|
| 89 | - ); |
|
| 90 | - } |
|
| 34 | + /** |
|
| 35 | + * @since $VID:$ |
|
| 36 | + */ |
|
| 37 | + protected function registerDependencies() |
|
| 38 | + { |
|
| 39 | + $default_dependencies = [ |
|
| 40 | + 'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache, |
|
| 41 | + 'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache, |
|
| 42 | + 'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache, |
|
| 43 | + ]; |
|
| 44 | + $this->dependency_map->registerDependencies( |
|
| 45 | + 'EventEspresso\core\domain\services\assets\ReactAssetManager', |
|
| 46 | + $default_dependencies |
|
| 47 | + ); |
|
| 48 | + $this->dependency_map->registerDependencies( |
|
| 49 | + 'EventEspresso\core\domain\services\assets\CoreAssetManager', |
|
| 50 | + [ |
|
| 51 | + 'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache, |
|
| 52 | + 'EE_Currency_Config' => EE_Dependency_Map::load_from_cache, |
|
| 53 | + 'EE_Template_Config' => EE_Dependency_Map::load_from_cache, |
|
| 54 | + 'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache, |
|
| 55 | + 'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache, |
|
| 56 | + ] |
|
| 57 | + ); |
|
| 58 | + $this->dependency_map->registerDependencies( |
|
| 59 | + 'EventEspresso\core\services\editor\BlockRegistrationManager', |
|
| 60 | + [ |
|
| 61 | + 'EventEspresso\core\services\assets\BlockAssetManagerCollection' => EE_Dependency_Map::load_from_cache, |
|
| 62 | + 'EventEspresso\core\domain\entities\editor\BlockCollection' => EE_Dependency_Map::load_from_cache, |
|
| 63 | + 'EventEspresso\core\services\routing\RouteMatchSpecificationManager' => EE_Dependency_Map::load_from_cache, |
|
| 64 | + 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 65 | + ] |
|
| 66 | + ); |
|
| 67 | + $this->dependency_map->registerDependencies( |
|
| 68 | + 'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager', |
|
| 69 | + [ |
|
| 70 | + 'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache, |
|
| 71 | + 'EventEspresso\core\services\assets\AssetCollection' => EE_Dependency_Map::load_from_cache, |
|
| 72 | + 'EventEspresso\core\services\assets\Registry' => EE_Dependency_Map::load_from_cache, |
|
| 73 | + ] |
|
| 74 | + ); |
|
| 75 | + $this->dependency_map->registerDependencies( |
|
| 76 | + 'EventEspresso\core\domain\services\blocks\EventAttendeesBlockRenderer', |
|
| 77 | + [ |
|
| 78 | + 'EventEspresso\core\domain\Domain' => EE_Dependency_Map::load_from_cache, |
|
| 79 | + 'EEM_Attendee' => EE_Dependency_Map::load_from_cache, |
|
| 80 | + ] |
|
| 81 | + ); |
|
| 82 | + $this->dependency_map->registerDependencies( |
|
| 83 | + 'EventEspresso\core\domain\entities\editor\blocks\EventAttendees', |
|
| 84 | + [ |
|
| 85 | + 'EventEspresso\core\domain\entities\editor\CoreBlocksAssetManager' => EE_Dependency_Map::load_from_cache, |
|
| 86 | + 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 87 | + 'EventEspresso\core\domain\services\blocks\EventAttendeesBlockRenderer' => EE_Dependency_Map::load_from_cache, |
|
| 88 | + ] |
|
| 89 | + ); |
|
| 90 | + } |
|
| 91 | 91 | |
| 92 | 92 | |
| 93 | - /** |
|
| 94 | - * implements logic required to run during request |
|
| 95 | - * |
|
| 96 | - * @return bool |
|
| 97 | - * @since $VID:$ |
|
| 98 | - */ |
|
| 99 | - protected function requestHandler() |
|
| 100 | - { |
|
| 101 | - $this->loader->getShared('EventEspresso\core\services\assets\Registry'); |
|
| 102 | - $this->loader->getShared('EventEspresso\core\domain\services\assets\CoreAssetManager'); |
|
| 103 | - if ($this->canLoadBlocks()) { |
|
| 104 | - $this->loader->getShared( |
|
| 105 | - 'EventEspresso\core\services\editor\BlockRegistrationManager' |
|
| 106 | - ); |
|
| 107 | - } |
|
| 108 | - return true; |
|
| 109 | - } |
|
| 93 | + /** |
|
| 94 | + * implements logic required to run during request |
|
| 95 | + * |
|
| 96 | + * @return bool |
|
| 97 | + * @since $VID:$ |
|
| 98 | + */ |
|
| 99 | + protected function requestHandler() |
|
| 100 | + { |
|
| 101 | + $this->loader->getShared('EventEspresso\core\services\assets\Registry'); |
|
| 102 | + $this->loader->getShared('EventEspresso\core\domain\services\assets\CoreAssetManager'); |
|
| 103 | + if ($this->canLoadBlocks()) { |
|
| 104 | + $this->loader->getShared( |
|
| 105 | + 'EventEspresso\core\services\editor\BlockRegistrationManager' |
|
| 106 | + ); |
|
| 107 | + } |
|
| 108 | + return true; |
|
| 109 | + } |
|
| 110 | 110 | |
| 111 | 111 | |
| 112 | - /** |
|
| 113 | - * Return whether blocks can be registered/loaded or not. |
|
| 114 | - * |
|
| 115 | - * @return bool |
|
| 116 | - * @since $VID:$ |
|
| 117 | - */ |
|
| 118 | - private function canLoadBlocks() |
|
| 119 | - { |
|
| 120 | - return apply_filters('FHEE__EE_System__canLoadBlocks', true) |
|
| 121 | - && function_exists('register_block_type') |
|
| 122 | - // don't load blocks if in the Divi page builder editor context |
|
| 123 | - // @see https://github.com/eventespresso/event-espresso-core/issues/814 |
|
| 124 | - && ! $this->request->getRequestParam('et_fb', false); |
|
| 125 | - } |
|
| 112 | + /** |
|
| 113 | + * Return whether blocks can be registered/loaded or not. |
|
| 114 | + * |
|
| 115 | + * @return bool |
|
| 116 | + * @since $VID:$ |
|
| 117 | + */ |
|
| 118 | + private function canLoadBlocks() |
|
| 119 | + { |
|
| 120 | + return apply_filters('FHEE__EE_System__canLoadBlocks', true) |
|
| 121 | + && function_exists('register_block_type') |
|
| 122 | + // don't load blocks if in the Divi page builder editor context |
|
| 123 | + // @see https://github.com/eventespresso/event-espresso-core/issues/814 |
|
| 124 | + && ! $this->request->getRequestParam('et_fb', false); |
|
| 125 | + } |
|
| 126 | 126 | } |
@@ -16,49 +16,49 @@ |
||
| 16 | 16 | class SessionRequests extends Route |
| 17 | 17 | { |
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * returns true if the current request matches this route |
|
| 21 | - * |
|
| 22 | - * @return bool |
|
| 23 | - * @since $VID:$ |
|
| 24 | - */ |
|
| 25 | - public function matchesCurrentRequest() |
|
| 26 | - { |
|
| 27 | - return $this->request->isAdmin() || $this->request->isEeAjax() || $this->request->isFrontend(); |
|
| 28 | - } |
|
| 19 | + /** |
|
| 20 | + * returns true if the current request matches this route |
|
| 21 | + * |
|
| 22 | + * @return bool |
|
| 23 | + * @since $VID:$ |
|
| 24 | + */ |
|
| 25 | + public function matchesCurrentRequest() |
|
| 26 | + { |
|
| 27 | + return $this->request->isAdmin() || $this->request->isEeAjax() || $this->request->isFrontend(); |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * @since $VID:$ |
|
| 33 | - */ |
|
| 34 | - protected function registerDependencies() |
|
| 35 | - { |
|
| 36 | - $this->dependency_map->registerDependencies( |
|
| 37 | - 'EE_Session', |
|
| 38 | - [ |
|
| 39 | - 'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache, |
|
| 40 | - 'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache, |
|
| 41 | - 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 42 | - 'EventEspresso\core\services\session\SessionStartHandler' => EE_Dependency_Map::load_from_cache, |
|
| 43 | - 'EE_Encryption' => EE_Dependency_Map::load_from_cache, |
|
| 44 | - ] |
|
| 45 | - ); |
|
| 46 | - $this->dependency_map->registerDependencies( |
|
| 47 | - 'EventEspresso\core\services\session\SessionStartHandler', |
|
| 48 | - ['EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache] |
|
| 49 | - ); |
|
| 50 | - } |
|
| 31 | + /** |
|
| 32 | + * @since $VID:$ |
|
| 33 | + */ |
|
| 34 | + protected function registerDependencies() |
|
| 35 | + { |
|
| 36 | + $this->dependency_map->registerDependencies( |
|
| 37 | + 'EE_Session', |
|
| 38 | + [ |
|
| 39 | + 'EventEspresso\core\services\cache\TransientCacheStorage' => EE_Dependency_Map::load_from_cache, |
|
| 40 | + 'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache, |
|
| 41 | + 'EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache, |
|
| 42 | + 'EventEspresso\core\services\session\SessionStartHandler' => EE_Dependency_Map::load_from_cache, |
|
| 43 | + 'EE_Encryption' => EE_Dependency_Map::load_from_cache, |
|
| 44 | + ] |
|
| 45 | + ); |
|
| 46 | + $this->dependency_map->registerDependencies( |
|
| 47 | + 'EventEspresso\core\services\session\SessionStartHandler', |
|
| 48 | + ['EventEspresso\core\services\request\Request' => EE_Dependency_Map::load_from_cache] |
|
| 49 | + ); |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | 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->loader->getShared('EE_Session'); |
|
| 62 | - return true; |
|
| 63 | - } |
|
| 53 | + /** |
|
| 54 | + * implements logic required to run during request |
|
| 55 | + * |
|
| 56 | + * @return bool |
|
| 57 | + * @since $VID:$ |
|
| 58 | + */ |
|
| 59 | + protected function requestHandler() |
|
| 60 | + { |
|
| 61 | + $this->loader->getShared('EE_Session'); |
|
| 62 | + return true; |
|
| 63 | + } |
|
| 64 | 64 | } |