Add deprecation annotations for getVar & setVar
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 19 Sep 2023 00:04:01 +0000 (12:04 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 19 Sep 2023 00:04:01 +0000 (12:04 +1200)
CRM/Core/Form.php

index b28718a6f32ad939895f705c8ff787bc54bd76a5..ea3cd3e8f4d267116e3ae9d0efdbc1b2a5e3843c 100644 (file)
@@ -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;