1 | <?php |
||
23 | class Domains extends BasePlugin |
||
24 | { |
||
25 | /** |
||
26 | * @inheritdoc |
||
27 | */ |
||
28 | public function init() |
||
42 | |||
43 | /** |
||
44 | * @return services\Fields |
||
45 | */ |
||
46 | public function getFields() |
||
47 | { |
||
48 | return $this->get('fields'); |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @return services\Domains |
||
53 | */ |
||
54 | public function getDomains() |
||
58 | |||
59 | /** |
||
60 | * @return services\Associations |
||
61 | */ |
||
62 | public function getAssociations() |
||
66 | |||
67 | /******************************************* |
||
68 | * LOGGING |
||
69 | *******************************************/ |
||
70 | |||
71 | /** |
||
72 | * Logs a trace message. |
||
73 | * Trace messages are logged mainly for development purpose to see |
||
74 | * the execution work flow of some code. |
||
75 | * @param string $message the message to be logged. |
||
76 | * @param string $category the category of the message. |
||
77 | */ |
||
78 | public static function trace($message, string $category = null) |
||
82 | |||
83 | /** |
||
84 | * Logs an error message. |
||
85 | * An error message is typically logged when an unrecoverable error occurs |
||
86 | * during the execution of an application. |
||
87 | * @param string $message the message to be logged. |
||
88 | * @param string $category the category of the message. |
||
89 | */ |
||
90 | public static function error($message, string $category = null) |
||
94 | |||
95 | /** |
||
96 | * Logs a warning message. |
||
97 | * A warning message is typically logged when an error occurs while the execution |
||
98 | * can still continue. |
||
99 | * @param string $message the message to be logged. |
||
100 | * @param string $category the category of the message. |
||
101 | */ |
||
102 | public static function warning($message, string $category = null) |
||
106 | |||
107 | /** |
||
108 | * Logs an informative message. |
||
109 | * An informative message is typically logged by an application to keep record of |
||
110 | * something important (e.g. an administrator logs in). |
||
111 | * @param string $message the message to be logged. |
||
112 | * @param string $category the category of the message. |
||
113 | */ |
||
114 | public static function info($message, string $category = null) |
||
118 | |||
119 | /** |
||
120 | * @param string|null $category |
||
121 | * @return string |
||
122 | */ |
||
123 | private static function normalizeCategory(string $category = null) |
||
133 | } |
||
134 |