I’m actually following the tutorial (the blog) and I’m a bit confuse about the models/db interaction.
We create a PostCommandInterface and inside we define 3 methods. Then, we implements this interface in the class PostCommand but we didn’t implement the 3 methods here. Then we create a ZendDbSqlCommand class and here we implements again the PostCommandInterface but this time we define and implement the 3 methods.
My question is, why do we have an empty class PostCommand if we don’t write any code in it ?
I think I’ve missed something important about the design of our application .
I understand why we needed a dummy PostRepository (to have fake data with an array), but right now if I delete both PostCommand.php and PostRepository.php my application still work without a problem.
One more question, ZendDbSqlRepository isn’t supposed to be called ZendDbSqlPostRepository ? Since in a blog we can have a repository for comments or categories ?