Adding Delegation to PHP

Rube Goldberg Machine

In summary I am proposing the PHP leverage the use statement like the PHP trait does, but with a class modifier to allow for automatic delegation of method calls to contained instances.

Also I am proposing we leverage the disambiguation syntax that is already available for traits, and extend it in a few ways that traits do not address such as:

  1. Use as to allow for renaming from the property names for delegate classes,
  2. Add include or exclude to allow including or excluding specific methods, and
  3. Add use method to allow for including specific methods.