CensusLine::set - jcobban/Genealogy GitHub Wiki
$line->set($fieldname, $value)
Up: class CensusLine
This changes the value of the identified field and returns the former value. It has two parameters:
parameter | description |
---|---|
$field | The field name is case insensitive and may be a synonym defined by the derived class to facilitate readability. Late static binding is used so this method takes advantage of field name definitions in the derived class. The field name may also be a temporary field defined by assigning a value to it in this method. This method creates a trace entry if the field name does not correspond to any field in the record and debugging is enabled. |
$value | The new value to assign to the field. |
It overloads the base implementation as follows:
field name | description |
---|---|
'numhands' | Converted to integer. Empty and blank strings converted to null. |
'wksemp' | Converted to integer. Empty and blank strings converted to null. |
'wksoth' | Converted to integer. Empty and blank strings converted to null. |
'hpwemp' | Converted to integer. Empty and blank strings converted to null. |
'hpwoth' | Converted to integer. Empty and blank strings converted to null. |
'incomeemp' | Converted to integer. Empty and blank strings converted to null. |
'incomeoth' | Converted to integer. Empty and blank strings converted to null. |
'horses' | Converted to integer. Empty and blank strings converted to null. |
'milkcows' | Converted to integer. Empty and blank strings converted to null. |
'cattle' | Converted to integer. Empty and blank strings converted to null. |
'sheep' | Converted to integer. Empty and blank strings converted to null. |
'pigs' | Converted to integer. Empty and blank strings converted to null. |
'numfamilies' | Converted to integer. Empty and blank strings converted to null. |
'nofamilies' | Converted to integer. Empty and blank strings converted to null. |
'monthsfact' | Converted to integer. Empty and blank strings converted to null. |
'monthshome' | Converted to integer. Empty and blank strings converted to null. |
'monthsother' | Converted to integer. Empty and blank strings converted to null. |
'incomeemp' | Converted to integer. Empty and blank strings converted to null. |
'incomeoth' | Converted to integer. Empty and blank strings converted to null. |
'monthsschool' | Converted to integer. Empty and blank strings converted to null. |
'age' | Calculates approximate year of birth. |
Next: class CensusLineSet