4 * @file src/Object/Profile.php
7 namespace Friendica\Object;
9 use Friendica\BaseObject;
11 class Profile extends BaseObject
14 * @brief Returns a formatted location string from the given profile array
16 * @param array $profile Profile array (Generated from the "profile" table)
18 * @return string Location string
20 public static function formatLocation(array $profile)
24 if ($profile['locality']) {
25 $location .= $profile['locality'];
28 if ($profile['region'] && ($profile['locality'] != $profile['region'])) {
33 $location .= $profile['region'];
36 if ($profile['country-name']) {
41 $location .= $profile['country-name'];