Drupal 7 and MySQL sockets

I recently switched from a mysql.com implementation of MySQL to MacPorts on my local, and the Drupal sites would no longer load.

The MacPorts my.cnf file turns off networking, so that multiple versions of MySQL can be run. In doing so, one must then use socket files to access MySQL instead of TCP/IP. This requires a change to the database config in the settings.php file.

Simply add the path to your socket file as an additional line in the database config array, as follows:

'unix_socket' => '/<path>/mysqld.sock'

MacPorts and The server quit without updating PID file

I just upgraded from OS X Mavericks to Yosemite, and then went through the process of updating my MacPorts ports. Everything went cleanly until I tried to start MySQL. I received the message:

The server quit without updating PID

Searching for an answer gave plenty of articles suggesting that the file mentioned after that error message needed to be created, that permissions were wrong, and other things surrounding issues regarding the pid file. None of those turned out to be the cause.

Invoking the calling class in a static inherited environment

In PHP, if you have a number of  static classes, how do you make sure the called class ends up calling a method back in the calling class?

It's a complicated question, so let me clarify it with an example. Let's say I have the following classes:

Pet
  Dog (extends Pet)
    Newfoundland (extends Dog)
  Cat (extends Pet)
    MaineCoon (extends Cat)