Commit | Line | Data |
---|---|---|
19b53e5b C |
1 | <?php |
2 | ||
380f3545 TO |
3 | /* |
4 | +--------------------------------------------------------------------+ | |
41498ac5 | 5 | | Copyright CiviCRM LLC. All rights reserved. | |
380f3545 | 6 | | | |
41498ac5 TO |
7 | | This work is published under the GNU AGPLv3 license with some | |
8 | | permitted exceptions and without any warranty. For full license | | |
9 | | and copyright information, see https://civicrm.org/licensing | | |
380f3545 TO |
10 | +--------------------------------------------------------------------+ |
11 | */ | |
12 | ||
13 | /** | |
14 | * | |
15 | * @package CRM | |
ca5cec67 | 16 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
380f3545 TO |
17 | */ |
18 | ||
19b53e5b C |
19 | namespace Civi\Api4; |
20 | ||
19b53e5b C |
21 | /** |
22 | * A collection of system maintenance/diagnostic utilities. | |
23 | * | |
24 | * @package Civi\Api4 | |
25 | */ | |
26 | class System extends Generic\AbstractEntity { | |
27 | ||
6764a9d3 CW |
28 | /** |
29 | * @param bool $checkPermissions | |
30 | * @return Action\System\Flush | |
31 | */ | |
32 | public static function flush($checkPermissions = TRUE) { | |
33 | return (new Action\System\Flush(__CLASS__, __FUNCTION__)) | |
34 | ->setCheckPermissions($checkPermissions); | |
19b53e5b C |
35 | } |
36 | ||
6764a9d3 CW |
37 | /** |
38 | * @param bool $checkPermissions | |
39 | * @return Action\System\Check | |
40 | */ | |
41 | public static function check($checkPermissions = TRUE) { | |
42 | return (new Action\System\Check(__CLASS__, __FUNCTION__)) | |
43 | ->setCheckPermissions($checkPermissions); | |
19b53e5b C |
44 | } |
45 | ||
b124f74b TO |
46 | /** |
47 | * @param bool $checkPermissions | |
48 | * | |
49 | * @return Action\System\RotateKey | |
50 | */ | |
51 | public static function rotateKey($checkPermissions = TRUE) { | |
52 | return (new Action\System\RotateKey(__CLASS__, __FUNCTION__)) | |
53 | ->setCheckPermissions($checkPermissions); | |
54 | } | |
55 | ||
6764a9d3 CW |
56 | /** |
57 | * @param bool $checkPermissions | |
58 | * @return Generic\BasicGetFieldsAction | |
59 | */ | |
60 | public static function getFields($checkPermissions = TRUE) { | |
61 | return (new Generic\BasicGetFieldsAction(__CLASS__, __FUNCTION__, function() { | |
19b53e5b | 62 | return []; |
6764a9d3 | 63 | }))->setCheckPermissions($checkPermissions); |
19b53e5b C |
64 | } |
65 | ||
f8e87067 MT |
66 | /** |
67 | * @param bool $checkPermissions | |
68 | * @return Action\System\ResetPaths | |
69 | */ | |
70 | public static function resetPaths($checkPermissions = TRUE) { | |
71 | return (new Action\System\ResetPaths(__CLASS__, __FUNCTION__)) | |
72 | ->setCheckPermissions($checkPermissions); | |
73 | } | |
74 | ||
19b53e5b | 75 | } |