]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/pocoaddress.php
Added missing isPrivateScope().
[quix0rs-gnu-social.git] / lib / pocoaddress.php
index d9f6ff2bdefa8ea988cbb6200a30c2ffa71bd0f7..22d4d02b13d8d08e147c7d7b716d3978b22af084 100644 (file)
@@ -56,4 +56,17 @@ class PoCoAddress
             $xo->elementEnd('poco:address');
         }
     }
+
+    /**
+     * Return this PoCo address as an array suitable for serializing in JSON
+     *
+     * @return array the address
+     */
+
+    function asArray()
+    {
+        if (!empty($this->formatted)) {
+            return array('formatted' => $this->formatted);
+        }
+    }
 }