Magic class extension to PHP Slim framework