Forse non mi sono spiegato bene, io vorrei usare il type hint in questo modo:
Mi da errore ma non capisco perchè, Type è un SuperType e quindi ha tutte le proprietà di un SuperTypeCodice PHP:
class SuperType {}
class Type extends SuperType {}
class Foo {
static public function test(SuperType $t) {
echo get_class($t);
}
}
//Questo non mi viene accettato perché si aspetta un SuperType e non un Type
Foo::test(new Type());