+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
* Address utilties
class CRM_Utils_Address {
/**
- * Format an address string from address fields and a format string
+ * Format an address string from address fields and a format string.
*
* Format an address basing on the address fields provided.
* Use Setting's address_format if there's no format specified.
* @return string
* formatted address string
*
- * @static
*/
- static function format(
+ public static function format(
$fields,
$format = NULL,
$microformat = FALSE,
static $config = NULL;
if (!$format) {
- $format =
- CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'address_format');
+ $format = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'address_format');
}
if ($mailing) {
- $format =
- CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'mailing_format');
+ $format = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'mailing_format');
}
$formatted = $format;
$newSequence = array_unique($newSequence);
return $newSequence;
}
+
}