original_string: public function validate(array $street, $state, $suburb, $postcode, $country)
      {
          try {
              $validatorClass = Mage::getStoreConfig(self::XML_PATH_ADDRESS_VALIDATION_BACKEND);
              if (!$validatorClass) {
                  Mage::helper('australia')->logMessage('Address validator class not set');
                  return array();
              }
              /** @var Fontis_Australia_Model_Address_Interface $validator */
              $validator = Mage::getModel($validatorClass);
              return $validator->validateAddress($street, $state, $suburb, $postcode, $country);
          } catch (Exception $err) {
              $message = "Error validating address\nStreet: " . print_r($street, true) . "\n"
                      . "State: $state\nSuburb: $suburb\nPostcode: $postcode\nCountry: $country\n"
                      . $err->getMessage() . "\n" . $err->getTraceAsString();
              Mage::helper('australia')->logMessage($message);
              return array();
          }
      }
code: public function validate(array $street, $state, $suburb, $postcode, $country)
      {
          try {
              $validatorClass = Mage::getStoreConfig(self::XML_PATH_ADDRESS_VALIDATION_BACKEND);
              if (!$validatorClass) {
                  Mage::helper('australia')->logMessage('Address validator class not set');
                  return array();
              }
              /** @var Fontis_Australia_Model_Address_Interface $validator */
              $validator = Mage::getModel($validatorClass);
              return $validator->validateAddress($street, $state, $suburb, $postcode, $country);
          } catch (Exception $err) {
              $message = "Error validating address\nStreet: " . print_r($street, true) . "\n"
                      . "State: $state\nSuburb: $suburb\nPostcode: $postcode\nCountry: $country\n"
                      . $err->getMessage() . "\n" . $err->getTraceAsString();
              Mage::helper('australia')->logMessage($message);
              return array();
          }
      }
code_tokens: public function validate ( array $ street , $ state , $ suburb , $ postcode , $ country ) { try { $ validatorClass = Mage :: getStoreConfig ( self :: XML_PATH_ADDRESS_VALIDATION_BACKEND ) ; if ( ! $ validatorClass ) { Mage :: helper ( 'australia' ) -> logMessage ( 'Address validator class not set' ) ; return array ( ) ; } /** @var Fontis_Australia_Model_Address_Interface $validator */ $ validator = Mage :: getModel ( $ validatorClass ) ; return $ validator -> validateAddress ( $ street , $ state , $ suburb , $ postcode , $ country ) ; } catch ( Exception $ err ) { $ message = "Error validating address\nStreet: " . print_r ( $ street , true ) . "\n" . "State: $state\nSuburb: $suburb\nPostcode: $postcode\nCountry: $country\n" . $ err -> getMessage ( ) . "\n" . $ err -> getTraceAsString ( ) ; Mage :: helper ( 'australia' ) -> logMessage ( $ message ) ; return array ( ) ; } }
docstring: Validates an address.
  
  Instantiates the selected address validator and passes our arguments to
  it, as well as doing some error checking.
  
  @see Fontis_Australia_Model_Address_Interface
  
  @param string[] $street Array of street address lines
  @param string $state State
  @param string $suburb City/suburb
  @param string $postcode Postcode
  @param string $country Country
  @return array Array of validated address data
docstring_tokens: Validates an address .