+ /**
+ * Getter.
+ *
+ * Allows current multisite naming conventions when getting properties.
+ *
+ * @since 4.6.0
+ * @access public
+ *
+ * @param string $key Property to get.
+ * @return mixed Value of the property. Null if not available.
+ */
+ public function __get( $key ) {
+ switch ( $key ) {
+ case 'id';
+ return (int) $this->id;
+ case 'blog_id':
+ return $this->blog_id;
+ case 'site_id':
+ return (int) $this->blog_id;
+ }
+
+ return null;
+ }
+
+ /**
+ * Isset-er.
+ *
+ * Allows current multisite naming conventions when checking for properties.
+ *
+ * @since 4.6.0
+ * @access public
+ *
+ * @param string $key Property to check if set.
+ * @return bool Whether the property is set.
+ */
+ public function __isset( $key ) {
+ switch ( $key ) {
+ case 'id':
+ case 'blog_id':
+ case 'site_id':
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Setter.
+ *
+ * Allows current multisite naming conventions while setting properties.
+ *
+ * @since 4.6.0
+ * @access public
+ *
+ * @param string $key Property to set.
+ * @param mixed $value Value to assign to the property.
+ */
+ public function __set( $key, $value ) {
+ switch ( $key ) {
+ case 'id':
+ $this->id = (int) $value;
+ break;
+ case 'blog_id':
+ case 'site_id':
+ $this->blog_id = (string) $value;
+ break;
+ default:
+ $this->$key = $value;
+ }
+ }
+