Skip to content

Surname::getInitials

James Cobban edited this page Mar 24, 2022 · 1 revision

Surname::getInitials($options)

Up: class Surname

This static method returns an array containing initial letters of surnames defined in the Surnames table. Note that each returned letter is internally a multi-byte value representing a single Unicode character.

parameter description
$options This is a set of bit flags controlling which code pages are included in the construction of the response.

Surname::EXCLUDE_LATIN exclude the letters from the Latin1 code page. That is the letters A through Z in the Western European alphabet. This does not exclude the accented versions of those letters.

For example:

   $initials      = Surname::getInitials(Surname::EXCLUDE_LATIN);

The method returns an array each member of which is a string containing a single Unicode letter. This array may be empty.

NOTE: If a class SurnameSet is created this functionality, or a superset, may be moved to that class, which would supersede this method.

Next: class Temple

Clone this wiki locally