/** * _regular_formatting * adds formatting to an address * * @access private * @param object EEI_Address_Formatter $formatter * @param object EEI_Address $obj_with_address * @param bool $add_wrapper * @return string */ private static function _regular_formatting(EEI_Address_Formatter $formatter, EEI_Address $obj_with_address, $add_wrapper = true) { $formatted_address = $add_wrapper ? '<div>' : ''; $formatted_address .= $formatter->format($obj_with_address->address(), $obj_with_address->address2(), $obj_with_address->city(), $obj_with_address->state_name(), $obj_with_address->zip(), $obj_with_address->country_name(), $obj_with_address->country_ID()); $formatted_address .= $add_wrapper ? '</div>' : ''; // return the formatted address return $formatted_address; }
/** * streetAddress * The street address. For example, 1600 Amphitheatre Pkwy. * * @access public * @param EEI_Address $obj_with_address * @return string */ public static function streetAddress(EEI_Address $obj_with_address = null) { return $obj_with_address->address() !== null && $obj_with_address->address() !== '' ? '<span itemprop="streetAddress">' . $obj_with_address->address() . '</span>' : ''; }