Base extension class for PHP