Record::getName - jcobban/Genealogy GitHub Wiki
$record->getName($options)
Up: class Record
This returns a string containing the name of the instance. In the base definition in class Record this is the names and contents of the field or fields that uniquely define the record. However if the table does not have a value set for $record‑>getInfo(['prime'] but the record contains a field 'name' the return value is “name: $name”. Otherwise the method returns the name and value of the first field in the record. This method has one parameter:
parameter | description |
---|---|
$options | This is defined so that derived classes can override this function and use the parameter to customize the output. It has no action in the base implementation. |
$country = new Record(array('code' => 'CA')), 'Countries');
print $country->getName(); // prints "Canada"
$birth = new Birth(array('regdomain' => 'CAON',
'regyear' => 1896,
'regnum' => 12345));
print $birth->getName(); // prints "Birth: d_regdomain=CAON,d_regyear=1897,d_regnum=12345"
Next: $record->getLastSqlCmd()