Fix ClassResource traits when extending base classes

Ref: http://php.net/get_class example #2
Merge branch 'hotfix/class-resource'

* hotfix/class-resource:
  Fix ClassResource traits when extending base classes