PHP Monkey-patching Resources