File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,37 @@ public static function instance(): self {
116116 return self ::$ instance ;
117117 }
118118
119+ /**
120+ * Makes private properties readable for backward compatibility.
121+ *
122+ * @see WP_Object_Cache::__get()
123+ *
124+ * @since 0.1.0
125+ *
126+ * @param string $name Property to get.
127+ * @return mixed Property.
128+ */
129+ public function __get ( $ name ) { // phpcs:ignore NeutronStandard.MagicMethods.DisallowMagicGet.MagicGet
130+ return $ this ->$ name ;
131+ }
132+
133+ /**
134+ * Makes private properties settable for backward compatibility.
135+ *
136+ * @see WP_Object_Cache::__set()
137+ *
138+ * @since 0.1.0
139+ *
140+ * @param string $name Property to set.
141+ * @param mixed $value Property value.
142+ * @return mixed Newly-set property.
143+ */
144+ public function __set ( $ name , $ value ) { // phpcs:ignore NeutronStandard.MagicMethods.DisallowMagicSet.MagicSet
145+ $ this ->$ name = $ value ;
146+
147+ return $ this ->$ name ;
148+ }
149+
119150 /**
120151 * Adds data to the cache if it doesn't already exist.
121152 *
You can’t perform that action at this time.
0 commit comments