MockDBField::hook
For field types that can contain a variety of data, e.g. Varchar, this method informs the Faker\Generator object what kind of data to generate based on the name of the field.
For instance, a field named "FirstName" should generate a person's name. A field named "Country" should generate a country name. Field names can be matched at the beginning or end of the string, for instance: "DoctorFirstName" and "Address2" will generate a first name and an address, respectively. This logic can be refined in the lang file so that database fields can be named in the local language, e.g. "Prenom" or "Pays" and still be mapped to the correct data type.
Signature
public function hook(string
$name )
Parameters
$name
— string- The name of the data type to examine
Returns
- boolean