How does actually Reflection in Laravel works?
I tried to debug it and see how it works, how actually Laravel uses reflection to se in controller's constructor or methods it's dependecies and their dependencies and... and give it to us.
But I found it hard and very complicate to see and even understand in 50%.
Jumping from class to class, I can't really see it. Tried few times debugging it with low results of understading.
I am very impressed by this and Reflection and the way Laravels uses it makes me heart burn, it's just beautiful. And I wish to fully understand that. The whole process. In general and step by step.
Beginning from hitting the route to finally having let's say dd($x)
where $x
is from method argument and is a TestClass
which has another dependency of TestClass2
. Which should be constructed in a way of: $x = new TestClass(new TestClass2());
I think that's beautiful mechanics and architecture. And understanding this is something I want so bad.
So again, my question is, How does actually Reflection in Laravel works?
Aucun commentaire:
Enregistrer un commentaire