Is it possible for me to programmatically change a variable from public to private in a class function call?
No, it is not possible to change a variable from public to private.
Use access modifiers (setters, getters) and set the private property to the public property.
You cannot change the visibility of a property.
Source: https://habr.com/ru/post/1437688/More articles:Lamina undo siphon - Clojure - clojureHow to undo Celery task when deploying to Heroku - pythonPerl passes argument to eval - evalD3.js transition callback to frame - javascriptIs it possible to dynamically determine public default class variables from an array in php? - propertiesTake control of robots.txt and sitemap.xml - shopifyhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1437690/android-how-to-setonclicklistener-for-fragment-button&usg=ALkJrhj7-0rWTeqwMHrE_hxf6obA3d0e2gPage acceleration goes right - jquery-mobileOrchard custom module does not save all elements - modulejquery unselect event input element? - javascriptAll Articles