Dependency injection example

Hi,

I am totally newbie at Phalcon. Can someone show me an Dependency injection example when, for example, some model instance is injected into controller? I was trying to do this by examples all evening, but I failed. :((

Very thanks!

P. S. And please, type a files names above examples codes. :) It would be very helpful to understand easier, which file is controller, which is model, which is service.



36.5k

Hey

Big question, but you can see example service.php vokuro , in which author set some service mail, auth... you can use any where in project Phalcon

Hi,

Thanks. I tried on Vokuro project and everything works but then I try to create class into Invo example (official Phalcon example) and inject that class into controller, it doesn't work. I don't know why. :/



36.5k

you set dependency injection in file service yet ?