pbyrne84 / DynamicReturnTypePlugin

135 stars 7 forks source link

Return the calling class #59

Open manuelteuber opened 8 years ago

manuelteuber commented 8 years ago

Hi,

is it possible to return the name of the calling class of a (static) method?

Example:

class User extends DataObject { }

$users = User::get(); // <- should return an array or some ArrayIterator class of User objects, e.g. DataList|User[]

$user = User::get()->byID(5); // <- should return a single User object

$user = User::currentUser(); // <- should return a single User object

Thank you!