From 1c4a6012133c9c2a460d414f78c060f798aa197b Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 19 Sep 2023 12:04:01 +1200 Subject: [PATCH] Add deprecation annotations for getVar & setVar --- CRM/Core/Form.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index b28718a6f3..ea3cd3e8f4 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -2046,6 +2046,14 @@ class CRM_Core_Form extends HTML_QuickForm_Page { /** * @param string $name * + * @deprecated - use of this function assumes that an otherwise unavailable + * variable can be used form outside the class in question. However, the very + * fact it is otherwise unavailable means there is no contract that it will + * not be changed or become unused. This function is OK for temporary usage but + * should be accompanied with an effort to establish a more correct method + * or property tested hook / api interface if this is being done from outside of + * core. + * * @return mixed */ public function getVar($name) { @@ -2055,6 +2063,14 @@ class CRM_Core_Form extends HTML_QuickForm_Page { /** * @param string $name * @param mixed $value + * + * @deprecated - use of this function assumes that an otherwise unavailable + * variable can be used form outside the class in question. However, the very + * fact it is otherwise unavailable means there is no contract that it will + * not be changed or become unused. This function is OK for temporary usage but + * should be accompanied with an effort to establish a more correct method + * or property tested hook / api interface if this is being done from outside of + * core. */ public function setVar($name, $value) { $this->$name = $value; -- 2.25.1