Surname::next - jcobban/Genealogy GitHub Wiki

$surname->next()

Up: class Surname

This method returns the next sequential instance of class Surname in alphabetical order after the current instance. The current instance does not need to correspond to a real record in the table of Surnames because it is used only to construct the search command. If the current instance is not followed by an instance in alphabetical order this returns the special instance of class Surname with the empty string surname.

  $burkholder        = new Surname(array('surname' => 'Burkholder'));
  $next              = $burkholder->next();
  print $next->getName();     // on sample database displays "Burks"
  $zzzz              = new Surname(array('surname' => 'zzzz'));
  $next              = $zzzz->next();
  print $next->getName();     // on sample database displays ""

It is equivalent to new Surname(array('surname' => '>' . $surname['surname']));

Next: $surname->save($xml)