How do I autoload a class with the X Autoload module?
If your file-system is case-sensitive, so is PSR-0. Try changing your class filename to


  MY-SITE/sites/all/modules/foo/lib/Drupal/foo/Pet.php


And make sure you're namespacing your class correctly, e.g.

namespace Drupal\foo;

class Pet {
  ...
}


Lastly, make sure you're referencing the class correctly in your module file. Either

// Top of file.
use Drupal\foo\Pet;

// In a hook or whatever
$dog = Pet::dog();

or

// In a hook
$dog = \Drupal\foo\Pet::dog();