APIv4 - Add `@since` annotation to each entity
[civicrm-core.git] / Civi / Api4 / System.php
1 <?php
2
3 /*
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
6 | |
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 |
10 +--------------------------------------------------------------------+
11 */
12
13 /**
14 *
15 * @package CRM
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 */
18
19 namespace Civi\Api4;
20
21 /**
22 * A collection of system maintenance/diagnostic utilities.
23 *
24 * @searchable none
25 * @since 5.19
26 * @package Civi\Api4
27 */
28 class System extends Generic\AbstractEntity {
29
30 /**
31 * @param bool $checkPermissions
32 * @return Action\System\Flush
33 */
34 public static function flush($checkPermissions = TRUE) {
35 return (new Action\System\Flush(__CLASS__, __FUNCTION__))
36 ->setCheckPermissions($checkPermissions);
37 }
38
39 /**
40 * @param bool $checkPermissions
41 * @return Action\System\Check
42 */
43 public static function check($checkPermissions = TRUE) {
44 return (new Action\System\Check(__CLASS__, __FUNCTION__))
45 ->setCheckPermissions($checkPermissions);
46 }
47
48 /**
49 * @param bool $checkPermissions
50 *
51 * @return Action\System\RotateKey
52 */
53 public static function rotateKey($checkPermissions = TRUE) {
54 return (new Action\System\RotateKey(__CLASS__, __FUNCTION__))
55 ->setCheckPermissions($checkPermissions);
56 }
57
58 /**
59 * @param bool $checkPermissions
60 * @return Generic\BasicGetFieldsAction
61 */
62 public static function getFields($checkPermissions = TRUE) {
63 return (new Generic\BasicGetFieldsAction(__CLASS__, __FUNCTION__, function() {
64 return [];
65 }))->setCheckPermissions($checkPermissions);
66 }
67
68 /**
69 * @param bool $checkPermissions
70 * @return Action\System\ResetPaths
71 */
72 public static function resetPaths($checkPermissions = TRUE) {
73 return (new Action\System\ResetPaths(__CLASS__, __FUNCTION__))
74 ->setCheckPermissions($checkPermissions);
75 }
76
77 }