Parametrization

In reply to :

Yes, but why do this unnecessary step and get the correctly typed class in the first place? Also, you will get compiler errors if you do not get it right, otherwise a $cast error is at run-time.