Initial Commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
class Zend_View_Helper_AddressFormat extends Zend_View_Helper_Abstract {
|
||||
|
||||
|
||||
public function AddressFormat($indirizzo,$cap,$comune,$provincia,$regione){
|
||||
|
||||
$str = '';
|
||||
|
||||
if(strlen(trim($indirizzo)) > 0){
|
||||
$str.= utf8_encode($indirizzo) . '<br>';
|
||||
}
|
||||
|
||||
if(strlen(trim($comune)) > 0){
|
||||
$str .= utf8_encode($comune);
|
||||
}
|
||||
|
||||
if(strlen(trim($cap)) > 0){
|
||||
$str .= ' - '.$cap;
|
||||
}
|
||||
|
||||
if(strlen(trim($provincia)) > 0){
|
||||
$str .= ' ('.utf8_encode($provincia).')';
|
||||
}
|
||||
|
||||
if(strlen(trim($regione)) > 0){
|
||||
$str .= ' - '.utf8_encode($regione);
|
||||
}
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user