Address::getName
James Cobban edited this page Dec 6, 2019
·
4 revisions
Up: class Address
This method returns the descriptive name of the Address
. This exists to extend Record::getName.
If a parameter is specified it is an instance of class TemplateTag or an associative array used to translate strings into the user's preferred language.
The return value is a string containing the contents of the addrname
field separated from the interpreted kind of Address
.
For example:
$template = new FtTemplate("mypagede.html");
$translate = $template->getTranslate();
$t = $translate['tranTab'];
$address = new Address(array('idar' => 504));
print $address->getName() . "\n";
print $address->getName($t) . "\n";
when used with the sample application database displays:
Ancestry.com: Repository
Ancestry.com: Lager
Next: $address->getNotes()